From dc5174725f1558403e81cce65012866c8a4a3d11 Mon Sep 17 00:00:00 2001
From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com>
Date: Mon, 31 Mar 2025 14:29:41 -0700
Subject: [PATCH] Add RBI annotations for fields and params (#1559)
* Introduce types to ruby
* rubocop
* forgot these files
* other request methods
* more tests, fix for raw request
* Add README entry for types
* rebase and regen
---
.rubocop.yml | 23 +
README.md | 29 +
lib/stripe.rb | 1 +
lib/stripe/api_operations/request.rb | 1 +
lib/stripe/api_requestor.rb | 3 +
lib/stripe/object_types.rb | 7 +
lib/stripe/request_params.rb | 24 +
lib/stripe/resources.rb | 7 +
lib/stripe/resources/account.rb | 4606 ++++++++
lib/stripe/resources/account_link.rb | 54 +
lib/stripe/resources/account_session.rb | 739 ++
lib/stripe/resources/apple_pay_domain.rb | 54 +
lib/stripe/resources/application.rb | 20 +
lib/stripe/resources/application_fee.rb | 87 +
.../resources/application_fee_refund.rb | 17 +
lib/stripe/resources/apps/secret.rb | 141 +
lib/stripe/resources/balance.rb | 122 +
lib/stripe/resources/balance_transaction.rb | 103 +
lib/stripe/resources/bank_account.rb | 86 +-
lib/stripe/resources/billing/alert.rb | 135 +
.../resources/billing/alert_triggered.rb | 26 +
.../billing/credit_balance_summary.rb | 40 +
.../billing/credit_balance_transaction.rb | 107 +
lib/stripe/resources/billing/credit_grant.rb | 217 +
lib/stripe/resources/billing/meter.rb | 169 +
lib/stripe/resources/billing/meter_event.rb | 35 +
.../billing/meter_event_adjustment.rb | 43 +
.../resources/billing/meter_event_summary.rb | 15 +
.../resources/billing_portal/configuration.rb | 553 +
.../resources/billing_portal/session.rb | 271 +
lib/stripe/resources/capability.rb | 84 +
lib/stripe/resources/card.rb | 77 +
lib/stripe/resources/cash_balance.rb | 17 +
lib/stripe/resources/charge.rb | 1612 +++
lib/stripe/resources/checkout/session.rb | 3524 ++++++
lib/stripe/resources/climate/order.rb | 167 +
lib/stripe/resources/climate/product.rb | 47 +
lib/stripe/resources/climate/supplier.rb | 45 +
lib/stripe/resources/confirmation_token.rb | 1448 +++
.../resources/connect_collection_transfer.rb | 24 +
lib/stripe/resources/country_spec.rb | 54 +
lib/stripe/resources/coupon.rb | 185 +
lib/stripe/resources/credit_note.rb | 639 ++
lib/stripe/resources/credit_note_line_item.rb | 67 +
lib/stripe/resources/customer.rb | 824 ++
.../resources/customer_balance_transaction.rb | 29 +
.../customer_cash_balance_transaction.rb | 109 +
lib/stripe/resources/customer_session.rb | 159 +
lib/stripe/resources/discount.rb | 29 +
lib/stripe/resources/dispute.rb | 610 ++
.../entitlements/active_entitlement.rb | 37 +
.../active_entitlement_summary.rb | 23 +
lib/stripe/resources/entitlements/feature.rb | 81 +
lib/stripe/resources/ephemeral_key.rb | 21 +
lib/stripe/resources/event.rb | 90 +
lib/stripe/resources/exchange_rate.rb | 24 +
lib/stripe/resources/file.rb | 102 +
lib/stripe/resources/file_link.rb | 103 +
.../financial_connections/account.rb | 237 +
.../financial_connections/account_owner.rb | 17 +
.../account_ownership.rb | 9 +
.../financial_connections/session.rb | 95 +
.../financial_connections/transaction.rb | 92 +
lib/stripe/resources/forwarding/request.rb | 156 +
lib/stripe/resources/funding_instructions.rb | 308 +
.../resources/identity/verification_report.rb | 257 +
.../identity/verification_session.rb | 352 +
lib/stripe/resources/invoice.rb | 3205 ++++++
lib/stripe/resources/invoice_item.rb | 400 +
lib/stripe/resources/invoice_line_item.rb | 350 +
lib/stripe/resources/invoice_payment.rb | 86 +
.../resources/invoice_rendering_template.rb | 55 +
lib/stripe/resources/issuing/authorization.rb | 1104 ++
lib/stripe/resources/issuing/card.rb | 657 ++
lib/stripe/resources/issuing/cardholder.rb | 648 ++
lib/stripe/resources/issuing/dispute.rb | 781 ++
.../issuing/personalization_design.rb | 276 +
.../resources/issuing/physical_bundle.rb | 54 +
lib/stripe/resources/issuing/token.rb | 166 +
lib/stripe/resources/issuing/transaction.rb | 912 ++
lib/stripe/resources/line_item.rb | 47 +
lib/stripe/resources/login_link.rb | 7 +
lib/stripe/resources/mandate.rb | 142 +
lib/stripe/resources/payment_intent.rb | 8650 +++++++++++++++
lib/stripe/resources/payment_link.rb | 1632 +++
lib/stripe/resources/payment_method.rb | 1542 +++
.../resources/payment_method_configuration.rb | 2776 +++++
lib/stripe/resources/payment_method_domain.rb | 144 +
lib/stripe/resources/payout.rb | 209 +
lib/stripe/resources/person.rb | 263 +
lib/stripe/resources/plan.rb | 302 +
lib/stripe/resources/price.rb | 604 +
lib/stripe/resources/product.rb | 472 +
lib/stripe/resources/product_feature.rb | 12 +
lib/stripe/resources/promotion_code.rb | 212 +
lib/stripe/resources/quote.rb | 917 ++
.../resources/radar/early_fraud_warning.rb | 68 +
lib/stripe/resources/radar/value_list.rb | 116 +
lib/stripe/resources/radar/value_list_item.rb | 86 +
lib/stripe/resources/refund.rb | 392 +
lib/stripe/resources/reporting/report_run.rb | 141 +
lib/stripe/resources/reporting/report_type.rb | 27 +
lib/stripe/resources/reserve_transaction.rb | 22 +
lib/stripe/resources/reversal.rb | 21 +
lib/stripe/resources/review.rb | 99 +
lib/stripe/resources/setup_attempt.rb | 368 +
lib/stripe/resources/setup_intent.rb | 3473 ++++++
lib/stripe/resources/shipping_rate.rb | 250 +
.../resources/sigma/scheduled_query_run.rb | 45 +
lib/stripe/resources/source.rb | 1198 ++
.../resources/source_mandate_notification.rb | 66 +
lib/stripe/resources/source_transaction.rb | 85 +
lib/stripe/resources/subscription.rb | 1686 +++
lib/stripe/resources/subscription_item.rb | 314 +
lib/stripe/resources/subscription_schedule.rb | 1281 +++
lib/stripe/resources/tax/calculation.rb | 378 +
.../resources/tax/calculation_line_item.rb | 56 +
lib/stripe/resources/tax/registration.rb | 2373 ++++
lib/stripe/resources/tax/settings.rb | 117 +
lib/stripe/resources/tax/transaction.rb | 258 +
.../resources/tax/transaction_line_item.rb | 31 +
lib/stripe/resources/tax_code.rb | 26 +
.../resources/tax_deducted_at_source.rb | 22 +
lib/stripe/resources/tax_id.rb | 112 +
lib/stripe/resources/tax_rate.rb | 191 +
.../resources/terminal/configuration.rb | 1260 +++
.../resources/terminal/connection_token.rb | 18 +
lib/stripe/resources/terminal/location.rb | 166 +
lib/stripe/resources/terminal/reader.rb | 427 +
.../resources/test_helpers/test_clock.rb | 77 +
lib/stripe/resources/token.rb | 1159 ++
lib/stripe/resources/topup.rb | 165 +
lib/stripe/resources/transfer.rb | 144 +
.../resources/treasury/credit_reversal.rb | 83 +
.../resources/treasury/debit_reversal.rb | 94 +
.../resources/treasury/financial_account.rb | 724 ++
.../treasury/financial_account_features.rb | 189 +
.../resources/treasury/inbound_transfer.rb | 226 +
.../resources/treasury/outbound_payment.rb | 486 +
.../resources/treasury/outbound_transfer.rb | 341 +
.../resources/treasury/received_credit.rb | 237 +
.../resources/treasury/received_debit.rb | 196 +
lib/stripe/resources/treasury/transaction.rb | 167 +
.../resources/treasury/transaction_entry.rb | 148 +
lib/stripe/resources/v2/amount.rb | 9 +
.../resources/v2/billing/meter_event.rb | 18 +
.../v2/billing/meter_event_adjustment.rb | 21 +
.../v2/billing/meter_event_session.rb | 14 +
lib/stripe/resources/v2/event.rb | 27 +
lib/stripe/resources/v2/event_destination.rb | 59 +
lib/stripe/resources/webhook_endpoint.rb | 113 +
.../services/account_capability_service.rb | 32 +
.../account_external_account_service.rb | 250 +
lib/stripe/services/account_link_service.rb | 46 +
.../services/account_login_link_service.rb | 9 +
lib/stripe/services/account_person_service.rb | 875 ++
lib/stripe/services/account_service.rb | 3974 +++++++
.../services/account_session_service.rb | 484 +
.../services/apple_pay_domain_service.rb | 51 +
.../application_fee_refund_service.rb | 54 +
.../services/application_fee_service.rb | 57 +
lib/stripe/services/apps/secret_service.rb | 116 +
lib/stripe/services/balance_service.rb | 9 +
.../services/balance_transaction_service.rb | 69 +
lib/stripe/services/billing/alert_service.rb | 113 +
.../billing/credit_balance_summary_service.rb | 48 +
.../credit_balance_transaction_service.rb | 40 +
.../services/billing/credit_grant_service.rb | 166 +
.../billing/meter_event_adjustment_service.rb | 26 +
.../services/billing/meter_event_service.rb | 21 +
.../billing/meter_event_summary_service.rb | 39 +
lib/stripe/services/billing/meter_service.rb | 130 +
.../billing_portal/configuration_service.rb | 444 +
.../billing_portal/session_service.rb | 173 +
lib/stripe/services/charge_service.rb | 402 +
.../checkout/session_line_item_service.rb | 18 +
.../services/checkout/session_service.rb | 2394 ++++
lib/stripe/services/climate/order_service.rb | 102 +
.../services/climate/product_service.rb | 27 +
.../services/climate/supplier_service.rb | 27 +
.../services/confirmation_token_service.rb | 9 +
lib/stripe/services/country_spec_service.rb | 27 +
lib/stripe/services/coupon_service.rb | 148 +
.../services/credit_note_line_item_service.rb | 18 +
.../credit_note_preview_lines_service.rb | 152 +
lib/stripe/services/credit_note_service.rb | 365 +
.../customer_balance_transaction_service.rb | 63 +
.../services/customer_cash_balance_service.rb | 29 +
...stomer_cash_balance_transaction_service.rb | 27 +
.../customer_funding_instructions_service.rb | 42 +
.../customer_payment_method_service.rb | 40 +
.../customer_payment_source_service.rb | 179 +
lib/stripe/services/customer_service.rb | 577 +
.../services/customer_session_service.rb | 96 +
.../services/customer_tax_id_service.rb | 45 +
lib/stripe/services/dispute_service.rb | 374 +
.../active_entitlement_service.rb | 36 +
.../services/entitlements/feature_service.rb | 76 +
lib/stripe/services/ephemeral_key_service.rb | 36 +
lib/stripe/services/event_service.rb | 65 +
lib/stripe/services/exchange_rate_service.rb | 27 +
lib/stripe/services/file_link_service.rb | 94 +
lib/stripe/services/file_service.rb | 89 +
.../account_owner_service.rb | 27 +
.../financial_connections/account_service.rb | 96 +
.../financial_connections/session_service.rb | 68 +
.../transaction_service.rb | 70 +
.../services/forwarding/request_service.rb | 106 +
.../identity/verification_report_service.rb | 65 +
.../identity/verification_session_service.rb | 231 +
lib/stripe/services/invoice_item_service.rb | 334 +
.../services/invoice_line_item_service.rb | 221 +
.../services/invoice_payment_service.rb | 55 +
.../invoice_rendering_template_service.rb | 51 +
lib/stripe/services/invoice_service.rb | 2647 +++++
.../services/issuing/authorization_service.rb | 104 +
lib/stripe/services/issuing/card_service.rb | 455 +
.../services/issuing/cardholder_service.rb | 525 +
.../services/issuing/dispute_service.rb | 633 ++
.../issuing/personalization_design_service.rb | 193 +
.../issuing/physical_bundle_service.rb | 40 +
lib/stripe/services/issuing/token_service.rb | 73 +
.../services/issuing/transaction_service.rb | 77 +
lib/stripe/services/mandate_service.rb | 9 +
lib/stripe/services/payment_intent_service.rb | 7054 ++++++++++++
.../payment_link_line_item_service.rb | 18 +
lib/stripe/services/payment_link_service.rb | 1276 +++
.../payment_method_configuration_service.rb | 2004 ++++
.../services/payment_method_domain_service.rb | 76 +
lib/stripe/services/payment_method_service.rb | 808 ++
lib/stripe/services/payout_service.rb | 159 +
lib/stripe/services/plan_service.rb | 249 +
lib/stripe/services/price_service.rb | 493 +
.../services/product_feature_service.rb | 42 +
lib/stripe/services/product_service.rb | 425 +
lib/stripe/services/promotion_code_service.rb | 178 +
...ote_computed_upfront_line_items_service.rb | 18 +
.../services/quote_line_item_service.rb | 18 +
lib/stripe/services/quote_service.rb | 611 ++
.../radar/early_fraud_warning_service.rb | 61 +
.../services/radar/value_list_item_service.rb | 79 +
.../services/radar/value_list_service.rb | 103 +
lib/stripe/services/refund_service.rb | 137 +
.../services/reporting/report_run_service.rb | 106 +
.../services/reporting/report_type_service.rb | 18 +
lib/stripe/services/review_service.rb | 56 +
lib/stripe/services/setup_attempt_service.rb | 51 +
lib/stripe/services/setup_intent_service.rb | 3163 ++++++
lib/stripe/services/shipping_rate_service.rb | 200 +
.../sigma/scheduled_query_run_service.rb | 27 +
lib/stripe/services/source_service.rb | 601 +
.../services/source_transaction_service.rb | 18 +
.../services/subscription_item_service.rb | 285 +
.../services/subscription_schedule_service.rb | 1062 ++
lib/stripe/services/subscription_service.rb | 1412 +++
.../tax/calculation_line_item_service.rb | 18 +
.../services/tax/calculation_service.rb | 205 +
.../services/tax/registration_service.rb | 1564 +++
lib/stripe/services/tax/settings_service.rb | 74 +
.../tax/transaction_line_item_service.rb | 18 +
.../services/tax/transaction_service.rb | 111 +
lib/stripe/services/tax_code_service.rb | 27 +
lib/stripe/services/tax_id_service.rb | 79 +
lib/stripe/services/tax_rate_service.rb | 155 +
.../terminal/configuration_service.rb | 997 ++
.../terminal/connection_token_service.rb | 12 +
.../services/terminal/location_service.rb | 144 +
.../services/terminal/reader_service.rb | 266 +
.../confirmation_token_service.rb | 642 ++
.../services/test_helpers/customer_service.rb | 18 +
.../issuing/authorization_service.rb | 745 ++
.../test_helpers/issuing/card_service.rb | 45 +
.../issuing/personalization_design_service.rb | 41 +
.../issuing/transaction_service.rb | 632 ++
.../services/test_helpers/refund_service.rb | 9 +
.../test_helpers/terminal/reader_service.rb | 44 +
.../test_helpers/test_clock_service.rb | 57 +
.../treasury/inbound_transfer_service.rb | 38 +
.../treasury/outbound_payment_service.rb | 87 +
.../treasury/outbound_transfer_service.rb | 87 +
.../treasury/received_credit_service.rb | 60 +
.../treasury/received_debit_service.rb | 60 +
lib/stripe/services/token_service.rb | 1140 ++
lib/stripe/services/topup_service.rb | 142 +
.../services/transfer_reversal_service.rb | 66 +
lib/stripe/services/transfer_service.rb | 119 +
.../treasury/credit_reversal_service.rb | 59 +
.../treasury/debit_reversal_service.rb | 63 +
.../financial_account_features_service.rb | 166 +
.../treasury/financial_account_service.rb | 484 +
.../treasury/inbound_transfer_service.rb | 88 +
.../treasury/outbound_payment_service.rb | 258 +
.../treasury/outbound_transfer_service.rb | 124 +
.../treasury/received_credit_service.rb | 52 +
.../treasury/received_debit_service.rb | 40 +
.../treasury/transaction_entry_service.rb | 87 +
.../services/treasury/transaction_service.rb | 95 +
.../billing/meter_event_adjustment_service.rb | 23 +
.../v2/billing/meter_event_service.rb | 25 +
.../v2/billing/meter_event_session_service.rb | 3 +
.../v2/billing/meter_event_stream_service.rb | 33 +
.../v2/core/event_destination_service.rb | 143 +
lib/stripe/services/v2/core/event_service.rb | 15 +
.../services/webhook_endpoint_service.rb | 96 +
lib/stripe/stripe_client.rb | 3 +-
lib/stripe/stripe_object.rb | 5 +
rbi/stripe/resources/account.rbi | 4811 ++++++++
rbi/stripe/resources/account_link.rbi | 74 +
rbi/stripe/resources/account_session.rbi | 894 ++
rbi/stripe/resources/apple_pay_domain.rbi | 90 +
rbi/stripe/resources/application.rbi | 20 +
rbi/stripe/resources/application_fee.rbi | 118 +
.../resources/application_fee_refund.rbi | 37 +
rbi/stripe/resources/apps/secret.rbi | 195 +
rbi/stripe/resources/balance.rbi | 180 +
rbi/stripe/resources/balance_transaction.rbi | 144 +
rbi/stripe/resources/bank_account.rbi | 127 +
rbi/stripe/resources/billing/alert.rbi | 201 +
.../resources/billing/alert_triggered.rbi | 28 +
.../billing/credit_balance_summary.rbi | 63 +
.../billing/credit_balance_transaction.rbi | 147 +
rbi/stripe/resources/billing/credit_grant.rbi | 291 +
rbi/stripe/resources/billing/meter.rbi | 226 +
rbi/stripe/resources/billing/meter_event.rbi | 64 +
.../billing/meter_event_adjustment.rbi | 64 +
.../resources/billing/meter_event_summary.rbi | 35 +
.../billing_portal/configuration.rbi | 645 ++
.../resources/billing_portal/session.rbi | 345 +
rbi/stripe/resources/capability.rbi | 125 +
rbi/stripe/resources/card.rbi | 125 +
rbi/stripe/resources/cash_balance.rbi | 32 +
rbi/stripe/resources/charge.rbi | 2054 ++++
rbi/stripe/resources/checkout/session.rbi | 3951 +++++++
rbi/stripe/resources/climate/order.rbi | 245 +
rbi/stripe/resources/climate/product.rbi | 75 +
rbi/stripe/resources/climate/supplier.rbi | 72 +
rbi/stripe/resources/confirmation_token.rbi | 1793 +++
.../resources/connect_collection_transfer.rbi | 26 +
rbi/stripe/resources/country_spec.rbi | 85 +
rbi/stripe/resources/coupon.rbi | 248 +
rbi/stripe/resources/credit_note.rbi | 747 ++
.../resources/credit_note_line_item.rbi | 101 +
rbi/stripe/resources/customer.rbi | 1009 ++
.../customer_balance_transaction.rbi | 56 +
.../customer_cash_balance_transaction.rbi | 151 +
rbi/stripe/resources/customer_session.rbi | 200 +
rbi/stripe/resources/discount.rbi | 53 +
rbi/stripe/resources/dispute.rbi | 761 ++
.../entitlements/active_entitlement.rbi | 58 +
.../active_entitlement_summary.rbi | 23 +
rbi/stripe/resources/entitlements/feature.rbi | 117 +
rbi/stripe/resources/ephemeral_key.rbi | 44 +
rbi/stripe/resources/event.rbi | 146 +
rbi/stripe/resources/exchange_rate.rbi | 66 +
rbi/stripe/resources/file.rbi | 143 +
rbi/stripe/resources/file_link.rbi | 141 +
.../financial_connections/account.rbi | 339 +
.../financial_connections/account_owner.rbi | 35 +
.../account_ownership.rbi | 23 +
.../financial_connections/session.rbi | 123 +
.../financial_connections/transaction.rbi | 124 +
rbi/stripe/resources/forwarding/request.rbi | 216 +
rbi/stripe/resources/funding_instructions.rbi | 437 +
.../identity/verification_report.rbi | 351 +
.../identity/verification_session.rbi | 517 +
rbi/stripe/resources/invoice.rbi | 3735 +++++++
rbi/stripe/resources/invoice_item.rbi | 475 +
rbi/stripe/resources/invoice_line_item.rbi | 432 +
rbi/stripe/resources/invoice_payment.rbi | 114 +
.../resources/invoice_rendering_template.rbi | 104 +
.../resources/issuing/authorization.rbi | 1283 +++
rbi/stripe/resources/issuing/card.rbi | 741 ++
rbi/stripe/resources/issuing/cardholder.rbi | 744 ++
rbi/stripe/resources/issuing/dispute.rbi | 913 ++
.../issuing/personalization_design.rbi | 338 +
.../resources/issuing/physical_bundle.rbi | 79 +
rbi/stripe/resources/issuing/token.rbi | 226 +
rbi/stripe/resources/issuing/transaction.rbi | 1061 ++
rbi/stripe/resources/line_item.rbi | 72 +
rbi/stripe/resources/login_link.rbi | 18 +
rbi/stripe/resources/mandate.rbi | 187 +
rbi/stripe/resources/payment_intent.rbi | 9731 +++++++++++++++++
rbi/stripe/resources/payment_link.rbi | 1801 +++
rbi/stripe/resources/payment_method.rbi | 1822 +++
.../payment_method_configuration.rbi | 3154 ++++++
.../resources/payment_method_domain.rbi | 212 +
rbi/stripe/resources/payout.rbi | 300 +
rbi/stripe/resources/person.rbi | 371 +
rbi/stripe/resources/plan.rbi | 373 +
rbi/stripe/resources/price.rbi | 694 ++
rbi/stripe/resources/product.rbi | 557 +
rbi/stripe/resources/product_feature.rbi | 26 +
rbi/stripe/resources/promotion_code.rbi | 261 +
rbi/stripe/resources/quote.rbi | 1123 ++
.../resources/radar/early_fraud_warning.rbi | 98 +
rbi/stripe/resources/radar/value_list.rbi | 170 +
.../resources/radar/value_list_item.rbi | 131 +
rbi/stripe/resources/refund.rbi | 516 +
rbi/stripe/resources/reporting/report_run.rbi | 191 +
.../resources/reporting/report_type.rbi | 57 +
rbi/stripe/resources/reserve_transaction.rbi | 23 +
rbi/stripe/resources/reversal.rbi | 51 +
rbi/stripe/resources/review.rbi | 154 +
rbi/stripe/resources/setup_attempt.rbi | 477 +
rbi/stripe/resources/setup_intent.rbi | 3860 +++++++
rbi/stripe/resources/shipping_rate.rbi | 305 +
.../resources/sigma/scheduled_query_run.rbi | 75 +
rbi/stripe/resources/source.rbi | 1496 +++
.../resources/source_mandate_notification.rbi | 77 +
rbi/stripe/resources/source_transaction.rbi | 127 +
rbi/stripe/resources/subscription.rbi | 1964 ++++
rbi/stripe/resources/subscription_item.rbi | 370 +
.../resources/subscription_schedule.rbi | 1495 +++
rbi/stripe/resources/tax/calculation.rbi | 474 +
.../resources/tax/calculation_line_item.rbi | 88 +
rbi/stripe/resources/tax/registration.rbi | 2485 +++++
rbi/stripe/resources/tax/settings.rbi | 141 +
rbi/stripe/resources/tax/transaction.rbi | 351 +
.../resources/tax/transaction_line_item.rbi | 54 +
rbi/stripe/resources/tax_code.rbi | 44 +
.../resources/tax_deducted_at_source.rbi | 23 +
rbi/stripe/resources/tax_id.rbi | 167 +
rbi/stripe/resources/tax_rate.rbi | 239 +
.../resources/terminal/configuration.rbi | 1388 +++
.../resources/terminal/connection_token.rbi | 37 +
rbi/stripe/resources/terminal/location.rbi | 224 +
rbi/stripe/resources/terminal/reader.rbi | 587 +
.../resources/test_helpers/test_clock.rbi | 134 +
rbi/stripe/resources/token.rbi | 1217 +++
rbi/stripe/resources/topup.rbi | 222 +
rbi/stripe/resources/transfer.rbi | 199 +
.../resources/treasury/credit_reversal.rbi | 119 +
.../resources/treasury/debit_reversal.rbi | 131 +
.../resources/treasury/financial_account.rbi | 865 ++
.../treasury/financial_account_features.rbi | 260 +
.../resources/treasury/inbound_transfer.rbi | 295 +
.../resources/treasury/outbound_payment.rbi | 592 +
.../resources/treasury/outbound_transfer.rbi | 431 +
.../resources/treasury/received_credit.rbi | 302 +
.../resources/treasury/received_debit.rbi | 256 +
rbi/stripe/resources/treasury/transaction.rbi | 215 +
.../resources/treasury/transaction_entry.rbi | 192 +
rbi/stripe/resources/v2/amount.rbi | 14 +
.../resources/v2/billing/meter_event.rbi | 37 +
.../v2/billing/meter_event_adjustment.rbi | 41 +
.../v2/billing/meter_event_session.rbi | 31 +
rbi/stripe/resources/v2/event.rbi | 48 +
rbi/stripe/resources/v2/event_destination.rbi | 91 +
rbi/stripe/resources/webhook_endpoint.rbi | 170 +
.../services/account_capability_service.rbi | 51 +
.../account_external_account_service.rbi | 306 +
rbi/stripe/services/account_link_service.rbi | 58 +
.../services/account_login_link_service.rbi | 22 +
.../services/account_person_service.rbi | 923 ++
rbi/stripe/services/account_service.rbi | 4117 +++++++
.../services/account_session_service.rbi | 572 +
.../services/apple_pay_domain_service.rbi | 78 +
.../application_fee_refund_service.rbi | 93 +
.../services/application_fee_service.rbi | 78 +
rbi/stripe/services/apps/secret_service.rbi | 151 +
rbi/stripe/services/apps_service.rbi | 9 +
rbi/stripe/services/balance_service.rbi | 21 +
.../services/balance_transaction_service.rbi | 93 +
rbi/stripe/services/billing/alert_service.rbi | 152 +
.../credit_balance_summary_service.rbi | 68 +
.../credit_balance_transaction_service.rbi | 59 +
.../services/billing/credit_grant_service.rbi | 211 +
.../meter_event_adjustment_service.rbi | 42 +
.../services/billing/meter_event_service.rbi | 42 +
.../billing/meter_event_summary_service.rbi | 54 +
rbi/stripe/services/billing/meter_service.rbi | 163 +
.../billing_portal/configuration_service.rbi | 511 +
.../billing_portal/session_service.rbi | 204 +
.../services/billing_portal_service.rbi | 10 +
rbi/stripe/services/billing_service.rbi | 15 +
rbi/stripe/services/charge_service.rbi | 448 +
.../checkout/session_line_item_service.rbi | 33 +
.../services/checkout/session_service.rbi | 2585 +++++
rbi/stripe/services/checkout_service.rbi | 9 +
rbi/stripe/services/climate/order_service.rbi | 142 +
.../services/climate/product_service.rbi | 46 +
.../services/climate/supplier_service.rbi | 46 +
rbi/stripe/services/climate_service.rbi | 11 +
.../services/confirmation_token_service.rbi | 20 +
rbi/stripe/services/country_spec_service.rbi | 44 +
rbi/stripe/services/coupon_service.rbi | 192 +
.../credit_note_line_item_service.rbi | 31 +
.../credit_note_preview_lines_service.rbi | 167 +
rbi/stripe/services/credit_note_service.rbi | 416 +
.../customer_balance_transaction_service.rbi | 92 +
.../customer_cash_balance_service.rbi | 45 +
...tomer_cash_balance_transaction_service.rbi | 44 +
.../customer_funding_instructions_service.rbi | 59 +
.../customer_payment_method_service.rbi | 57 +
.../customer_payment_source_service.rbi | 232 +
rbi/stripe/services/customer_service.rbi | 651 ++
.../services/customer_session_service.rbi | 116 +
.../services/customer_tax_id_service.rbi | 72 +
rbi/stripe/services/dispute_service.rbi | 424 +
.../active_entitlement_service.rbi | 55 +
.../services/entitlements/feature_service.rbi | 107 +
rbi/stripe/services/entitlements_service.rbi | 10 +
rbi/stripe/services/ephemeral_key_service.rbi | 53 +
rbi/stripe/services/event_service.rbi | 83 +
rbi/stripe/services/exchange_rate_service.rbi | 44 +
rbi/stripe/services/file_link_service.rbi | 124 +
rbi/stripe/services/file_service.rbi | 116 +
.../account_owner_service.rbi | 42 +
.../financial_connections/account_service.rbi | 133 +
.../financial_connections/session_service.rbi | 88 +
.../transaction_service.rbi | 92 +
.../financial_connections_service.rbi | 11 +
.../services/forwarding/request_service.rbi | 134 +
rbi/stripe/services/forwarding_service.rbi | 9 +
.../identity/verification_report_service.rbi | 87 +
.../identity/verification_session_service.rbi | 323 +
rbi/stripe/services/identity_service.rbi | 10 +
rbi/stripe/services/invoice_item_service.rbi | 368 +
.../services/invoice_line_item_service.rbi | 259 +
.../services/invoice_payment_service.rbi | 71 +
.../invoice_rendering_template_service.rbi | 82 +
rbi/stripe/services/invoice_service.rbi | 2920 +++++
.../issuing/authorization_service.rbi | 146 +
rbi/stripe/services/issuing/card_service.rbi | 495 +
.../services/issuing/cardholder_service.rbi | 587 +
.../services/issuing/dispute_service.rbi | 707 ++
.../personalization_design_service.rbi | 243 +
.../issuing/physical_bundle_service.rbi | 59 +
rbi/stripe/services/issuing/token_service.rbi | 99 +
.../services/issuing/transaction_service.rbi | 105 +
rbi/stripe/services/issuing_service.rbi | 16 +
rbi/stripe/services/mandate_service.rbi | 20 +
.../services/payment_intent_service.rbi | 7759 +++++++++++++
.../payment_link_line_item_service.rbi | 31 +
rbi/stripe/services/payment_link_service.rbi | 1352 +++
.../payment_method_configuration_service.rbi | 2211 ++++
.../payment_method_domain_service.rbi | 112 +
.../services/payment_method_service.rbi | 840 ++
rbi/stripe/services/payout_service.rbi | 205 +
rbi/stripe/services/plan_service.rbi | 284 +
rbi/stripe/services/price_service.rbi | 546 +
.../services/product_feature_service.rbi | 69 +
rbi/stripe/services/product_service.rbi | 479 +
.../services/promotion_code_service.rbi | 214 +
...te_computed_upfront_line_items_service.rbi | 31 +
.../services/quote_line_item_service.rbi | 31 +
rbi/stripe/services/quote_service.rbi | 686 ++
.../radar/early_fraud_warning_service.rbi | 85 +
.../radar/value_list_item_service.rbi | 111 +
.../services/radar/value_list_service.rbi | 143 +
rbi/stripe/services/radar_service.rbi | 11 +
rbi/stripe/services/refund_service.rbi | 185 +
.../services/reporting/report_run_service.rbi | 135 +
.../reporting/report_type_service.rbi | 35 +
rbi/stripe/services/reporting_service.rbi | 10 +
rbi/stripe/services/review_service.rbi | 84 +
rbi/stripe/services/setup_attempt_service.rbi | 65 +
rbi/stripe/services/setup_intent_service.rbi | 3596 ++++++
rbi/stripe/services/shipping_rate_service.rbi | 241 +
.../sigma/scheduled_query_run_service.rbi | 46 +
rbi/stripe/services/sigma_service.rbi | 9 +
rbi/stripe/services/source_service.rbi | 663 ++
.../services/source_transaction_service.rbi | 31 +
.../services/subscription_item_service.rbi | 324 +
.../subscription_schedule_service.rbi | 1192 ++
rbi/stripe/services/subscription_service.rbi | 1596 +++
.../tax/calculation_line_item_service.rbi | 33 +
.../services/tax/calculation_service.rbi | 230 +
.../services/tax/registration_service.rbi | 1689 +++
rbi/stripe/services/tax/settings_service.rbi | 93 +
.../tax/transaction_line_item_service.rbi | 33 +
.../services/tax/transaction_service.rbi | 146 +
rbi/stripe/services/tax_code_service.rbi | 44 +
rbi/stripe/services/tax_id_service.rbi | 112 +
rbi/stripe/services/tax_rate_service.rbi | 185 +
rbi/stripe/services/tax_service.rbi | 12 +
.../terminal/configuration_service.rbi | 1120 ++
.../terminal/connection_token_service.rbi | 25 +
.../services/terminal/location_service.rbi | 184 +
.../services/terminal/reader_service.rbi | 344 +
rbi/stripe/services/terminal_service.rbi | 12 +
.../confirmation_token_service.rbi | 746 ++
.../test_helpers/customer_service.rbi | 33 +
.../issuing/authorization_service.rbi | 848 ++
.../test_helpers/issuing/card_service.rbi | 76 +
.../personalization_design_service.rbi | 69 +
.../issuing/transaction_service.rbi | 711 ++
.../services/test_helpers/issuing_service.rbi | 14 +
.../services/test_helpers/refund_service.rbi | 22 +
.../test_helpers/terminal/reader_service.rbi | 62 +
.../test_helpers/terminal_service.rbi | 11 +
.../test_helpers/test_clock_service.rbi | 92 +
.../treasury/inbound_transfer_service.rbi | 64 +
.../treasury/outbound_payment_service.rbi | 125 +
.../treasury/outbound_transfer_service.rbi | 125 +
.../treasury/received_credit_service.rbi | 87 +
.../treasury/received_debit_service.rbi | 87 +
.../test_helpers/treasury_service.rbi | 15 +
rbi/stripe/services/test_helpers_service.rbi | 15 +
rbi/stripe/services/token_service.rbi | 1189 ++
rbi/stripe/services/topup_service.rbi | 176 +
.../services/transfer_reversal_service.rbi | 101 +
rbi/stripe/services/transfer_service.rbi | 152 +
.../treasury/credit_reversal_service.rbi | 84 +
.../treasury/debit_reversal_service.rbi | 88 +
.../financial_account_features_service.rbi | 198 +
.../treasury/financial_account_service.rbi | 562 +
.../treasury/inbound_transfer_service.rbi | 117 +
.../treasury/outbound_payment_service.rbi | 304 +
.../treasury/outbound_transfer_service.rbi | 157 +
.../treasury/received_credit_service.rbi | 72 +
.../treasury/received_debit_service.rbi | 59 +
.../treasury/transaction_entry_service.rbi | 111 +
.../services/treasury/transaction_service.rbi | 122 +
rbi/stripe/services/treasury_service.rbi | 18 +
rbi/stripe/services/v1_services.rbi | 77 +
.../meter_event_adjustment_service.rbi | 39 +
.../v2/billing/meter_event_service.rbi | 42 +
.../billing/meter_event_session_service.rbi | 20 +
.../v2/billing/meter_event_stream_service.rbi | 55 +
rbi/stripe/services/v2/billing_service.rbi | 14 +
.../v2/core/event_destination_service.rbi | 200 +
rbi/stripe/services/v2/core/event_service.rbi | 36 +
rbi/stripe/services/v2/core_service.rbi | 12 +
rbi/stripe/services/v2_services.rbi | 10 +
.../services/webhook_endpoint_service.rbi | 131 +
test/stripe/request_params_test.rb | 137 +
627 files changed, 250544 insertions(+), 3 deletions(-)
create mode 100644 lib/stripe/request_params.rb
create mode 100644 lib/stripe/resources/application.rb
create mode 100644 lib/stripe/resources/billing/alert_triggered.rb
create mode 100644 lib/stripe/resources/connect_collection_transfer.rb
create mode 100644 lib/stripe/resources/entitlements/active_entitlement_summary.rb
create mode 100644 lib/stripe/resources/reserve_transaction.rb
create mode 100644 lib/stripe/resources/source_mandate_notification.rb
create mode 100644 lib/stripe/resources/tax_deducted_at_source.rb
create mode 100644 lib/stripe/resources/v2/amount.rb
create mode 100644 rbi/stripe/resources/account.rbi
create mode 100644 rbi/stripe/resources/account_link.rbi
create mode 100644 rbi/stripe/resources/account_session.rbi
create mode 100644 rbi/stripe/resources/apple_pay_domain.rbi
create mode 100644 rbi/stripe/resources/application.rbi
create mode 100644 rbi/stripe/resources/application_fee.rbi
create mode 100644 rbi/stripe/resources/application_fee_refund.rbi
create mode 100644 rbi/stripe/resources/apps/secret.rbi
create mode 100644 rbi/stripe/resources/balance.rbi
create mode 100644 rbi/stripe/resources/balance_transaction.rbi
create mode 100644 rbi/stripe/resources/bank_account.rbi
create mode 100644 rbi/stripe/resources/billing/alert.rbi
create mode 100644 rbi/stripe/resources/billing/alert_triggered.rbi
create mode 100644 rbi/stripe/resources/billing/credit_balance_summary.rbi
create mode 100644 rbi/stripe/resources/billing/credit_balance_transaction.rbi
create mode 100644 rbi/stripe/resources/billing/credit_grant.rbi
create mode 100644 rbi/stripe/resources/billing/meter.rbi
create mode 100644 rbi/stripe/resources/billing/meter_event.rbi
create mode 100644 rbi/stripe/resources/billing/meter_event_adjustment.rbi
create mode 100644 rbi/stripe/resources/billing/meter_event_summary.rbi
create mode 100644 rbi/stripe/resources/billing_portal/configuration.rbi
create mode 100644 rbi/stripe/resources/billing_portal/session.rbi
create mode 100644 rbi/stripe/resources/capability.rbi
create mode 100644 rbi/stripe/resources/card.rbi
create mode 100644 rbi/stripe/resources/cash_balance.rbi
create mode 100644 rbi/stripe/resources/charge.rbi
create mode 100644 rbi/stripe/resources/checkout/session.rbi
create mode 100644 rbi/stripe/resources/climate/order.rbi
create mode 100644 rbi/stripe/resources/climate/product.rbi
create mode 100644 rbi/stripe/resources/climate/supplier.rbi
create mode 100644 rbi/stripe/resources/confirmation_token.rbi
create mode 100644 rbi/stripe/resources/connect_collection_transfer.rbi
create mode 100644 rbi/stripe/resources/country_spec.rbi
create mode 100644 rbi/stripe/resources/coupon.rbi
create mode 100644 rbi/stripe/resources/credit_note.rbi
create mode 100644 rbi/stripe/resources/credit_note_line_item.rbi
create mode 100644 rbi/stripe/resources/customer.rbi
create mode 100644 rbi/stripe/resources/customer_balance_transaction.rbi
create mode 100644 rbi/stripe/resources/customer_cash_balance_transaction.rbi
create mode 100644 rbi/stripe/resources/customer_session.rbi
create mode 100644 rbi/stripe/resources/discount.rbi
create mode 100644 rbi/stripe/resources/dispute.rbi
create mode 100644 rbi/stripe/resources/entitlements/active_entitlement.rbi
create mode 100644 rbi/stripe/resources/entitlements/active_entitlement_summary.rbi
create mode 100644 rbi/stripe/resources/entitlements/feature.rbi
create mode 100644 rbi/stripe/resources/ephemeral_key.rbi
create mode 100644 rbi/stripe/resources/event.rbi
create mode 100644 rbi/stripe/resources/exchange_rate.rbi
create mode 100644 rbi/stripe/resources/file.rbi
create mode 100644 rbi/stripe/resources/file_link.rbi
create mode 100644 rbi/stripe/resources/financial_connections/account.rbi
create mode 100644 rbi/stripe/resources/financial_connections/account_owner.rbi
create mode 100644 rbi/stripe/resources/financial_connections/account_ownership.rbi
create mode 100644 rbi/stripe/resources/financial_connections/session.rbi
create mode 100644 rbi/stripe/resources/financial_connections/transaction.rbi
create mode 100644 rbi/stripe/resources/forwarding/request.rbi
create mode 100644 rbi/stripe/resources/funding_instructions.rbi
create mode 100644 rbi/stripe/resources/identity/verification_report.rbi
create mode 100644 rbi/stripe/resources/identity/verification_session.rbi
create mode 100644 rbi/stripe/resources/invoice.rbi
create mode 100644 rbi/stripe/resources/invoice_item.rbi
create mode 100644 rbi/stripe/resources/invoice_line_item.rbi
create mode 100644 rbi/stripe/resources/invoice_payment.rbi
create mode 100644 rbi/stripe/resources/invoice_rendering_template.rbi
create mode 100644 rbi/stripe/resources/issuing/authorization.rbi
create mode 100644 rbi/stripe/resources/issuing/card.rbi
create mode 100644 rbi/stripe/resources/issuing/cardholder.rbi
create mode 100644 rbi/stripe/resources/issuing/dispute.rbi
create mode 100644 rbi/stripe/resources/issuing/personalization_design.rbi
create mode 100644 rbi/stripe/resources/issuing/physical_bundle.rbi
create mode 100644 rbi/stripe/resources/issuing/token.rbi
create mode 100644 rbi/stripe/resources/issuing/transaction.rbi
create mode 100644 rbi/stripe/resources/line_item.rbi
create mode 100644 rbi/stripe/resources/login_link.rbi
create mode 100644 rbi/stripe/resources/mandate.rbi
create mode 100644 rbi/stripe/resources/payment_intent.rbi
create mode 100644 rbi/stripe/resources/payment_link.rbi
create mode 100644 rbi/stripe/resources/payment_method.rbi
create mode 100644 rbi/stripe/resources/payment_method_configuration.rbi
create mode 100644 rbi/stripe/resources/payment_method_domain.rbi
create mode 100644 rbi/stripe/resources/payout.rbi
create mode 100644 rbi/stripe/resources/person.rbi
create mode 100644 rbi/stripe/resources/plan.rbi
create mode 100644 rbi/stripe/resources/price.rbi
create mode 100644 rbi/stripe/resources/product.rbi
create mode 100644 rbi/stripe/resources/product_feature.rbi
create mode 100644 rbi/stripe/resources/promotion_code.rbi
create mode 100644 rbi/stripe/resources/quote.rbi
create mode 100644 rbi/stripe/resources/radar/early_fraud_warning.rbi
create mode 100644 rbi/stripe/resources/radar/value_list.rbi
create mode 100644 rbi/stripe/resources/radar/value_list_item.rbi
create mode 100644 rbi/stripe/resources/refund.rbi
create mode 100644 rbi/stripe/resources/reporting/report_run.rbi
create mode 100644 rbi/stripe/resources/reporting/report_type.rbi
create mode 100644 rbi/stripe/resources/reserve_transaction.rbi
create mode 100644 rbi/stripe/resources/reversal.rbi
create mode 100644 rbi/stripe/resources/review.rbi
create mode 100644 rbi/stripe/resources/setup_attempt.rbi
create mode 100644 rbi/stripe/resources/setup_intent.rbi
create mode 100644 rbi/stripe/resources/shipping_rate.rbi
create mode 100644 rbi/stripe/resources/sigma/scheduled_query_run.rbi
create mode 100644 rbi/stripe/resources/source.rbi
create mode 100644 rbi/stripe/resources/source_mandate_notification.rbi
create mode 100644 rbi/stripe/resources/source_transaction.rbi
create mode 100644 rbi/stripe/resources/subscription.rbi
create mode 100644 rbi/stripe/resources/subscription_item.rbi
create mode 100644 rbi/stripe/resources/subscription_schedule.rbi
create mode 100644 rbi/stripe/resources/tax/calculation.rbi
create mode 100644 rbi/stripe/resources/tax/calculation_line_item.rbi
create mode 100644 rbi/stripe/resources/tax/registration.rbi
create mode 100644 rbi/stripe/resources/tax/settings.rbi
create mode 100644 rbi/stripe/resources/tax/transaction.rbi
create mode 100644 rbi/stripe/resources/tax/transaction_line_item.rbi
create mode 100644 rbi/stripe/resources/tax_code.rbi
create mode 100644 rbi/stripe/resources/tax_deducted_at_source.rbi
create mode 100644 rbi/stripe/resources/tax_id.rbi
create mode 100644 rbi/stripe/resources/tax_rate.rbi
create mode 100644 rbi/stripe/resources/terminal/configuration.rbi
create mode 100644 rbi/stripe/resources/terminal/connection_token.rbi
create mode 100644 rbi/stripe/resources/terminal/location.rbi
create mode 100644 rbi/stripe/resources/terminal/reader.rbi
create mode 100644 rbi/stripe/resources/test_helpers/test_clock.rbi
create mode 100644 rbi/stripe/resources/token.rbi
create mode 100644 rbi/stripe/resources/topup.rbi
create mode 100644 rbi/stripe/resources/transfer.rbi
create mode 100644 rbi/stripe/resources/treasury/credit_reversal.rbi
create mode 100644 rbi/stripe/resources/treasury/debit_reversal.rbi
create mode 100644 rbi/stripe/resources/treasury/financial_account.rbi
create mode 100644 rbi/stripe/resources/treasury/financial_account_features.rbi
create mode 100644 rbi/stripe/resources/treasury/inbound_transfer.rbi
create mode 100644 rbi/stripe/resources/treasury/outbound_payment.rbi
create mode 100644 rbi/stripe/resources/treasury/outbound_transfer.rbi
create mode 100644 rbi/stripe/resources/treasury/received_credit.rbi
create mode 100644 rbi/stripe/resources/treasury/received_debit.rbi
create mode 100644 rbi/stripe/resources/treasury/transaction.rbi
create mode 100644 rbi/stripe/resources/treasury/transaction_entry.rbi
create mode 100644 rbi/stripe/resources/v2/amount.rbi
create mode 100644 rbi/stripe/resources/v2/billing/meter_event.rbi
create mode 100644 rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi
create mode 100644 rbi/stripe/resources/v2/billing/meter_event_session.rbi
create mode 100644 rbi/stripe/resources/v2/event.rbi
create mode 100644 rbi/stripe/resources/v2/event_destination.rbi
create mode 100644 rbi/stripe/resources/webhook_endpoint.rbi
create mode 100644 rbi/stripe/services/account_capability_service.rbi
create mode 100644 rbi/stripe/services/account_external_account_service.rbi
create mode 100644 rbi/stripe/services/account_link_service.rbi
create mode 100644 rbi/stripe/services/account_login_link_service.rbi
create mode 100644 rbi/stripe/services/account_person_service.rbi
create mode 100644 rbi/stripe/services/account_service.rbi
create mode 100644 rbi/stripe/services/account_session_service.rbi
create mode 100644 rbi/stripe/services/apple_pay_domain_service.rbi
create mode 100644 rbi/stripe/services/application_fee_refund_service.rbi
create mode 100644 rbi/stripe/services/application_fee_service.rbi
create mode 100644 rbi/stripe/services/apps/secret_service.rbi
create mode 100644 rbi/stripe/services/apps_service.rbi
create mode 100644 rbi/stripe/services/balance_service.rbi
create mode 100644 rbi/stripe/services/balance_transaction_service.rbi
create mode 100644 rbi/stripe/services/billing/alert_service.rbi
create mode 100644 rbi/stripe/services/billing/credit_balance_summary_service.rbi
create mode 100644 rbi/stripe/services/billing/credit_balance_transaction_service.rbi
create mode 100644 rbi/stripe/services/billing/credit_grant_service.rbi
create mode 100644 rbi/stripe/services/billing/meter_event_adjustment_service.rbi
create mode 100644 rbi/stripe/services/billing/meter_event_service.rbi
create mode 100644 rbi/stripe/services/billing/meter_event_summary_service.rbi
create mode 100644 rbi/stripe/services/billing/meter_service.rbi
create mode 100644 rbi/stripe/services/billing_portal/configuration_service.rbi
create mode 100644 rbi/stripe/services/billing_portal/session_service.rbi
create mode 100644 rbi/stripe/services/billing_portal_service.rbi
create mode 100644 rbi/stripe/services/billing_service.rbi
create mode 100644 rbi/stripe/services/charge_service.rbi
create mode 100644 rbi/stripe/services/checkout/session_line_item_service.rbi
create mode 100644 rbi/stripe/services/checkout/session_service.rbi
create mode 100644 rbi/stripe/services/checkout_service.rbi
create mode 100644 rbi/stripe/services/climate/order_service.rbi
create mode 100644 rbi/stripe/services/climate/product_service.rbi
create mode 100644 rbi/stripe/services/climate/supplier_service.rbi
create mode 100644 rbi/stripe/services/climate_service.rbi
create mode 100644 rbi/stripe/services/confirmation_token_service.rbi
create mode 100644 rbi/stripe/services/country_spec_service.rbi
create mode 100644 rbi/stripe/services/coupon_service.rbi
create mode 100644 rbi/stripe/services/credit_note_line_item_service.rbi
create mode 100644 rbi/stripe/services/credit_note_preview_lines_service.rbi
create mode 100644 rbi/stripe/services/credit_note_service.rbi
create mode 100644 rbi/stripe/services/customer_balance_transaction_service.rbi
create mode 100644 rbi/stripe/services/customer_cash_balance_service.rbi
create mode 100644 rbi/stripe/services/customer_cash_balance_transaction_service.rbi
create mode 100644 rbi/stripe/services/customer_funding_instructions_service.rbi
create mode 100644 rbi/stripe/services/customer_payment_method_service.rbi
create mode 100644 rbi/stripe/services/customer_payment_source_service.rbi
create mode 100644 rbi/stripe/services/customer_service.rbi
create mode 100644 rbi/stripe/services/customer_session_service.rbi
create mode 100644 rbi/stripe/services/customer_tax_id_service.rbi
create mode 100644 rbi/stripe/services/dispute_service.rbi
create mode 100644 rbi/stripe/services/entitlements/active_entitlement_service.rbi
create mode 100644 rbi/stripe/services/entitlements/feature_service.rbi
create mode 100644 rbi/stripe/services/entitlements_service.rbi
create mode 100644 rbi/stripe/services/ephemeral_key_service.rbi
create mode 100644 rbi/stripe/services/event_service.rbi
create mode 100644 rbi/stripe/services/exchange_rate_service.rbi
create mode 100644 rbi/stripe/services/file_link_service.rbi
create mode 100644 rbi/stripe/services/file_service.rbi
create mode 100644 rbi/stripe/services/financial_connections/account_owner_service.rbi
create mode 100644 rbi/stripe/services/financial_connections/account_service.rbi
create mode 100644 rbi/stripe/services/financial_connections/session_service.rbi
create mode 100644 rbi/stripe/services/financial_connections/transaction_service.rbi
create mode 100644 rbi/stripe/services/financial_connections_service.rbi
create mode 100644 rbi/stripe/services/forwarding/request_service.rbi
create mode 100644 rbi/stripe/services/forwarding_service.rbi
create mode 100644 rbi/stripe/services/identity/verification_report_service.rbi
create mode 100644 rbi/stripe/services/identity/verification_session_service.rbi
create mode 100644 rbi/stripe/services/identity_service.rbi
create mode 100644 rbi/stripe/services/invoice_item_service.rbi
create mode 100644 rbi/stripe/services/invoice_line_item_service.rbi
create mode 100644 rbi/stripe/services/invoice_payment_service.rbi
create mode 100644 rbi/stripe/services/invoice_rendering_template_service.rbi
create mode 100644 rbi/stripe/services/invoice_service.rbi
create mode 100644 rbi/stripe/services/issuing/authorization_service.rbi
create mode 100644 rbi/stripe/services/issuing/card_service.rbi
create mode 100644 rbi/stripe/services/issuing/cardholder_service.rbi
create mode 100644 rbi/stripe/services/issuing/dispute_service.rbi
create mode 100644 rbi/stripe/services/issuing/personalization_design_service.rbi
create mode 100644 rbi/stripe/services/issuing/physical_bundle_service.rbi
create mode 100644 rbi/stripe/services/issuing/token_service.rbi
create mode 100644 rbi/stripe/services/issuing/transaction_service.rbi
create mode 100644 rbi/stripe/services/issuing_service.rbi
create mode 100644 rbi/stripe/services/mandate_service.rbi
create mode 100644 rbi/stripe/services/payment_intent_service.rbi
create mode 100644 rbi/stripe/services/payment_link_line_item_service.rbi
create mode 100644 rbi/stripe/services/payment_link_service.rbi
create mode 100644 rbi/stripe/services/payment_method_configuration_service.rbi
create mode 100644 rbi/stripe/services/payment_method_domain_service.rbi
create mode 100644 rbi/stripe/services/payment_method_service.rbi
create mode 100644 rbi/stripe/services/payout_service.rbi
create mode 100644 rbi/stripe/services/plan_service.rbi
create mode 100644 rbi/stripe/services/price_service.rbi
create mode 100644 rbi/stripe/services/product_feature_service.rbi
create mode 100644 rbi/stripe/services/product_service.rbi
create mode 100644 rbi/stripe/services/promotion_code_service.rbi
create mode 100644 rbi/stripe/services/quote_computed_upfront_line_items_service.rbi
create mode 100644 rbi/stripe/services/quote_line_item_service.rbi
create mode 100644 rbi/stripe/services/quote_service.rbi
create mode 100644 rbi/stripe/services/radar/early_fraud_warning_service.rbi
create mode 100644 rbi/stripe/services/radar/value_list_item_service.rbi
create mode 100644 rbi/stripe/services/radar/value_list_service.rbi
create mode 100644 rbi/stripe/services/radar_service.rbi
create mode 100644 rbi/stripe/services/refund_service.rbi
create mode 100644 rbi/stripe/services/reporting/report_run_service.rbi
create mode 100644 rbi/stripe/services/reporting/report_type_service.rbi
create mode 100644 rbi/stripe/services/reporting_service.rbi
create mode 100644 rbi/stripe/services/review_service.rbi
create mode 100644 rbi/stripe/services/setup_attempt_service.rbi
create mode 100644 rbi/stripe/services/setup_intent_service.rbi
create mode 100644 rbi/stripe/services/shipping_rate_service.rbi
create mode 100644 rbi/stripe/services/sigma/scheduled_query_run_service.rbi
create mode 100644 rbi/stripe/services/sigma_service.rbi
create mode 100644 rbi/stripe/services/source_service.rbi
create mode 100644 rbi/stripe/services/source_transaction_service.rbi
create mode 100644 rbi/stripe/services/subscription_item_service.rbi
create mode 100644 rbi/stripe/services/subscription_schedule_service.rbi
create mode 100644 rbi/stripe/services/subscription_service.rbi
create mode 100644 rbi/stripe/services/tax/calculation_line_item_service.rbi
create mode 100644 rbi/stripe/services/tax/calculation_service.rbi
create mode 100644 rbi/stripe/services/tax/registration_service.rbi
create mode 100644 rbi/stripe/services/tax/settings_service.rbi
create mode 100644 rbi/stripe/services/tax/transaction_line_item_service.rbi
create mode 100644 rbi/stripe/services/tax/transaction_service.rbi
create mode 100644 rbi/stripe/services/tax_code_service.rbi
create mode 100644 rbi/stripe/services/tax_id_service.rbi
create mode 100644 rbi/stripe/services/tax_rate_service.rbi
create mode 100644 rbi/stripe/services/tax_service.rbi
create mode 100644 rbi/stripe/services/terminal/configuration_service.rbi
create mode 100644 rbi/stripe/services/terminal/connection_token_service.rbi
create mode 100644 rbi/stripe/services/terminal/location_service.rbi
create mode 100644 rbi/stripe/services/terminal/reader_service.rbi
create mode 100644 rbi/stripe/services/terminal_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/confirmation_token_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/customer_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/issuing/authorization_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/issuing/card_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/issuing/transaction_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/issuing_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/refund_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/terminal/reader_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/terminal_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/test_clock_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi
create mode 100644 rbi/stripe/services/test_helpers/treasury_service.rbi
create mode 100644 rbi/stripe/services/test_helpers_service.rbi
create mode 100644 rbi/stripe/services/token_service.rbi
create mode 100644 rbi/stripe/services/topup_service.rbi
create mode 100644 rbi/stripe/services/transfer_reversal_service.rbi
create mode 100644 rbi/stripe/services/transfer_service.rbi
create mode 100644 rbi/stripe/services/treasury/credit_reversal_service.rbi
create mode 100644 rbi/stripe/services/treasury/debit_reversal_service.rbi
create mode 100644 rbi/stripe/services/treasury/financial_account_features_service.rbi
create mode 100644 rbi/stripe/services/treasury/financial_account_service.rbi
create mode 100644 rbi/stripe/services/treasury/inbound_transfer_service.rbi
create mode 100644 rbi/stripe/services/treasury/outbound_payment_service.rbi
create mode 100644 rbi/stripe/services/treasury/outbound_transfer_service.rbi
create mode 100644 rbi/stripe/services/treasury/received_credit_service.rbi
create mode 100644 rbi/stripe/services/treasury/received_debit_service.rbi
create mode 100644 rbi/stripe/services/treasury/transaction_entry_service.rbi
create mode 100644 rbi/stripe/services/treasury/transaction_service.rbi
create mode 100644 rbi/stripe/services/treasury_service.rbi
create mode 100644 rbi/stripe/services/v1_services.rbi
create mode 100644 rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi
create mode 100644 rbi/stripe/services/v2/billing/meter_event_service.rbi
create mode 100644 rbi/stripe/services/v2/billing/meter_event_session_service.rbi
create mode 100644 rbi/stripe/services/v2/billing/meter_event_stream_service.rbi
create mode 100644 rbi/stripe/services/v2/billing_service.rbi
create mode 100644 rbi/stripe/services/v2/core/event_destination_service.rbi
create mode 100644 rbi/stripe/services/v2/core/event_service.rbi
create mode 100644 rbi/stripe/services/v2/core_service.rbi
create mode 100644 rbi/stripe/services/v2_services.rbi
create mode 100644 rbi/stripe/services/webhook_endpoint_service.rbi
create mode 100644 test/stripe/request_params_test.rb
diff --git a/.rubocop.yml b/.rubocop.yml
index a7e7de93..66a16dd0 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -21,6 +21,12 @@ Layout/LineLength:
- "lib/stripe/services/**/*.rb"
- "test/**/*.rb"
+Lint/MissingSuper:
+ Exclude:
+ - "lib/stripe/resources/**/*.rb"
+ - "lib/stripe/services/**/*.rb"
+ - "test/stripe/request_params_test.rb"
+
Metrics/AbcSize:
Enabled: false
@@ -54,6 +60,8 @@ Metrics/MethodLength:
Exclude:
- "lib/stripe/services/v1_services.rb"
- "lib/stripe/event_types.rb"
+ AllowedMethods:
+ - initialize
# TODO(xavdid): remove this once the first `basil` release is out
Naming/MethodName:
@@ -74,6 +82,21 @@ Metrics/ParameterLists:
Exclude:
- "lib/stripe/api_operations/request.rb"
- "lib/stripe/stripe_object.rb"
+ - "lib/stripe/stripe_client.rb"
+ - "lib/stripe/resources/**/*.rb"
+ - "lib/stripe/services/**/*.rb"
+
+Naming/MethodParameterName:
+ # We have many parameters that are less than 3 characters for tax codes
+ Exclude:
+ - "lib/stripe/resources/**/*.rb"
+ - "lib/stripe/services/**/*.rb"
+
+Naming/VariableNumber:
+ # We use a variety of variable number syntaxes
+ Exclude:
+ - "lib/stripe/resources/**/*.rb"
+ - "lib/stripe/services/**/*.rb"
Style/AccessModifierDeclarations:
EnforcedStyle: inline
diff --git a/README.md b/README.md
index a271ef82..fea4b783 100644
--- a/README.md
+++ b/README.md
@@ -317,6 +317,35 @@ You can disable this behavior if you prefer:
Stripe.enable_telemetry = false
```
+### Types
+
+In [v14.0.0](https://github.com/stripe/stripe-python/releases/tag/v7.1.0) and newer, the library provides RBI
+static type annotations. See [the wiki](https://github.com/stripe/stripe-ruby/wiki/Static-Type-Annotations)
+for an detailed guide.
+
+Please note that these types are available only for static analysis and we only support RBIs at the moment.
+Please [report an issue](https://github.com/stripe/stripe-ruby/issues/new/choose)
+if you find discrepancies or have issues using types.
+
+The RBIs can be found in the `rbi/stripe/` directory, and to decrease `Tapioca` loading time we pack the gem with the
+combined RBI at `rbi/stripe.rbi`.
+
+#### Types and the Versioning Policy
+
+We release type changes in minor releases. While stripe-ruby follows semantic versioning, our semantic
+versions describe the runtime behavior of the library alone. Our type annotations are not reflected in the
+semantic version. That is, upgrading to a new minor version of `stripe-ruby` might result in your type checker
+producing a type error that it didn't before. You can use `~> x.x` or `x.x.x` constrain the version
+of `stripe-ruby` in your Gemfile to a certain version or range of `stripe-ruby`.
+
+#### Types and API Versions
+
+The types describe the [Stripe API version](https://stripe.com/docs/api/versioning)
+that was the latest at the time of release. This is the version that your library sends
+by default. If you are overriding `Stripe.api_version` / `stripe_version` on the StripeClient,
+or using a webhook endpoint tied to an older version, be aware that the data
+you see at runtime may not match the types.
+
### Beta SDKs
Stripe has features in the beta phase that can be accessed via the beta version of this package.
diff --git a/lib/stripe.rb b/lib/stripe.rb
index 7fb7a0cd..c0cb2476 100644
--- a/lib/stripe.rb
+++ b/lib/stripe.rb
@@ -33,6 +33,7 @@ require "stripe/errors"
require "stripe/object_types"
require "stripe/event_types"
require "stripe/request_options"
+require "stripe/request_params"
require "stripe/util"
require "stripe/connection_manager"
require "stripe/multipart_encoder"
diff --git a/lib/stripe/api_operations/request.rb b/lib/stripe/api_operations/request.rb
index fa0127e8..663d2d38 100644
--- a/lib/stripe/api_operations/request.rb
+++ b/lib/stripe/api_operations/request.rb
@@ -34,6 +34,7 @@ module Stripe
method, url, base_address,
params, opts, usage,
&read_body_chunk_block)
+ params = params.to_h if params.is_a?(Stripe::RequestParams)
params ||= {}
error_on_invalid_params(params)
diff --git a/lib/stripe/api_requestor.rb b/lib/stripe/api_requestor.rb
index 33eef40c..21f81504 100644
--- a/lib/stripe/api_requestor.rb
+++ b/lib/stripe/api_requestor.rb
@@ -196,6 +196,7 @@ module Stripe
def execute_request(method, path, base_address,
params: {}, opts: {}, usage: [])
+ params = params.to_h if params.is_a?(RequestParams)
http_resp, req_opts = execute_request_internal(
method, path, base_address, params, opts, usage
)
@@ -221,6 +222,7 @@ module Stripe
params: {}, opts: {}, usage: [])
opts = RequestOptions.combine_opts(object.instance_variable_get(:@opts), opts)
opts = Util.normalize_opts(opts)
+ params = params.to_h if params.is_a?(RequestParams)
http_resp, req_opts = execute_request_internal(
method, path, base_address, params, opts, usage
)
@@ -270,6 +272,7 @@ module Stripe
"execute_request_stream requires a read_body_chunk_block"
end
+ params = params.to_h if params.is_a?(RequestParams)
http_resp, api_key = execute_request_internal(
method, path, base_address, params, opts, usage, &read_body_chunk_block
)
diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb
index af0ab44b..50931a1a 100644
--- a/lib/stripe/object_types.rb
+++ b/lib/stripe/object_types.rb
@@ -16,6 +16,7 @@ module Stripe
AccountLink.object_name => AccountLink,
AccountSession.object_name => AccountSession,
ApplePayDomain.object_name => ApplePayDomain,
+ Application.object_name => Application,
ApplicationFee.object_name => ApplicationFee,
ApplicationFeeRefund.object_name => ApplicationFeeRefund,
Apps::Secret.object_name => Apps::Secret,
@@ -23,6 +24,7 @@ module Stripe
BalanceTransaction.object_name => BalanceTransaction,
BankAccount.object_name => BankAccount,
Billing::Alert.object_name => Billing::Alert,
+ Billing::AlertTriggered.object_name => Billing::AlertTriggered,
Billing::CreditBalanceSummary.object_name => Billing::CreditBalanceSummary,
Billing::CreditBalanceTransaction.object_name => Billing::CreditBalanceTransaction,
Billing::CreditGrant.object_name => Billing::CreditGrant,
@@ -41,6 +43,7 @@ module Stripe
Climate::Product.object_name => Climate::Product,
Climate::Supplier.object_name => Climate::Supplier,
ConfirmationToken.object_name => ConfirmationToken,
+ ConnectCollectionTransfer.object_name => ConnectCollectionTransfer,
CountrySpec.object_name => CountrySpec,
Coupon.object_name => Coupon,
CreditNote.object_name => CreditNote,
@@ -52,6 +55,7 @@ module Stripe
Discount.object_name => Discount,
Dispute.object_name => Dispute,
Entitlements::ActiveEntitlement.object_name => Entitlements::ActiveEntitlement,
+ Entitlements::ActiveEntitlementSummary.object_name => Entitlements::ActiveEntitlementSummary,
Entitlements::Feature.object_name => Entitlements::Feature,
EphemeralKey.object_name => EphemeralKey,
Event.object_name => Event,
@@ -102,6 +106,7 @@ module Stripe
Refund.object_name => Refund,
Reporting::ReportRun.object_name => Reporting::ReportRun,
Reporting::ReportType.object_name => Reporting::ReportType,
+ ReserveTransaction.object_name => ReserveTransaction,
Reversal.object_name => Reversal,
Review.object_name => Review,
SetupAttempt.object_name => SetupAttempt,
@@ -109,6 +114,7 @@ module Stripe
ShippingRate.object_name => ShippingRate,
Sigma::ScheduledQueryRun.object_name => Sigma::ScheduledQueryRun,
Source.object_name => Source,
+ SourceMandateNotification.object_name => SourceMandateNotification,
SourceTransaction.object_name => SourceTransaction,
Subscription.object_name => Subscription,
SubscriptionItem.object_name => SubscriptionItem,
@@ -120,6 +126,7 @@ module Stripe
Tax::Transaction.object_name => Tax::Transaction,
Tax::TransactionLineItem.object_name => Tax::TransactionLineItem,
TaxCode.object_name => TaxCode,
+ TaxDeductedAtSource.object_name => TaxDeductedAtSource,
TaxId.object_name => TaxId,
TaxRate.object_name => TaxRate,
Terminal::Configuration.object_name => Terminal::Configuration,
diff --git a/lib/stripe/request_params.rb b/lib/stripe/request_params.rb
new file mode 100644
index 00000000..1be0526a
--- /dev/null
+++ b/lib/stripe/request_params.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+# typed: true
+
+module Stripe
+ # For internal use only. Does not provide a stable API and may be broken
+ # with future non-major changes.
+ class RequestParams
+ def to_h
+ instance_variables.each_with_object({}) do |var, hash|
+ key = var.to_s.delete("@").to_sym
+ value = instance_variable_get(var)
+
+ hash[key] = if value.is_a?(RequestParams)
+ value.to_h
+ # Check if value is an array and contains RequestParams objects
+ elsif value.is_a?(Array)
+ value.map { |item| item.is_a?(RequestParams) ? item.to_h : item }
+ else
+ value
+ end
+ end
+ end
+ end
+end
diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb
index bd575637..30f29a38 100644
--- a/lib/stripe/resources.rb
+++ b/lib/stripe/resources.rb
@@ -5,6 +5,7 @@ require "stripe/resources/account"
require "stripe/resources/account_link"
require "stripe/resources/account_session"
require "stripe/resources/apple_pay_domain"
+require "stripe/resources/application"
require "stripe/resources/application_fee"
require "stripe/resources/application_fee_refund"
require "stripe/resources/apps/secret"
@@ -12,6 +13,7 @@ require "stripe/resources/balance"
require "stripe/resources/balance_transaction"
require "stripe/resources/bank_account"
require "stripe/resources/billing/alert"
+require "stripe/resources/billing/alert_triggered"
require "stripe/resources/billing/credit_balance_summary"
require "stripe/resources/billing/credit_balance_transaction"
require "stripe/resources/billing/credit_grant"
@@ -30,6 +32,7 @@ require "stripe/resources/climate/order"
require "stripe/resources/climate/product"
require "stripe/resources/climate/supplier"
require "stripe/resources/confirmation_token"
+require "stripe/resources/connect_collection_transfer"
require "stripe/resources/country_spec"
require "stripe/resources/coupon"
require "stripe/resources/credit_note"
@@ -41,6 +44,7 @@ require "stripe/resources/customer_session"
require "stripe/resources/discount"
require "stripe/resources/dispute"
require "stripe/resources/entitlements/active_entitlement"
+require "stripe/resources/entitlements/active_entitlement_summary"
require "stripe/resources/entitlements/feature"
require "stripe/resources/ephemeral_key"
require "stripe/resources/event"
@@ -91,6 +95,7 @@ require "stripe/resources/radar/value_list_item"
require "stripe/resources/refund"
require "stripe/resources/reporting/report_run"
require "stripe/resources/reporting/report_type"
+require "stripe/resources/reserve_transaction"
require "stripe/resources/reversal"
require "stripe/resources/review"
require "stripe/resources/setup_attempt"
@@ -98,6 +103,7 @@ require "stripe/resources/setup_intent"
require "stripe/resources/shipping_rate"
require "stripe/resources/sigma/scheduled_query_run"
require "stripe/resources/source"
+require "stripe/resources/source_mandate_notification"
require "stripe/resources/source_transaction"
require "stripe/resources/subscription"
require "stripe/resources/subscription_item"
@@ -109,6 +115,7 @@ require "stripe/resources/tax/settings"
require "stripe/resources/tax/transaction"
require "stripe/resources/tax/transaction_line_item"
require "stripe/resources/tax_code"
+require "stripe/resources/tax_deducted_at_source"
require "stripe/resources/tax_id"
require "stripe/resources/tax_rate"
require "stripe/resources/terminal/configuration"
diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb
index 8292bb9a..f3efdd20 100644
--- a/lib/stripe/resources/account.rb
+++ b/lib/stripe/resources/account.rb
@@ -34,6 +34,4612 @@ module Stripe
nested_resource_class_methods :login_link, operations: %i[create]
nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
+ class BusinessProfile < Stripe::StripeObject
+ class AnnualRevenue < Stripe::StripeObject
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ attr_reader :fiscal_year_end
+ end
+
+ class MonthlyEstimatedRevenue < Stripe::StripeObject
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ end
+
+ class SupportAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ attr_reader :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ attr_reader :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ attr_reader :mcc
+ # Attribute for field monthly_estimated_revenue
+ attr_reader :monthly_estimated_revenue
+ # The customer-facing business name.
+ attr_reader :name
+ # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.
+ attr_reader :product_description
+ # A publicly available mailing address for sending support issues to.
+ attr_reader :support_address
+ # A publicly available email address for sending support issues to.
+ attr_reader :support_email
+ # A publicly available phone number to call with support issues.
+ attr_reader :support_phone
+ # A publicly available website for handling support issues.
+ attr_reader :support_url
+ # The business's publicly available website.
+ attr_reader :url
+ end
+
+ class Capabilities < Stripe::StripeObject
+ # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.
+ attr_reader :acss_debit_payments
+ # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.
+ attr_reader :affirm_payments
+ # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.
+ attr_reader :afterpay_clearpay_payments
+ # The status of the Alma capability of the account, or whether the account can directly process Alma payments.
+ attr_reader :alma_payments
+ # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.
+ attr_reader :amazon_pay_payments
+ # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.
+ attr_reader :au_becs_debit_payments
+ # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.
+ attr_reader :bacs_debit_payments
+ # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.
+ attr_reader :bancontact_payments
+ # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.
+ attr_reader :bank_transfer_payments
+ # The status of the Billie capability of the account, or whether the account can directly process Billie payments.
+ attr_reader :billie_payments
+ # The status of the blik payments capability of the account, or whether the account can directly process blik charges.
+ attr_reader :blik_payments
+ # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.
+ attr_reader :boleto_payments
+ # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards
+ attr_reader :card_issuing
+ # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.
+ attr_reader :card_payments
+ # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.
+ attr_reader :cartes_bancaires_payments
+ # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.
+ attr_reader :cashapp_payments
+ # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.
+ attr_reader :eps_payments
+ # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.
+ attr_reader :fpx_payments
+ # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges.
+ attr_reader :gb_bank_transfer_payments
+ # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges.
+ attr_reader :giropay_payments
+ # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.
+ attr_reader :grabpay_payments
+ # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.
+ attr_reader :ideal_payments
+ # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.
+ attr_reader :india_international_payments
+ # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency.
+ attr_reader :jcb_payments
+ # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges.
+ attr_reader :jp_bank_transfer_payments
+ # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments.
+ attr_reader :kakao_pay_payments
+ # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges.
+ attr_reader :klarna_payments
+ # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges.
+ attr_reader :konbini_payments
+ # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments.
+ attr_reader :kr_card_payments
+ # The status of the legacy payments capability of the account.
+ attr_reader :legacy_payments
+ # The status of the link_payments capability of the account, or whether the account can directly process Link charges.
+ attr_reader :link_payments
+ # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.
+ attr_reader :mobilepay_payments
+ # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.
+ attr_reader :multibanco_payments
+ # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges.
+ attr_reader :mx_bank_transfer_payments
+ # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.
+ attr_reader :naver_pay_payments
+ # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.
+ attr_reader :oxxo_payments
+ # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges.
+ attr_reader :p24_payments
+ # The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.
+ attr_reader :pay_by_bank_payments
+ # The status of the Payco capability of the account, or whether the account can directly process Payco payments.
+ attr_reader :payco_payments
+ # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.
+ attr_reader :paynow_payments
+ # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
+ attr_reader :promptpay_payments
+ # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
+ attr_reader :revolut_pay_payments
+ # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments.
+ attr_reader :samsung_pay_payments
+ # The status of the Satispay capability of the account, or whether the account can directly process Satispay payments.
+ attr_reader :satispay_payments
+ # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges.
+ attr_reader :sepa_bank_transfer_payments
+ # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
+ attr_reader :sepa_debit_payments
+ # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.
+ attr_reader :sofort_payments
+ # The status of the Swish capability of the account, or whether the account can directly process Swish payments.
+ attr_reader :swish_payments
+ # The status of the tax reporting 1099-K (US) capability of the account.
+ attr_reader :tax_reporting_us_1099_k
+ # The status of the tax reporting 1099-MISC (US) capability of the account.
+ attr_reader :tax_reporting_us_1099_misc
+ # The status of the transfers capability of the account, or whether your platform can transfer funds to the account.
+ attr_reader :transfers
+ # The status of the banking capability, or whether the account can have bank accounts.
+ attr_reader :treasury
+ # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.
+ attr_reader :twint_payments
+ # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
+ attr_reader :us_bank_account_ach_payments
+ # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges.
+ attr_reader :us_bank_transfer_payments
+ # The status of the Zip capability of the account, or whether the account can directly process Zip charges.
+ attr_reader :zip_payments
+ end
+
+ class Company < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class AddressKana < Stripe::StripeObject
+ # City/Ward.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Block/Building number.
+ attr_reader :line1
+ # Building details.
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # Prefecture.
+ attr_reader :state
+ # Town/cho-me.
+ attr_reader :town
+ end
+
+ class AddressKanji < Stripe::StripeObject
+ # City/Ward.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Block/Building number.
+ attr_reader :line1
+ # Building details.
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # Prefecture.
+ attr_reader :state
+ # Town/cho-me.
+ attr_reader :town
+ end
+
+ class DirectorshipDeclaration < Stripe::StripeObject
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_reader :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_reader :ip
+ # The user-agent string from the browser where the directorship declaration attestation was made.
+ attr_reader :user_agent
+ end
+
+ class OwnershipDeclaration < Stripe::StripeObject
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_reader :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_reader :ip
+ # The user-agent string from the browser where the beneficial owner attestation was made.
+ attr_reader :user_agent
+ end
+
+ class Verification < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
+ attr_reader :back
+ # A user-displayable string describing the verification state of this document.
+ attr_reader :details
+ # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.
+ attr_reader :details_code
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
+ attr_reader :front
+ end
+ # Attribute for field document
+ attr_reader :document
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_reader :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_reader :address_kanji
+ # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).
+ attr_reader :directors_provided
+ # This hash is used to attest that the director information provided to Stripe is both current and correct.
+ attr_reader :directorship_declaration
+ # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.
+ attr_reader :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_reader :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_reader :export_purpose_code
+ # The company's legal name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :name
+ # The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :name_kana
+ # The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :name_kanji
+ # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).
+ attr_reader :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_reader :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_reader :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_reader :phone
+ # The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
+ attr_reader :structure
+ # Whether the company's business ID number was provided.
+ attr_reader :tax_id_provided
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_reader :tax_id_registrar
+ # Whether the company's business VAT number was provided.
+ attr_reader :vat_id_provided
+ # Information on the verification state of the company.
+ attr_reader :verification
+ end
+
+ class Controller < Stripe::StripeObject
+ class Fees < Stripe::StripeObject
+ # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
+ attr_reader :payer
+ end
+
+ class Losses < Stripe::StripeObject
+ # A value indicating who is liable when this account can't pay back negative balances from payments.
+ attr_reader :payments
+ end
+
+ class StripeDashboard < Stripe::StripeObject
+ # A value indicating the Stripe dashboard this account has access to independent of the Connect application.
+ attr_reader :type
+ end
+ # Attribute for field fees
+ attr_reader :fees
+ # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.
+ attr_reader :is_controller
+ # Attribute for field losses
+ attr_reader :losses
+ # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.
+ attr_reader :requirement_collection
+ # Attribute for field stripe_dashboard
+ attr_reader :stripe_dashboard
+ # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
+ attr_reader :type
+ end
+
+ class FutureRequirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ attr_reader :original_fields_due
+ end
+
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ attr_reader :alternatives
+ # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning.
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
+ attr_reader :currently_due
+ # This is typed as an enum for consistency with `requirements.disabled_reason`.
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.
+ attr_reader :eventually_due
+ # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+
+ class Groups < Stripe::StripeObject
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ attr_reader :payments_pricing
+ end
+
+ class Requirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ attr_reader :original_fields_due
+ end
+
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ attr_reader :alternatives
+ # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected.
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ attr_reader :currently_due
+ # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
+ attr_reader :eventually_due
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+
+ class Settings < Stripe::StripeObject
+ class BacsDebitPayments < Stripe::StripeObject
+ # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ attr_reader :display_name
+ # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners.
+ attr_reader :service_user_number
+ end
+
+ class Branding < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ attr_reader :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ attr_reader :logo
+ # A CSS hex color value representing the primary branding color for this account
+ attr_reader :primary_color
+ # A CSS hex color value representing the secondary branding color for this account
+ attr_reader :secondary_color
+ end
+
+ class CardIssuing < Stripe::StripeObject
+ class TosAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_reader :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_reader :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_reader :user_agent
+ end
+ # Attribute for field tos_acceptance
+ attr_reader :tos_acceptance
+ end
+
+ class CardPayments < Stripe::StripeObject
+ class DeclineOn < Stripe::StripeObject
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ attr_reader :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ attr_reader :cvc_failure
+ end
+ # Attribute for field decline_on
+ attr_reader :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ attr_reader :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ attr_reader :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ attr_reader :statement_descriptor_prefix_kanji
+ end
+
+ class Dashboard < Stripe::StripeObject
+ # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.
+ attr_reader :display_name
+ # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).
+ attr_reader :timezone
+ end
+
+ class Invoices < Stripe::StripeObject
+ # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
+ attr_reader :default_account_tax_ids
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ attr_reader :hosted_payment_method_save
+ end
+
+ class Payments < Stripe::StripeObject
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge.
+ attr_reader :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_reader :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_reader :statement_descriptor_kanji
+ # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_reader :statement_descriptor_prefix_kana
+ # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_reader :statement_descriptor_prefix_kanji
+ end
+
+ class Payouts < Stripe::StripeObject
+ class Schedule < Stripe::StripeObject
+ # The number of days charges for the account will be held before being paid out.
+ attr_reader :delay_days
+ # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
+ attr_reader :interval
+ # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
+ attr_reader :monthly_anchor
+ # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.
+ attr_reader :weekly_anchor
+ end
+ # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
+ attr_reader :debit_negative_balances
+ # Attribute for field schedule
+ attr_reader :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ attr_reader :statement_descriptor
+ end
+
+ class SepaDebitPayments < Stripe::StripeObject
+ # SEPA creditor identifier that identifies the company making the payment.
+ attr_reader :creditor_id
+ end
+
+ class Treasury < Stripe::StripeObject
+ class TosAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_reader :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_reader :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_reader :user_agent
+ end
+ # Attribute for field tos_acceptance
+ attr_reader :tos_acceptance
+ end
+ # Attribute for field bacs_debit_payments
+ attr_reader :bacs_debit_payments
+ # Attribute for field branding
+ attr_reader :branding
+ # Attribute for field card_issuing
+ attr_reader :card_issuing
+ # Attribute for field card_payments
+ attr_reader :card_payments
+ # Attribute for field dashboard
+ attr_reader :dashboard
+ # Attribute for field invoices
+ attr_reader :invoices
+ # Attribute for field payments
+ attr_reader :payments
+ # Attribute for field payouts
+ attr_reader :payouts
+ # Attribute for field sepa_debit_payments
+ attr_reader :sepa_debit_payments
+ # Attribute for field treasury
+ attr_reader :treasury
+ end
+
+ class TosAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the account representative accepted their service agreement
+ attr_reader :date
+ # The IP address from which the account representative accepted their service agreement
+ attr_reader :ip
+ # The user's service agreement type
+ attr_reader :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement
+ attr_reader :user_agent
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ )
+ @object = object
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @country = country
+ @currency = currency
+ @routing_number = routing_number
+ end
+ end
+
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ attr_accessor :fiscal_year_end
+
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil)
+ @amount = amount
+ @currency = currency
+ @fiscal_year_end = fiscal_year_end
+ end
+ end
+
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+
+ def initialize(amount: nil, currency: nil)
+ @amount = amount
+ @currency = currency
+ end
+ end
+
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ attr_accessor :support_url
+ # The business's publicly available website.
+ attr_accessor :url
+
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ )
+ @annual_revenue = annual_revenue
+ @estimated_worker_count = estimated_worker_count
+ @mcc = mcc
+ @monthly_estimated_revenue = monthly_estimated_revenue
+ @name = name
+ @product_description = product_description
+ @support_address = support_address
+ @support_email = support_email
+ @support_phone = support_phone
+ @support_url = support_url
+ @url = url
+ end
+ end
+
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # The acss_debit_payments capability.
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ attr_accessor :transfers
+ # The treasury capability.
+ attr_accessor :treasury
+ # The twint_payments capability.
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ attr_accessor :zip_payments
+
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ )
+ @acss_debit_payments = acss_debit_payments
+ @affirm_payments = affirm_payments
+ @afterpay_clearpay_payments = afterpay_clearpay_payments
+ @alma_payments = alma_payments
+ @amazon_pay_payments = amazon_pay_payments
+ @au_becs_debit_payments = au_becs_debit_payments
+ @bacs_debit_payments = bacs_debit_payments
+ @bancontact_payments = bancontact_payments
+ @bank_transfer_payments = bank_transfer_payments
+ @billie_payments = billie_payments
+ @blik_payments = blik_payments
+ @boleto_payments = boleto_payments
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @cartes_bancaires_payments = cartes_bancaires_payments
+ @cashapp_payments = cashapp_payments
+ @eps_payments = eps_payments
+ @fpx_payments = fpx_payments
+ @gb_bank_transfer_payments = gb_bank_transfer_payments
+ @giropay_payments = giropay_payments
+ @grabpay_payments = grabpay_payments
+ @ideal_payments = ideal_payments
+ @india_international_payments = india_international_payments
+ @jcb_payments = jcb_payments
+ @jp_bank_transfer_payments = jp_bank_transfer_payments
+ @kakao_pay_payments = kakao_pay_payments
+ @klarna_payments = klarna_payments
+ @konbini_payments = konbini_payments
+ @kr_card_payments = kr_card_payments
+ @legacy_payments = legacy_payments
+ @link_payments = link_payments
+ @mobilepay_payments = mobilepay_payments
+ @multibanco_payments = multibanco_payments
+ @mx_bank_transfer_payments = mx_bank_transfer_payments
+ @naver_pay_payments = naver_pay_payments
+ @oxxo_payments = oxxo_payments
+ @p24_payments = p24_payments
+ @pay_by_bank_payments = pay_by_bank_payments
+ @payco_payments = payco_payments
+ @paynow_payments = paynow_payments
+ @promptpay_payments = promptpay_payments
+ @revolut_pay_payments = revolut_pay_payments
+ @samsung_pay_payments = samsung_pay_payments
+ @satispay_payments = satispay_payments
+ @sepa_bank_transfer_payments = sepa_bank_transfer_payments
+ @sepa_debit_payments = sepa_debit_payments
+ @sofort_payments = sofort_payments
+ @swish_payments = swish_payments
+ @tax_reporting_us_1099_k = tax_reporting_us_1099_k
+ @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc
+ @transfers = transfers
+ @treasury = treasury
+ @twint_payments = twint_payments
+ @us_bank_account_ach_payments = us_bank_account_ach_payments
+ @us_bank_transfer_payments = us_bank_transfer_payments
+ @zip_payments = zip_payments
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field address_city
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field cvc
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ attr_accessor :exp_year
+ # Attribute for param field name
+ attr_accessor :name
+ # Attribute for param field number
+ attr_accessor :number
+ # 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.
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ attr_accessor :default_for_currency
+
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ )
+ @object = object
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @number = number
+ @metadata = metadata
+ @default_for_currency = default_for_currency
+ end
+ end
+
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field token
+ attr_accessor :token
+
+ def initialize(object: nil, currency: nil, token: nil)
+ @object = object
+ @currency = currency
+ @token = token
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document verifying the business.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # The company's primary address.
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @directors_provided = directors_provided
+ @directorship_declaration = directorship_declaration
+ @executives_provided = executives_provided
+ @export_license_id = export_license_id
+ @export_purpose_code = export_purpose_code
+ @name = name
+ @name_kana = name_kana
+ @name_kanji = name_kanji
+ @owners_provided = owners_provided
+ @ownership_declaration = ownership_declaration
+ @ownership_exemption_reason = ownership_exemption_reason
+ @phone = phone
+ @registration_number = registration_number
+ @structure = structure
+ @tax_id = tax_id
+ @tax_id_registrar = tax_id_registrar
+ @vat_id = vat_id
+ @verification = verification
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ )
+ @bank_account_ownership_verification = bank_account_ownership_verification
+ @company_license = company_license
+ @company_memorandum_of_association = company_memorandum_of_association
+ @company_ministerial_decree = company_ministerial_decree
+ @company_registration_verification = company_registration_verification
+ @company_tax_id_verification = company_tax_id_verification
+ @proof_of_registration = proof_of_registration
+ @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
+ end
+ end
+
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ attr_accessor :payments_pricing
+
+ def initialize(payments_pricing: nil)
+ @payments_pricing = payments_pricing
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ )
+ @director = director
+ @executive = executive
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # The individual's primary address.
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ attr_accessor :dob
+ # The individual's email address.
+ attr_accessor :email
+ # The individual's first name.
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The individual's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ attr_accessor :display_name
+
+ def initialize(display_name: nil)
+ @display_name = display_name
+ end
+ end
+
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ attr_accessor :secondary_color
+
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil)
+ @icon = icon
+ @logo = logo
+ @primary_color = primary_color
+ @secondary_color = secondary_color
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ attr_accessor :cvc_failure
+
+ def initialize(avs_failure: nil, cvc_failure: nil)
+ @avs_failure = avs_failure
+ @cvc_failure = cvc_failure
+ end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kanji
+
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ )
+ @decline_on = decline_on
+ @statement_descriptor_prefix = statement_descriptor_prefix
+ @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana
+ @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji
+ end
+ end
+
+ class Invoices < Stripe::RequestParams
+ # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
+ attr_accessor :default_account_tax_ids
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ attr_accessor :hosted_payment_method_save
+
+ def initialize(default_account_tax_ids: nil, hosted_payment_method_save: nil)
+ @default_account_tax_ids = default_account_tax_ids
+ @hosted_payment_method_save = hosted_payment_method_save
+ end
+ end
+
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kanji
+
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ )
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_kana = statement_descriptor_kana
+ @statement_descriptor_kanji = statement_descriptor_kanji
+ end
+ end
+
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ attr_accessor :weekly_anchor
+
+ def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
+ @delay_days = delay_days
+ @interval = interval
+ @monthly_anchor = monthly_anchor
+ @weekly_anchor = weekly_anchor
+ end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ attr_accessor :statement_descriptor
+
+ def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil)
+ @debit_negative_balances = debit_negative_balances
+ @schedule = schedule
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+ # Settings specific to Bacs Direct Debit payments.
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ attr_accessor :card_payments
+ # Settings specific to the account's use of Invoices.
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ attr_accessor :treasury
+
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ )
+ @bacs_debit_payments = bacs_debit_payments
+ @branding = branding
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @invoices = invoices
+ @payments = payments
+ @payouts = payouts
+ @treasury = treasury
+ end
+ end
+
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ attr_accessor :ip
+ # The user's service agreement type.
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @service_agreement = service_agreement
+ @user_agent = user_agent
+ end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ attr_accessor :account_token
+ # Business information about the account.
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :company
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ attr_accessor :tos_acceptance
+
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil
+ )
+ @account_token = account_token
+ @business_profile = business_profile
+ @business_type = business_type
+ @capabilities = capabilities
+ @company = company
+ @default_currency = default_currency
+ @documents = documents
+ @email = email
+ @expand = expand
+ @external_account = external_account
+ @groups = groups
+ @individual = individual
+ @metadata = metadata
+ @settings = settings
+ @tos_acceptance = tos_acceptance
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return connected accounts that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ )
+ @object = object
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @country = country
+ @currency = currency
+ @routing_number = routing_number
+ end
+ end
+
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ attr_accessor :fiscal_year_end
+
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil)
+ @amount = amount
+ @currency = currency
+ @fiscal_year_end = fiscal_year_end
+ end
+ end
+
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+
+ def initialize(amount: nil, currency: nil)
+ @amount = amount
+ @currency = currency
+ end
+ end
+
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ attr_accessor :support_url
+ # The business's publicly available website.
+ attr_accessor :url
+
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ )
+ @annual_revenue = annual_revenue
+ @estimated_worker_count = estimated_worker_count
+ @mcc = mcc
+ @monthly_estimated_revenue = monthly_estimated_revenue
+ @name = name
+ @product_description = product_description
+ @support_address = support_address
+ @support_email = support_email
+ @support_phone = support_phone
+ @support_url = support_url
+ @url = url
+ end
+ end
+
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # The acss_debit_payments capability.
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ attr_accessor :transfers
+ # The treasury capability.
+ attr_accessor :treasury
+ # The twint_payments capability.
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ attr_accessor :zip_payments
+
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ )
+ @acss_debit_payments = acss_debit_payments
+ @affirm_payments = affirm_payments
+ @afterpay_clearpay_payments = afterpay_clearpay_payments
+ @alma_payments = alma_payments
+ @amazon_pay_payments = amazon_pay_payments
+ @au_becs_debit_payments = au_becs_debit_payments
+ @bacs_debit_payments = bacs_debit_payments
+ @bancontact_payments = bancontact_payments
+ @bank_transfer_payments = bank_transfer_payments
+ @billie_payments = billie_payments
+ @blik_payments = blik_payments
+ @boleto_payments = boleto_payments
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @cartes_bancaires_payments = cartes_bancaires_payments
+ @cashapp_payments = cashapp_payments
+ @eps_payments = eps_payments
+ @fpx_payments = fpx_payments
+ @gb_bank_transfer_payments = gb_bank_transfer_payments
+ @giropay_payments = giropay_payments
+ @grabpay_payments = grabpay_payments
+ @ideal_payments = ideal_payments
+ @india_international_payments = india_international_payments
+ @jcb_payments = jcb_payments
+ @jp_bank_transfer_payments = jp_bank_transfer_payments
+ @kakao_pay_payments = kakao_pay_payments
+ @klarna_payments = klarna_payments
+ @konbini_payments = konbini_payments
+ @kr_card_payments = kr_card_payments
+ @legacy_payments = legacy_payments
+ @link_payments = link_payments
+ @mobilepay_payments = mobilepay_payments
+ @multibanco_payments = multibanco_payments
+ @mx_bank_transfer_payments = mx_bank_transfer_payments
+ @naver_pay_payments = naver_pay_payments
+ @oxxo_payments = oxxo_payments
+ @p24_payments = p24_payments
+ @pay_by_bank_payments = pay_by_bank_payments
+ @payco_payments = payco_payments
+ @paynow_payments = paynow_payments
+ @promptpay_payments = promptpay_payments
+ @revolut_pay_payments = revolut_pay_payments
+ @samsung_pay_payments = samsung_pay_payments
+ @satispay_payments = satispay_payments
+ @sepa_bank_transfer_payments = sepa_bank_transfer_payments
+ @sepa_debit_payments = sepa_debit_payments
+ @sofort_payments = sofort_payments
+ @swish_payments = swish_payments
+ @tax_reporting_us_1099_k = tax_reporting_us_1099_k
+ @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc
+ @transfers = transfers
+ @treasury = treasury
+ @twint_payments = twint_payments
+ @us_bank_account_ach_payments = us_bank_account_ach_payments
+ @us_bank_transfer_payments = us_bank_transfer_payments
+ @zip_payments = zip_payments
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field address_city
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field cvc
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ attr_accessor :exp_year
+ # Attribute for param field name
+ attr_accessor :name
+ # Attribute for param field number
+ attr_accessor :number
+ # 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.
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ attr_accessor :default_for_currency
+
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ )
+ @object = object
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @number = number
+ @metadata = metadata
+ @default_for_currency = default_for_currency
+ end
+ end
+
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field token
+ attr_accessor :token
+
+ def initialize(object: nil, currency: nil, token: nil)
+ @object = object
+ @currency = currency
+ @token = token
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document verifying the business.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # The company's primary address.
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @directors_provided = directors_provided
+ @directorship_declaration = directorship_declaration
+ @executives_provided = executives_provided
+ @export_license_id = export_license_id
+ @export_purpose_code = export_purpose_code
+ @name = name
+ @name_kana = name_kana
+ @name_kanji = name_kanji
+ @owners_provided = owners_provided
+ @ownership_declaration = ownership_declaration
+ @ownership_exemption_reason = ownership_exemption_reason
+ @phone = phone
+ @registration_number = registration_number
+ @structure = structure
+ @tax_id = tax_id
+ @tax_id_registrar = tax_id_registrar
+ @vat_id = vat_id
+ @verification = verification
+ end
+ end
+
+ class Controller < Stripe::RequestParams
+ class Fees < Stripe::RequestParams
+ # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
+ attr_accessor :payer
+
+ def initialize(payer: nil)
+ @payer = payer
+ end
+ end
+
+ class Losses < Stripe::RequestParams
+ # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
+ attr_accessor :payments
+
+ def initialize(payments: nil)
+ @payments = payments
+ end
+ end
+
+ class StripeDashboard < Stripe::RequestParams
+ # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # A hash of configuration for who pays Stripe fees for product usage on this account.
+ attr_accessor :fees
+ # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
+ attr_accessor :losses
+ # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
+ attr_accessor :requirement_collection
+ # A hash of configuration for Stripe-hosted dashboards.
+ attr_accessor :stripe_dashboard
+
+ def initialize(fees: nil, losses: nil, requirement_collection: nil, stripe_dashboard: nil)
+ @fees = fees
+ @losses = losses
+ @requirement_collection = requirement_collection
+ @stripe_dashboard = stripe_dashboard
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ )
+ @bank_account_ownership_verification = bank_account_ownership_verification
+ @company_license = company_license
+ @company_memorandum_of_association = company_memorandum_of_association
+ @company_ministerial_decree = company_ministerial_decree
+ @company_registration_verification = company_registration_verification
+ @company_tax_id_verification = company_tax_id_verification
+ @proof_of_registration = proof_of_registration
+ @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
+ end
+ end
+
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ attr_accessor :payments_pricing
+
+ def initialize(payments_pricing: nil)
+ @payments_pricing = payments_pricing
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ )
+ @director = director
+ @executive = executive
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # The individual's primary address.
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ attr_accessor :dob
+ # The individual's email address.
+ attr_accessor :email
+ # The individual's first name.
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The individual's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ attr_accessor :display_name
+
+ def initialize(display_name: nil)
+ @display_name = display_name
+ end
+ end
+
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ attr_accessor :secondary_color
+
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil)
+ @icon = icon
+ @logo = logo
+ @primary_color = primary_color
+ @secondary_color = secondary_color
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ attr_accessor :cvc_failure
+
+ def initialize(avs_failure: nil, cvc_failure: nil)
+ @avs_failure = avs_failure
+ @cvc_failure = cvc_failure
+ end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kanji
+
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ )
+ @decline_on = decline_on
+ @statement_descriptor_prefix = statement_descriptor_prefix
+ @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana
+ @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji
+ end
+ end
+
+ class Invoices < Stripe::RequestParams
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ attr_accessor :hosted_payment_method_save
+
+ def initialize(hosted_payment_method_save: nil)
+ @hosted_payment_method_save = hosted_payment_method_save
+ end
+ end
+
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kanji
+
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ )
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_kana = statement_descriptor_kana
+ @statement_descriptor_kanji = statement_descriptor_kanji
+ end
+ end
+
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ attr_accessor :weekly_anchor
+
+ def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
+ @delay_days = delay_days
+ @interval = interval
+ @monthly_anchor = monthly_anchor
+ @weekly_anchor = weekly_anchor
+ end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ attr_accessor :statement_descriptor
+
+ def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil)
+ @debit_negative_balances = debit_negative_balances
+ @schedule = schedule
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+ # Settings specific to Bacs Direct Debit.
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ attr_accessor :card_payments
+ # Settings specific to the account’s use of Invoices.
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ attr_accessor :treasury
+
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ )
+ @bacs_debit_payments = bacs_debit_payments
+ @branding = branding
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @invoices = invoices
+ @payments = payments
+ @payouts = payouts
+ @treasury = treasury
+ end
+ end
+
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ attr_accessor :ip
+ # The user's service agreement type.
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @service_agreement = service_agreement
+ @user_agent = user_agent
+ end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ attr_accessor :account_token
+ # Business information about the account.
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :company
+ # A hash of configuration describing the account controller's attributes.
+ attr_accessor :controller
+ # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
+ attr_accessor :country
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ attr_accessor :tos_acceptance
+ # The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
+ attr_accessor :type
+
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ controller: nil,
+ country: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil,
+ type: nil
+ )
+ @account_token = account_token
+ @business_profile = business_profile
+ @business_type = business_type
+ @capabilities = capabilities
+ @company = company
+ @controller = controller
+ @country = country
+ @default_currency = default_currency
+ @documents = documents
+ @email = email
+ @expand = expand
+ @external_account = external_account
+ @groups = groups
+ @individual = individual
+ @metadata = metadata
+ @settings = settings
+ @tos_acceptance = tos_acceptance
+ @type = type
+ end
+ end
+
+ class PersonsParams < Stripe::RequestParams
+ class Relationship < Stripe::RequestParams
+ # A filter on the list of people returned based on whether these people are authorizers of the account's representative.
+ attr_accessor :authorizer
+ # A filter on the list of people returned based on whether these people are directors of the account's company.
+ attr_accessor :director
+ # A filter on the list of people returned based on whether these people are executives of the account's company.
+ attr_accessor :executive
+ # A filter on the list of people returned based on whether these people are legal guardians of the account's representative.
+ attr_accessor :legal_guardian
+ # A filter on the list of people returned based on whether these people are owners of the account's company.
+ attr_accessor :owner
+ # A filter on the list of people returned based on whether these people are the representative of the account's company.
+ attr_accessor :representative
+
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ representative: nil
+ )
+ @authorizer = authorizer
+ @director = director
+ @executive = executive
+ @legal_guardian = legal_guardian
+ @owner = owner
+ @representative = representative
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filters on the list of people returned based on the person's relationship to the account's company.
+ attr_accessor :relationship
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ relationship: nil,
+ starting_after: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @relationship = relationship
+ @starting_after = starting_after
+ end
+ end
+
+ class RejectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.
+ attr_accessor :reason
+
+ def initialize(expand: nil, reason: nil)
+ @expand = expand
+ @reason = reason
+ end
+ end
+ # Business information about the account.
+ attr_reader :business_profile
+ # The business type.
+ attr_reader :business_type
+ # Attribute for field capabilities
+ attr_reader :capabilities
+ # Whether the account can process charges.
+ attr_reader :charges_enabled
+ # Attribute for field company
+ attr_reader :company
+ # Attribute for field controller
+ attr_reader :controller
+ # The account's country.
+ attr_reader :country
+ # Time at which the account was connected. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).
+ attr_reader :default_currency
+ # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details.
+ attr_reader :details_submitted
+ # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
+ attr_reader :email
+ # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true.
+ attr_reader :external_accounts
+ # Attribute for field future_requirements
+ attr_reader :future_requirements
+ # The groups associated with the account.
+ attr_reader :groups
+ # Unique identifier for the object.
+ attr_reader :id
+ # This is an object representing a person associated with a Stripe account.
+ #
+ # A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
+ #
+ # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information).
+ attr_reader :individual
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Whether the funds in this account can be paid out.
+ attr_reader :payouts_enabled
+ # Attribute for field requirements
+ attr_reader :requirements
+ # Options for customizing how the account functions within Stripe.
+ attr_reader :settings
+ # Attribute for field tos_acceptance
+ attr_reader :tos_acceptance
+ # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`.
+ attr_reader :type
+ # Always true for a deleted object
+ attr_reader :deleted
+
# With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
# To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
#
diff --git a/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb
index 49a1bffd..025308b8 100644
--- a/lib/stripe/resources/account_link.rb
+++ b/lib/stripe/resources/account_link.rb
@@ -14,6 +14,60 @@ module Stripe
"account_link"
end
+ class CreateParams < Stripe::RequestParams
+ class CollectionOptions < Stripe::RequestParams
+ # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
+ attr_accessor :fields
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
+ attr_accessor :future_requirements
+
+ def initialize(fields: nil, future_requirements: nil)
+ @fields = fields
+ @future_requirements = future_requirements
+ end
+ end
+ # The identifier of the account to create an account link for.
+ attr_accessor :account
+ # The collect parameter is deprecated. Use `collection_options` instead.
+ attr_accessor :collect
+ # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
+ attr_accessor :collection_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
+ attr_accessor :refresh_url
+ # The URL that the user will be redirected to upon leaving or completing the linked flow.
+ attr_accessor :return_url
+ # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
+ attr_accessor :type
+
+ def initialize(
+ account: nil,
+ collect: nil,
+ collection_options: nil,
+ expand: nil,
+ refresh_url: nil,
+ return_url: nil,
+ type: nil
+ )
+ @account = account
+ @collect = collect
+ @collection_options = collection_options
+ @expand = expand
+ @refresh_url = refresh_url
+ @return_url = return_url
+ @type = type
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The timestamp at which this account link will expire.
+ attr_reader :expires_at
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The URL for the account link.
+ attr_reader :url
+
# Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/account_links", params: params, opts: opts)
diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb
index 847edd7d..6a62b431 100644
--- a/lib/stripe/resources/account_session.rb
+++ b/lib/stripe/resources/account_session.rb
@@ -17,6 +17,745 @@ module Stripe
"account_session"
end
+ class Components < Stripe::StripeObject
+ class AccountManagement < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_reader :external_account_collection
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class AccountOnboarding < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_reader :external_account_collection
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class Balances < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_reader :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_reader :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_reader :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_reader :standard_payouts
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class Documents < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class FinancialAccount < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow external accounts to be linked for money transfer.
+ attr_reader :external_account_collection
+ # Whether to allow sending money.
+ attr_reader :send_money
+ # Whether to allow transferring balance.
+ attr_reader :transfer_balance
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class FinancialAccountTransactions < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow card spend dispute management features.
+ attr_reader :card_spend_dispute_management
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class IssuingCard < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow card management features.
+ attr_reader :card_management
+ # Whether to allow card spend dispute management features.
+ attr_reader :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ attr_reader :cardholder_management
+ # Whether to allow spend control management features.
+ attr_reader :spend_control_management
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class IssuingCardsList < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow card management features.
+ attr_reader :card_management
+ # Whether to allow card spend dispute management features.
+ attr_reader :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ attr_reader :cardholder_management
+ # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow spend control management features.
+ attr_reader :spend_control_management
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class NotificationBanner < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_reader :external_account_collection
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class PaymentDetails < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ attr_reader :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ attr_reader :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ attr_reader :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ attr_reader :refund_management
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class Payments < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ attr_reader :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ attr_reader :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ attr_reader :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ attr_reader :refund_management
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class Payouts < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_reader :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_reader :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_reader :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_reader :standard_payouts
+ end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class PayoutsList < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class TaxRegistrations < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+
+ class TaxSettings < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ attr_reader :enabled
+ # Attribute for field features
+ attr_reader :features
+ end
+ # Attribute for field account_management
+ attr_reader :account_management
+ # Attribute for field account_onboarding
+ attr_reader :account_onboarding
+ # Attribute for field balances
+ attr_reader :balances
+ # Attribute for field documents
+ attr_reader :documents
+ # Attribute for field financial_account
+ attr_reader :financial_account
+ # Attribute for field financial_account_transactions
+ attr_reader :financial_account_transactions
+ # Attribute for field issuing_card
+ attr_reader :issuing_card
+ # Attribute for field issuing_cards_list
+ attr_reader :issuing_cards_list
+ # Attribute for field notification_banner
+ attr_reader :notification_banner
+ # Attribute for field payment_details
+ attr_reader :payment_details
+ # Attribute for field payments
+ attr_reader :payments
+ # Attribute for field payouts
+ attr_reader :payouts
+ # Attribute for field payouts_list
+ attr_reader :payouts_list
+ # Attribute for field tax_registrations
+ attr_reader :tax_registrations
+ # Attribute for field tax_settings
+ attr_reader :tax_settings
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class AccountManagement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class AccountOnboarding < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Balances < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :standard_payouts
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @edit_payout_schedule = edit_payout_schedule
+ @external_account_collection = external_account_collection
+ @instant_payouts = instant_payouts
+ @standard_payouts = standard_payouts
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class FinancialAccount < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow external accounts to be linked for money transfer.
+ attr_accessor :external_account_collection
+ # Whether to allow sending money.
+ attr_accessor :send_money
+ # Whether to allow transferring balance.
+ attr_accessor :transfer_balance
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil,
+ send_money: nil,
+ transfer_balance: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ @send_money = send_money
+ @transfer_balance = transfer_balance
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class FinancialAccountTransactions < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card spend dispute management features.
+ attr_accessor :card_spend_dispute_management
+
+ def initialize(card_spend_dispute_management: nil)
+ @card_spend_dispute_management = card_spend_dispute_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class IssuingCard < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ attr_accessor :cardholder_management
+ # Whether to allow spend control management features.
+ attr_accessor :spend_control_management
+
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ spend_control_management: nil
+ )
+ @card_management = card_management
+ @card_spend_dispute_management = card_spend_dispute_management
+ @cardholder_management = cardholder_management
+ @spend_control_management = spend_control_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class IssuingCardsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ attr_accessor :cardholder_management
+ # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow spend control management features.
+ attr_accessor :spend_control_management
+
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ disable_stripe_user_authentication: nil,
+ spend_control_management: nil
+ )
+ @card_management = card_management
+ @card_spend_dispute_management = card_spend_dispute_management
+ @cardholder_management = cardholder_management
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @spend_control_management = spend_control_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class NotificationBanner < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class PaymentDetails < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ attr_accessor :refund_management
+
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ )
+ @capture_payments = capture_payments
+ @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management
+ @dispute_management = dispute_management
+ @refund_management = refund_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Payments < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ attr_accessor :refund_management
+
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ )
+ @capture_payments = capture_payments
+ @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management
+ @dispute_management = dispute_management
+ @refund_management = refund_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Payouts < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :standard_payouts
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @edit_payout_schedule = edit_payout_schedule
+ @external_account_collection = external_account_collection
+ @instant_payouts = instant_payouts
+ @standard_payouts = standard_payouts
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class PayoutsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class TaxRegistrations < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class TaxSettings < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+ # Configuration for the account management embedded component.
+ attr_accessor :account_management
+ # Configuration for the account onboarding embedded component.
+ attr_accessor :account_onboarding
+ # Configuration for the balances embedded component.
+ attr_accessor :balances
+ # Configuration for the documents embedded component.
+ attr_accessor :documents
+ # Configuration for the financial account embedded component.
+ attr_accessor :financial_account
+ # Configuration for the financial account transactions embedded component.
+ attr_accessor :financial_account_transactions
+ # Configuration for the issuing card embedded component.
+ attr_accessor :issuing_card
+ # Configuration for the issuing cards list embedded component.
+ attr_accessor :issuing_cards_list
+ # Configuration for the notification banner embedded component.
+ attr_accessor :notification_banner
+ # Configuration for the payment details embedded component.
+ attr_accessor :payment_details
+ # Configuration for the payments embedded component.
+ attr_accessor :payments
+ # Configuration for the payouts embedded component.
+ attr_accessor :payouts
+ # Configuration for the payouts list embedded component.
+ attr_accessor :payouts_list
+ # Configuration for the tax registrations embedded component.
+ attr_accessor :tax_registrations
+ # Configuration for the tax settings embedded component.
+ attr_accessor :tax_settings
+
+ def initialize(
+ account_management: nil,
+ account_onboarding: nil,
+ balances: nil,
+ documents: nil,
+ financial_account: nil,
+ financial_account_transactions: nil,
+ issuing_card: nil,
+ issuing_cards_list: nil,
+ notification_banner: nil,
+ payment_details: nil,
+ payments: nil,
+ payouts: nil,
+ payouts_list: nil,
+ tax_registrations: nil,
+ tax_settings: nil
+ )
+ @account_management = account_management
+ @account_onboarding = account_onboarding
+ @balances = balances
+ @documents = documents
+ @financial_account = financial_account
+ @financial_account_transactions = financial_account_transactions
+ @issuing_card = issuing_card
+ @issuing_cards_list = issuing_cards_list
+ @notification_banner = notification_banner
+ @payment_details = payment_details
+ @payments = payments
+ @payouts = payouts
+ @payouts_list = payouts_list
+ @tax_registrations = tax_registrations
+ @tax_settings = tax_settings
+ end
+ end
+ # The identifier of the account to create an Account Session for.
+ attr_accessor :account
+ # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
+ attr_accessor :components
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(account: nil, components: nil, expand: nil)
+ @account = account
+ @components = components
+ @expand = expand
+ end
+ end
+ # The ID of the account the AccountSession was created for
+ attr_reader :account
+ # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.
+ #
+ # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
+ #
+ # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
+ attr_reader :client_secret
+ # Attribute for field components
+ attr_reader :components
+ # The timestamp at which this AccountSession will expire.
+ attr_reader :expires_at
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/account_sessions", params: params, opts: opts)
diff --git a/lib/stripe/resources/apple_pay_domain.rb b/lib/stripe/resources/apple_pay_domain.rb
index c3b342e3..712f29bc 100644
--- a/lib/stripe/resources/apple_pay_domain.rb
+++ b/lib/stripe/resources/apple_pay_domain.rb
@@ -13,6 +13,60 @@ module Stripe
"apple_pay_domain"
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ attr_accessor :domain_name
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ domain_name: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @domain_name = domain_name
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ attr_accessor :domain_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(domain_name: nil, expand: nil)
+ @domain_name = domain_name
+ @expand = expand
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Attribute for field domain_name
+ attr_reader :domain_name
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Create an apple pay domain.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/application.rb b/lib/stripe/resources/application.rb
new file mode 100644
index 00000000..1e97598e
--- /dev/null
+++ b/lib/stripe/resources/application.rb
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ class Application < APIResource
+ OBJECT_NAME = "application"
+ def self.object_name
+ "application"
+ end
+
+ # Unique identifier for the object.
+ attr_reader :id
+ # The name of the application.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Always true for a deleted object
+ attr_reader :deleted
+ end
+end
diff --git a/lib/stripe/resources/application_fee.rb b/lib/stripe/resources/application_fee.rb
index 9aeb97ae..912da16d 100644
--- a/lib/stripe/resources/application_fee.rb
+++ b/lib/stripe/resources/application_fee.rb
@@ -13,6 +13,93 @@ module Stripe
nested_resource_class_methods :refund, operations: %i[create retrieve update list]
+ class FeeSource < Stripe::StripeObject
+ # Charge ID that created this application fee.
+ attr_reader :charge
+ # Payout ID that created this application fee.
+ attr_reader :payout
+ # Type of object that created the application fee.
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return application fees for the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return applications fees that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # ID of the Stripe account this fee was taken from.
+ attr_reader :account
+ # Amount earned, in cents (or local equivalent).
+ attr_reader :amount
+ # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)
+ attr_reader :amount_refunded
+ # ID of the Connect application that earned the fee.
+ attr_reader :application
+ # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
+ attr_reader :balance_transaction
+ # ID of the charge that the application fee was taken from.
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
+ attr_reader :fee_source
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.
+ attr_reader :originating_transaction
+ # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
+ attr_reader :refunded
+ # A list of refunds that have been applied to the fee.
+ attr_reader :refunds
+
# Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts)
diff --git a/lib/stripe/resources/application_fee_refund.rb b/lib/stripe/resources/application_fee_refund.rb
index 45dba49f..1878dd6f 100644
--- a/lib/stripe/resources/application_fee_refund.rb
+++ b/lib/stripe/resources/application_fee_refund.rb
@@ -15,6 +15,23 @@ module Stripe
"fee_refund"
end
+ # Amount, in cents (or local equivalent).
+ attr_reader :amount
+ # Balance transaction that describes the impact on your account balance.
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # ID of the application fee that was refunded.
+ attr_reader :fee
+ # Unique identifier for the object.
+ attr_reader :id
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
def resource_url
"#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \
"/#{CGI.escape(id)}"
diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb
index db34cbc4..cee705f0 100644
--- a/lib/stripe/resources/apps/secret.rb
+++ b/lib/stripe/resources/apps/secret.rb
@@ -21,6 +21,147 @@ module Stripe
"apps.secret"
end
+ class Scope < Stripe::StripeObject
+ # The secret scope type.
+ attr_reader :type
+ # The user ID, if type is set to "user"
+ attr_reader :user
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, scope: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @scope = scope
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The Unix timestamp for the expiry time of the secret, after which the secret deletes.
+ attr_accessor :expires_at
+ # A name for the secret that's unique within the scope.
+ attr_accessor :name
+ # The plaintext secret value to be stored.
+ attr_accessor :payload
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+
+ def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @name = name
+ @payload = payload
+ @scope = scope
+ end
+ end
+
+ class FindParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+
+ def initialize(expand: nil, name: nil, scope: nil)
+ @expand = expand
+ @name = name
+ @scope = scope
+ end
+ end
+
+ class DeleteWhereParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+
+ def initialize(expand: nil, name: nil, scope: nil)
+ @expand = expand
+ @name = name
+ @scope = scope
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # If true, indicates that this secret has been deleted
+ attr_reader :deleted
+ # The Unix timestamp for the expiry time of the secret, after which the secret deletes.
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # A name for the secret that's unique within the scope.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The plaintext secret value to be stored.
+ attr_reader :payload
+ # Attribute for field scope
+ attr_reader :scope
+
# Create or replace a secret in the secret store.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/apps/secrets", params: params, opts: opts)
diff --git a/lib/stripe/resources/balance.rb b/lib/stripe/resources/balance.rb
index 141c4190..ab384cfd 100644
--- a/lib/stripe/resources/balance.rb
+++ b/lib/stripe/resources/balance.rb
@@ -18,5 +18,127 @@ module Stripe
def self.object_name
"balance"
end
+
+ class Available < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ attr_reader :fpx
+ end
+ # Balance amount.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # Attribute for field source_types
+ attr_reader :source_types
+ end
+
+ class ConnectReserved < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ attr_reader :fpx
+ end
+ # Balance amount.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # Attribute for field source_types
+ attr_reader :source_types
+ end
+
+ class InstantAvailable < Stripe::StripeObject
+ class NetAvailable < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ attr_reader :fpx
+ end
+ # Net balance amount, subtracting fees from platform-set pricing.
+ attr_reader :amount
+ # ID of the external account for this net balance (not expandable).
+ attr_reader :destination
+ # Attribute for field source_types
+ attr_reader :source_types
+ end
+
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ attr_reader :fpx
+ end
+ # Balance amount.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # Breakdown of balance by destination.
+ attr_reader :net_available
+ # Attribute for field source_types
+ attr_reader :source_types
+ end
+
+ class Issuing < Stripe::StripeObject
+ class Available < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ attr_reader :fpx
+ end
+ # Balance amount.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # Attribute for field source_types
+ attr_reader :source_types
+ end
+ # Funds that are available for use.
+ attr_reader :available
+ end
+
+ class Pending < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ attr_reader :fpx
+ end
+ # Balance amount.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # Attribute for field source_types
+ attr_reader :source_types
+ end
+ # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
+ attr_reader :available
+ # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
+ attr_reader :connect_reserved
+ # Funds that you can pay out using Instant Payouts.
+ attr_reader :instant_available
+ # Attribute for field issuing
+ attr_reader :issuing
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.
+ attr_reader :pending
end
end
diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb
index 27c72e09..0988c832 100644
--- a/lib/stripe/resources/balance_transaction.rb
+++ b/lib/stripe/resources/balance_transaction.rb
@@ -14,6 +14,109 @@ module Stripe
"balance_transaction"
end
+ class FeeDetail < Stripe::StripeObject
+ # Amount of the fee, in cents.
+ attr_reader :amount
+ # ID of the Connect application that earned the fee.
+ attr_reader :application
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return transactions that were created during the given date interval.
+ attr_accessor :created
+ # Only return transactions in a certain currency. 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).
+ attr_accessor :currency
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
+ attr_accessor :payout
+ # Only returns the original transaction.
+ attr_accessor :source
+ # 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.
+ attr_accessor :starting_after
+ # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
+ attr_accessor :type
+
+ def initialize(
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payout: nil,
+ source: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @created = created
+ @currency = currency
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payout = payout
+ @source = source
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+ # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
+ attr_reader :amount
+ # The date that the transaction's net funds become available in the Stripe balance.
+ attr_reader :available_on
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
+ attr_reader :exchange_rate
+ # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
+ attr_reader :fee
+ # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
+ attr_reader :fee_details
+ # Unique identifier for the object.
+ attr_reader :id
+ # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`
+ attr_reader :net
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
+ attr_reader :reporting_category
+ # This transaction relates to the Stripe object.
+ attr_reader :source
+ # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
+ attr_reader :status
+ # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
+ attr_reader :type
+
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
#
# Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb
index 8a7edeaf..493385e4 100644
--- a/lib/stripe/resources/bank_account.rb
+++ b/lib/stripe/resources/bank_account.rb
@@ -19,6 +19,86 @@ module Stripe
"bank_account"
end
+ class FutureRequirements < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+
+ class Requirements < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+ # The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
+ attr_reader :account
+ # The name of the person or business that owns the bank account.
+ attr_reader :account_holder_name
+ # The type of entity that holds the account. This can be either `individual` or `company`.
+ attr_reader :account_holder_type
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ attr_reader :account_type
+ # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
+ attr_reader :available_payout_methods
+ # Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
+ attr_reader :bank_name
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
+ attr_reader :currency
+ # The ID of the customer that the bank account is associated with.
+ attr_reader :customer
+ # Whether this bank account is the default external account for its currency.
+ attr_reader :default_for_currency
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
+ attr_reader :future_requirements
+ # Unique identifier for the object.
+ attr_reader :id
+ # The last four digits of the bank account number.
+ attr_reader :last4
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Information about the requirements for the bank account, including what information needs to be collected.
+ attr_reader :requirements
+ # The routing transit number for the bank account.
+ attr_reader :routing_number
+ # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
+ #
+ # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
+ attr_reader :status
+ # Always true for a deleted object
+ attr_reader :deleted
+
def verify(params = {}, opts = {})
request_stripe_object(
method: :post,
@@ -38,10 +118,12 @@ module Stripe
end
def resource_url
- if respond_to?(:customer)
+ if !customer.nil?
"#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
- elsif respond_to?(:account)
+ elsif !account.nil?
"#{Account.resource_url}/#{CGI.escape(account)}/external_accounts/#{CGI.escape(id)}"
+ else
+ raise InvalidRequestError, "Could not determine which URL to request: [account, customer] fields are all null"
end
end
diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb
index 7f933099..f34b91c8 100644
--- a/lib/stripe/resources/billing/alert.rb
+++ b/lib/stripe/resources/billing/alert.rb
@@ -13,6 +13,141 @@ module Stripe
"billing.alert"
end
+ class UsageThreshold < Stripe::StripeObject
+ class Filter < Stripe::StripeObject
+ # Limit the scope of the alert to this customer ID
+ attr_reader :customer
+ # Attribute for field type
+ attr_reader :type
+ end
+ # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ attr_reader :filters
+ # The value at which this alert will trigger.
+ attr_reader :gte
+ # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
+ attr_reader :meter
+ # Defines how the alert will behave.
+ attr_reader :recurrence
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Filter results to only include this type of alert.
+ attr_accessor :alert_type
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filter results to only include alerts with the given meter.
+ attr_accessor :meter
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ alert_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ meter: nil,
+ starting_after: nil
+ )
+ @alert_type = alert_type
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @meter = meter
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class UsageThreshold < Stripe::RequestParams
+ class Filter < Stripe::RequestParams
+ # Limit the scope to this usage alert only to this customer.
+ attr_accessor :customer
+ # What type of filter is being applied to this usage alert.
+ attr_accessor :type
+
+ def initialize(customer: nil, type: nil)
+ @customer = customer
+ @type = type
+ end
+ end
+ # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ attr_accessor :filters
+ # Defines at which value the alert will fire.
+ attr_accessor :gte
+ # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
+ attr_accessor :meter
+ # Whether the alert should only fire only once, or once per billing cycle.
+ attr_accessor :recurrence
+
+ def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil)
+ @filters = filters
+ @gte = gte
+ @meter = meter
+ @recurrence = recurrence
+ end
+ end
+ # The type of alert to create.
+ attr_accessor :alert_type
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The title of the alert.
+ attr_accessor :title
+ # The configuration of the usage threshold.
+ attr_accessor :usage_threshold
+
+ def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil)
+ @alert_type = alert_type
+ @expand = expand
+ @title = title
+ @usage_threshold = usage_threshold
+ end
+ end
+
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Defines the type of the alert.
+ attr_reader :alert_type
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Status of the alert. This can be active, inactive or archived.
+ attr_reader :status
+ # Title of the alert.
+ attr_reader :title
+ # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).
+ attr_reader :usage_threshold
+
# Reactivates this alert, allowing it to trigger again.
def activate(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/billing/alert_triggered.rb b/lib/stripe/resources/billing/alert_triggered.rb
new file mode 100644
index 00000000..e89df938
--- /dev/null
+++ b/lib/stripe/resources/billing/alert_triggered.rb
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ module Billing
+ class AlertTriggered < APIResource
+ OBJECT_NAME = "billing.alert_triggered"
+ def self.object_name
+ "billing.alert_triggered"
+ end
+
+ # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
+ attr_reader :alert
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # ID of customer for which the alert triggered
+ attr_reader :customer
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The value triggering the alert
+ attr_reader :value
+ end
+ end
+end
diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb
index 928967a0..416dbcde 100644
--- a/lib/stripe/resources/billing/credit_balance_summary.rb
+++ b/lib/stripe/resources/billing/credit_balance_summary.rb
@@ -9,6 +9,46 @@ module Stripe
def self.object_name
"billing.credit_balance_summary"
end
+
+ class Balance < Stripe::StripeObject
+ class AvailableBalance < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ attr_reader :currency
+ # A positive integer representing the amount.
+ attr_reader :value
+ end
+ # The monetary amount.
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ attr_reader :type
+ end
+
+ class LedgerBalance < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ attr_reader :currency
+ # A positive integer representing the amount.
+ attr_reader :value
+ end
+ # The monetary amount.
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ attr_reader :type
+ end
+ # Attribute for field available_balance
+ attr_reader :available_balance
+ # Attribute for field ledger_balance
+ attr_reader :ledger_balance
+ end
+ # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
+ attr_reader :balances
+ # The customer the balance is for.
+ attr_reader :customer
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
end
end
end
diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb
index e7590b34..44738f28 100644
--- a/lib/stripe/resources/billing/credit_balance_transaction.rb
+++ b/lib/stripe/resources/billing/credit_balance_transaction.rb
@@ -12,6 +12,113 @@ module Stripe
"billing.credit_balance_transaction"
end
+ class Credit < Stripe::StripeObject
+ class Amount < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ attr_reader :currency
+ # A positive integer representing the amount.
+ attr_reader :value
+ end
+ # The monetary amount.
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ attr_reader :type
+ end
+
+ class CreditsApplicationInvoiceVoided < Stripe::StripeObject
+ # The invoice to which the reinstated billing credits were originally applied.
+ attr_reader :invoice
+ # The invoice line item to which the reinstated billing credits were originally applied.
+ attr_reader :invoice_line_item
+ end
+ # Attribute for field amount
+ attr_reader :amount
+ # Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
+ attr_reader :credits_application_invoice_voided
+ # The type of credit transaction.
+ attr_reader :type
+ end
+
+ class Debit < Stripe::StripeObject
+ class Amount < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ attr_reader :currency
+ # A positive integer representing the amount.
+ attr_reader :value
+ end
+ # The monetary amount.
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ attr_reader :type
+ end
+
+ class CreditsApplied < Stripe::StripeObject
+ # The invoice to which the billing credits were applied.
+ attr_reader :invoice
+ # The invoice line item to which the billing credits were applied.
+ attr_reader :invoice_line_item
+ end
+ # Attribute for field amount
+ attr_reader :amount
+ # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.
+ attr_reader :credits_applied
+ # The type of debit transaction.
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ # The credit grant for which to fetch credit balance transactions.
+ attr_accessor :credit_grant
+ # The customer for which to fetch credit balance transactions.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ credit_grant: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @credit_grant = credit_grant
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Credit details for this credit balance transaction. Only present if type is `credit`.
+ attr_reader :credit
+ # The credit grant associated with this credit balance transaction.
+ attr_reader :credit_grant
+ # Debit details for this credit balance transaction. Only present if type is `debit`.
+ attr_reader :debit
+ # The effective time of this credit balance transaction.
+ attr_reader :effective_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the test clock this credit balance transaction belongs to.
+ attr_reader :test_clock
+ # The type of credit balance transaction (credit or debit).
+ attr_reader :type
+
# Retrieve a list of credit balance transactions.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb
index 97a63b26..7dd0f72b 100644
--- a/lib/stripe/resources/billing/credit_grant.rb
+++ b/lib/stripe/resources/billing/credit_grant.rb
@@ -16,6 +16,223 @@ module Stripe
"billing.credit_grant"
end
+ class Amount < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ attr_reader :currency
+ # A positive integer representing the amount.
+ attr_reader :value
+ end
+ # The monetary amount.
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ attr_reader :type
+ end
+
+ class ApplicabilityConfig < Stripe::StripeObject
+ class Scope < Stripe::StripeObject
+ class Price < Stripe::StripeObject
+ # Unique identifier for the object.
+ attr_reader :id
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`.
+ attr_reader :price_type
+ # The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`.
+ attr_reader :prices
+ end
+ # Attribute for field scope
+ attr_reader :scope
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Only return credit grants for this customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ class Monetary < Stripe::RequestParams
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
+ attr_accessor :currency
+ # A positive integer representing the amount of the credit grant.
+ attr_accessor :value
+
+ def initialize(currency: nil, value: nil)
+ @currency = currency
+ @value = value
+ end
+ end
+ # The monetary amount.
+ attr_accessor :monetary
+ # Specify the type of this amount. We currently only support `monetary` billing credits.
+ attr_accessor :type
+
+ def initialize(monetary: nil, type: nil)
+ @monetary = monetary
+ @type = type
+ end
+ end
+
+ class ApplicabilityConfig < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ class Price < Stripe::RequestParams
+ # The price ID this credit grant should apply to.
+ attr_accessor :id
+
+ def initialize(id: nil)
+ @id = id
+ end
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ attr_accessor :price_type
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ attr_accessor :prices
+
+ def initialize(price_type: nil, prices: nil)
+ @price_type = price_type
+ @prices = prices
+ end
+ end
+ # Specify the scope of this applicability config.
+ attr_accessor :scope
+
+ def initialize(scope: nil)
+ @scope = scope
+ end
+ end
+ # Amount of this credit grant.
+ attr_accessor :amount
+ # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
+ attr_accessor :applicability_config
+ # The category of this credit grant.
+ attr_accessor :category
+ # ID of the customer to receive the billing credits.
+ attr_accessor :customer
+ # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The time when the billing credits expire. If not specified, the billing credits don't expire.
+ attr_accessor :expires_at
+ # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ attr_accessor :metadata
+ # A descriptive name shown in the Dashboard.
+ attr_accessor :name
+ # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
+ attr_accessor :priority
+
+ def initialize(
+ amount: nil,
+ applicability_config: nil,
+ category: nil,
+ customer: nil,
+ effective_at: nil,
+ expand: nil,
+ expires_at: nil,
+ metadata: nil,
+ name: nil,
+ priority: nil
+ )
+ @amount = amount
+ @applicability_config = applicability_config
+ @category = category
+ @customer = customer
+ @effective_at = effective_at
+ @expand = expand
+ @expires_at = expires_at
+ @metadata = metadata
+ @name = name
+ @priority = priority
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
+ attr_accessor :expires_at
+ # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, expires_at: nil, metadata: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @metadata = metadata
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class VoidGrantParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Attribute for field amount
+ attr_reader :amount
+ # Attribute for field applicability_config
+ attr_reader :applicability_config
+ # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
+ attr_reader :category
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # ID of the customer receiving the billing credits.
+ attr_reader :customer
+ # The time when the billing credits become effective-when they're eligible for use.
+ attr_reader :effective_at
+ # The time when the billing credits expire. If not present, the billing credits don't expire.
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # A descriptive name shown in dashboard.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.
+ attr_reader :priority
+ # ID of the test clock this credit grant belongs to.
+ attr_reader :test_clock
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ attr_reader :updated
+ # The time when this credit grant was voided. If not present, the credit grant hasn't been voided.
+ attr_reader :voided_at
+
# Creates a credit grant.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb
index 14c456da..f4028178 100644
--- a/lib/stripe/resources/billing/meter.rb
+++ b/lib/stripe/resources/billing/meter.rb
@@ -21,6 +21,175 @@ module Stripe
operations: %i[list],
resource_plural: "event_summaries"
+ class CustomerMapping < Stripe::StripeObject
+ # The key in the meter event payload to use for mapping the event to a customer.
+ attr_reader :event_payload_key
+ # The method for mapping a meter event to a customer.
+ attr_reader :type
+ end
+
+ class DefaultAggregation < Stripe::StripeObject
+ # Specifies how events are aggregated.
+ attr_reader :formula
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # The time the meter was deactivated, if any. Measured in seconds since Unix epoch.
+ attr_reader :deactivated_at
+ end
+
+ class ValueSettings < Stripe::StripeObject
+ # The key in the meter event payload to use as the value for this meter.
+ attr_reader :event_payload_key
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Filter results to only include meters with the given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CustomerMapping < Stripe::RequestParams
+ # The key in the meter event payload to use for mapping the event to a customer.
+ attr_accessor :event_payload_key
+ # The method for mapping a meter event to a customer. Must be `by_id`.
+ attr_accessor :type
+
+ def initialize(event_payload_key: nil, type: nil)
+ @event_payload_key = event_payload_key
+ @type = type
+ end
+ end
+
+ class DefaultAggregation < Stripe::RequestParams
+ # Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window.
+ attr_accessor :formula
+
+ def initialize(formula: nil)
+ @formula = formula
+ end
+ end
+
+ class ValueSettings < Stripe::RequestParams
+ # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
+ attr_accessor :event_payload_key
+
+ def initialize(event_payload_key: nil)
+ @event_payload_key = event_payload_key
+ end
+ end
+ # Fields that specify how to map a meter event to a customer.
+ attr_accessor :customer_mapping
+ # The default settings to aggregate a meter's events with.
+ attr_accessor :default_aggregation
+ # The meter’s name. Not visible to the customer.
+ attr_accessor :display_name
+ # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
+ attr_accessor :event_name
+ # The time window to pre-aggregate meter events for, if any.
+ attr_accessor :event_time_window
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Fields that specify how to calculate a meter event's value.
+ attr_accessor :value_settings
+
+ def initialize(
+ customer_mapping: nil,
+ default_aggregation: nil,
+ display_name: nil,
+ event_name: nil,
+ event_time_window: nil,
+ expand: nil,
+ value_settings: nil
+ )
+ @customer_mapping = customer_mapping
+ @default_aggregation = default_aggregation
+ @display_name = display_name
+ @event_name = event_name
+ @event_time_window = event_time_window
+ @expand = expand
+ @value_settings = value_settings
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # The meter’s name. Not visible to the customer.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(display_name: nil, expand: nil)
+ @display_name = display_name
+ @expand = expand
+ end
+ end
+
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Attribute for field customer_mapping
+ attr_reader :customer_mapping
+ # Attribute for field default_aggregation
+ attr_reader :default_aggregation
+ # The meter's name.
+ attr_reader :display_name
+ # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
+ attr_reader :event_name
+ # The time window to pre-aggregate meter events for, if any.
+ attr_reader :event_time_window
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The meter's status.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ attr_reader :updated
+ # Attribute for field value_settings
+ attr_reader :value_settings
+
# Creates a billing meter.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/billing/meters", params: params, opts: opts)
diff --git a/lib/stripe/resources/billing/meter_event.rb b/lib/stripe/resources/billing/meter_event.rb
index 4bab6762..c7fe5a07 100644
--- a/lib/stripe/resources/billing/meter_event.rb
+++ b/lib/stripe/resources/billing/meter_event.rb
@@ -12,6 +12,41 @@ module Stripe
"billing.meter_event"
end
+ class CreateParams < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ attr_accessor :payload
+ # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
+ attr_accessor :timestamp
+
+ def initialize(event_name: nil, expand: nil, identifier: nil, payload: nil, timestamp: nil)
+ @event_name = event_name
+ @expand = expand
+ @identifier = identifier
+ @payload = payload
+ @timestamp = timestamp
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_reader :event_name
+ # A unique identifier for the event.
+ attr_reader :identifier
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ attr_reader :payload
+ # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
+ attr_reader :timestamp
+
# Creates a billing meter event.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/billing/meter_event_adjustment.rb b/lib/stripe/resources/billing/meter_event_adjustment.rb
index d9fa06e4..aff40649 100644
--- a/lib/stripe/resources/billing/meter_event_adjustment.rb
+++ b/lib/stripe/resources/billing/meter_event_adjustment.rb
@@ -12,6 +12,49 @@ module Stripe
"billing.meter_event_adjustment"
end
+ class Cancel < Stripe::StripeObject
+ # Unique identifier for the event.
+ attr_reader :identifier
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Cancel < Stripe::RequestParams
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ attr_accessor :identifier
+
+ def initialize(identifier: nil)
+ @identifier = identifier
+ end
+ end
+ # Specifies which event to cancel.
+ attr_accessor :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ attr_accessor :type
+
+ def initialize(cancel: nil, event_name: nil, expand: nil, type: nil)
+ @cancel = cancel
+ @event_name = event_name
+ @expand = expand
+ @type = type
+ end
+ end
+ # Specifies which event to cancel.
+ attr_reader :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_reader :event_name
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The meter event adjustment's status.
+ attr_reader :status
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ attr_reader :type
+
# Creates a billing meter event adjustment.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/billing/meter_event_summary.rb b/lib/stripe/resources/billing/meter_event_summary.rb
index 88017b47..12bb3f31 100644
--- a/lib/stripe/resources/billing/meter_event_summary.rb
+++ b/lib/stripe/resources/billing/meter_event_summary.rb
@@ -12,6 +12,21 @@ module Stripe
def self.object_name
"billing.meter_event_summary"
end
+
+ # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.
+ attr_reader :aggregated_value
+ # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
+ attr_reader :end_time
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The meter associated with this event summary.
+ attr_reader :meter
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
+ attr_reader :start_time
end
end
end
diff --git a/lib/stripe/resources/billing_portal/configuration.rb b/lib/stripe/resources/billing_portal/configuration.rb
index b7c461c7..c54b4827 100644
--- a/lib/stripe/resources/billing_portal/configuration.rb
+++ b/lib/stripe/resources/billing_portal/configuration.rb
@@ -14,6 +14,559 @@ module Stripe
"billing_portal.configuration"
end
+ class BusinessProfile < Stripe::StripeObject
+ # The messaging shown to customers in the portal.
+ attr_reader :headline
+ # A link to the business’s publicly available privacy policy.
+ attr_reader :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ attr_reader :terms_of_service_url
+ end
+
+ class Features < Stripe::StripeObject
+ class CustomerUpdate < Stripe::StripeObject
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ attr_reader :allowed_updates
+ # Whether the feature is enabled.
+ attr_reader :enabled
+ end
+
+ class InvoiceHistory < Stripe::StripeObject
+ # Whether the feature is enabled.
+ attr_reader :enabled
+ end
+
+ class PaymentMethodUpdate < Stripe::StripeObject
+ # Whether the feature is enabled.
+ attr_reader :enabled
+ end
+
+ class SubscriptionCancel < Stripe::StripeObject
+ class CancellationReason < Stripe::StripeObject
+ # Whether the feature is enabled.
+ attr_reader :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ attr_reader :options
+ end
+ # Attribute for field cancellation_reason
+ attr_reader :cancellation_reason
+ # Whether the feature is enabled.
+ attr_reader :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ attr_reader :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.
+ attr_reader :proration_behavior
+ end
+
+ class SubscriptionUpdate < Stripe::StripeObject
+ class Product < Stripe::StripeObject
+ # The list of price IDs which, when subscribed to, a subscription can be updated.
+ attr_reader :prices
+ # The product ID.
+ attr_reader :product
+ end
+
+ class ScheduleAtPeriodEnd < Stripe::StripeObject
+ class Condition < Stripe::StripeObject
+ # The type of condition.
+ attr_reader :type
+ end
+ # List of conditions. When any condition is true, an update will be scheduled at the end of the current period.
+ attr_reader :conditions
+ end
+ # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.
+ attr_reader :default_allowed_updates
+ # Whether the feature is enabled.
+ attr_reader :enabled
+ # The list of up to 10 products that support subscription updates.
+ attr_reader :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
+ attr_reader :proration_behavior
+ # Attribute for field schedule_at_period_end
+ attr_reader :schedule_at_period_end
+ end
+ # Attribute for field customer_update
+ attr_reader :customer_update
+ # Attribute for field invoice_history
+ attr_reader :invoice_history
+ # Attribute for field payment_method_update
+ attr_reader :payment_method_update
+ # Attribute for field subscription_cancel
+ attr_reader :subscription_cancel
+ # Attribute for field subscription_update
+ attr_reader :subscription_update
+ end
+
+ class LoginPage < Stripe::StripeObject
+ # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.
+ #
+ # If `false`, the previously generated `url`, if any, will be deactivated.
+ attr_reader :enabled
+ # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.
+ attr_reader :url
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).
+ attr_accessor :active
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).
+ attr_accessor :is_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ ending_before: nil,
+ expand: nil,
+ is_default: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @ending_before = ending_before
+ @expand = expand
+ @is_default = is_default
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ attr_accessor :terms_of_service_url
+
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil)
+ @headline = headline
+ @privacy_policy_url = privacy_policy_url
+ @terms_of_service_url = terms_of_service_url
+ end
+ end
+
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allowed_updates: nil, enabled: nil)
+ @allowed_updates = allowed_updates
+ @enabled = enabled
+ end
+ end
+
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ attr_accessor :options
+
+ def initialize(enabled: nil, options: nil)
+ @enabled = enabled
+ @options = options
+ end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ attr_accessor :proration_behavior
+
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ )
+ @cancellation_reason = cancellation_reason
+ @enabled = enabled
+ @mode = mode
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ attr_accessor :prices
+ # The product id.
+ attr_accessor :product
+
+ def initialize(prices: nil, product: nil)
+ @prices = prices
+ @product = product
+ end
+ end
+
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ attr_accessor :conditions
+
+ def initialize(conditions: nil)
+ @conditions = conditions
+ end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ attr_accessor :schedule_at_period_end
+
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ )
+ @default_allowed_updates = default_allowed_updates
+ @enabled = enabled
+ @products = products
+ @proration_behavior = proration_behavior
+ @schedule_at_period_end = schedule_at_period_end
+ end
+ end
+ # Information about updating the customer details in the portal.
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ attr_accessor :subscription_update
+
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ )
+ @customer_update = customer_update
+ @invoice_history = invoice_history
+ @payment_method_update = payment_method_update
+ @subscription_cancel = subscription_cancel
+ @subscription_update = subscription_update
+ end
+ end
+
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+ # The business information shown to customers in the portal.
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ attr_accessor :login_page
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ )
+ @business_profile = business_profile
+ @default_return_url = default_return_url
+ @expand = expand
+ @features = features
+ @login_page = login_page
+ @metadata = metadata
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ attr_accessor :terms_of_service_url
+
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil)
+ @headline = headline
+ @privacy_policy_url = privacy_policy_url
+ @terms_of_service_url = terms_of_service_url
+ end
+ end
+
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allowed_updates: nil, enabled: nil)
+ @allowed_updates = allowed_updates
+ @enabled = enabled
+ end
+ end
+
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ attr_accessor :options
+
+ def initialize(enabled: nil, options: nil)
+ @enabled = enabled
+ @options = options
+ end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ attr_accessor :proration_behavior
+
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ )
+ @cancellation_reason = cancellation_reason
+ @enabled = enabled
+ @mode = mode
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ attr_accessor :prices
+ # The product id.
+ attr_accessor :product
+
+ def initialize(prices: nil, product: nil)
+ @prices = prices
+ @product = product
+ end
+ end
+
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ attr_accessor :conditions
+
+ def initialize(conditions: nil)
+ @conditions = conditions
+ end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ attr_accessor :schedule_at_period_end
+
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ )
+ @default_allowed_updates = default_allowed_updates
+ @enabled = enabled
+ @products = products
+ @proration_behavior = proration_behavior
+ @schedule_at_period_end = schedule_at_period_end
+ end
+ end
+ # Information about updating the customer details in the portal.
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ attr_accessor :subscription_update
+
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ )
+ @customer_update = customer_update
+ @invoice_history = invoice_history
+ @payment_method_update = payment_method_update
+ @subscription_cancel = subscription_cancel
+ @subscription_update = subscription_update
+ end
+ end
+
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ #
+ # Set to `false` to deactivate the `login_page.url`.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+ # Whether the configuration is active and can be used to create portal sessions.
+ attr_accessor :active
+ # The business information shown to customers in the portal.
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ attr_accessor :login_page
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ active: nil,
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ )
+ @active = active
+ @business_profile = business_profile
+ @default_return_url = default_return_url
+ @expand = expand
+ @features = features
+ @login_page = login_page
+ @metadata = metadata
+ end
+ end
+ # Whether the configuration is active and can be used to create portal sessions.
+ attr_reader :active
+ # ID of the Connect Application that created the configuration.
+ attr_reader :application
+ # Attribute for field business_profile
+ attr_reader :business_profile
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ attr_reader :default_return_url
+ # Attribute for field features
+ attr_reader :features
+ # Unique identifier for the object.
+ attr_reader :id
+ # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
+ attr_reader :is_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Attribute for field login_page
+ attr_reader :login_page
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ attr_reader :updated
+
# Creates a configuration that describes the functionality and behavior of a PortalSession
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/billing_portal/session.rb b/lib/stripe/resources/billing_portal/session.rb
index ec681a38..a2b5d276 100644
--- a/lib/stripe/resources/billing_portal/session.rb
+++ b/lib/stripe/resources/billing_portal/session.rb
@@ -25,6 +25,277 @@ module Stripe
"billing_portal.session"
end
+ class Flow < Stripe::StripeObject
+ class AfterCompletion < Stripe::StripeObject
+ class HostedConfirmation < Stripe::StripeObject
+ # A custom message to display to the customer after the flow is completed.
+ attr_reader :custom_message
+ end
+
+ class Redirect < Stripe::StripeObject
+ # The URL the customer will be redirected to after the flow is completed.
+ attr_reader :return_url
+ end
+ # Configuration when `after_completion.type=hosted_confirmation`.
+ attr_reader :hosted_confirmation
+ # Configuration when `after_completion.type=redirect`.
+ attr_reader :redirect
+ # The specified type of behavior after the flow is completed.
+ attr_reader :type
+ end
+
+ class SubscriptionCancel < Stripe::StripeObject
+ class Retention < Stripe::StripeObject
+ class CouponOffer < Stripe::StripeObject
+ # The ID of the coupon to be offered.
+ attr_reader :coupon
+ end
+ # Configuration when `retention.type=coupon_offer`.
+ attr_reader :coupon_offer
+ # Type of retention strategy that will be used.
+ attr_reader :type
+ end
+ # Specify a retention strategy to be used in the cancellation flow.
+ attr_reader :retention
+ # The ID of the subscription to be canceled.
+ attr_reader :subscription
+ end
+
+ class SubscriptionUpdate < Stripe::StripeObject
+ # The ID of the subscription to be updated.
+ attr_reader :subscription
+ end
+
+ class SubscriptionUpdateConfirm < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The ID of the coupon to apply to this subscription update.
+ attr_reader :coupon
+ # The ID of a promotion code to apply to this subscription update.
+ attr_reader :promotion_code
+ end
+
+ class Item < Stripe::StripeObject
+ # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
+ attr_reader :id
+ # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
+ attr_reader :price
+ # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
+ attr_reader :quantity
+ end
+ # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ attr_reader :discounts
+ # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
+ attr_reader :items
+ # The ID of the subscription to be updated.
+ attr_reader :subscription
+ end
+ # Attribute for field after_completion
+ attr_reader :after_completion
+ # Configuration when `flow.type=subscription_cancel`.
+ attr_reader :subscription_cancel
+ # Configuration when `flow.type=subscription_update`.
+ attr_reader :subscription_update
+ # Configuration when `flow.type=subscription_update_confirm`.
+ attr_reader :subscription_update_confirm
+ # Type of flow that the customer will go through.
+ attr_reader :type
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class FlowData < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the flow is completed.
+ attr_accessor :custom_message
+
+ def initialize(custom_message: nil)
+ @custom_message = custom_message
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # The URL the customer will be redirected to after the flow is completed.
+ attr_accessor :return_url
+
+ def initialize(return_url: nil)
+ @return_url = return_url
+ end
+ end
+ # Configuration when `after_completion.type=hosted_confirmation`.
+ attr_accessor :hosted_confirmation
+ # Configuration when `after_completion.type=redirect`.
+ attr_accessor :redirect
+ # The specified behavior after the flow is completed.
+ attr_accessor :type
+
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
+ @hosted_confirmation = hosted_confirmation
+ @redirect = redirect
+ @type = type
+ end
+ end
+
+ class SubscriptionCancel < Stripe::RequestParams
+ class Retention < Stripe::RequestParams
+ class CouponOffer < Stripe::RequestParams
+ # The ID of the coupon to be offered.
+ attr_accessor :coupon
+
+ def initialize(coupon: nil)
+ @coupon = coupon
+ end
+ end
+ # Configuration when `retention.type=coupon_offer`.
+ attr_accessor :coupon_offer
+ # Type of retention strategy to use with the customer.
+ attr_accessor :type
+
+ def initialize(coupon_offer: nil, type: nil)
+ @coupon_offer = coupon_offer
+ @type = type
+ end
+ end
+ # Specify a retention strategy to be used in the cancellation flow.
+ attr_accessor :retention
+ # The ID of the subscription to be canceled.
+ attr_accessor :subscription
+
+ def initialize(retention: nil, subscription: nil)
+ @retention = retention
+ @subscription = subscription
+ end
+ end
+
+ class SubscriptionUpdate < Stripe::RequestParams
+ # The ID of the subscription to be updated.
+ attr_accessor :subscription
+
+ def initialize(subscription: nil)
+ @subscription = subscription
+ end
+ end
+
+ class SubscriptionUpdateConfirm < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this subscription update.
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this subscription update.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, promotion_code: nil)
+ @coupon = coupon
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
+ attr_accessor :id
+ # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
+ attr_accessor :price
+ # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
+ attr_accessor :quantity
+
+ def initialize(id: nil, price: nil, quantity: nil)
+ @id = id
+ @price = price
+ @quantity = quantity
+ end
+ end
+ # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ attr_accessor :discounts
+ # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
+ attr_accessor :items
+ # The ID of the subscription to be updated.
+ attr_accessor :subscription
+
+ def initialize(discounts: nil, items: nil, subscription: nil)
+ @discounts = discounts
+ @items = items
+ @subscription = subscription
+ end
+ end
+ # Behavior after the flow is completed.
+ attr_accessor :after_completion
+ # Configuration when `flow_data.type=subscription_cancel`.
+ attr_accessor :subscription_cancel
+ # Configuration when `flow_data.type=subscription_update`.
+ attr_accessor :subscription_update
+ # Configuration when `flow_data.type=subscription_update_confirm`.
+ attr_accessor :subscription_update_confirm
+ # Type of flow that the customer will go through.
+ attr_accessor :type
+
+ def initialize(
+ after_completion: nil,
+ subscription_cancel: nil,
+ subscription_update: nil,
+ subscription_update_confirm: nil,
+ type: nil
+ )
+ @after_completion = after_completion
+ @subscription_cancel = subscription_cancel
+ @subscription_update = subscription_update
+ @subscription_update_confirm = subscription_update_confirm
+ @type = type
+ end
+ end
+ # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
+ attr_accessor :configuration
+ # The ID of an existing customer.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
+ attr_accessor :flow_data
+ # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
+ attr_accessor :locale
+ # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
+ attr_accessor :on_behalf_of
+ # The default URL to redirect customers to when they click on the portal's link to return to your website.
+ attr_accessor :return_url
+
+ def initialize(
+ configuration: nil,
+ customer: nil,
+ expand: nil,
+ flow_data: nil,
+ locale: nil,
+ on_behalf_of: nil,
+ return_url: nil
+ )
+ @configuration = configuration
+ @customer = customer
+ @expand = expand
+ @flow_data = flow_data
+ @locale = locale
+ @on_behalf_of = on_behalf_of
+ @return_url = return_url
+ end
+ end
+ # The configuration used by this session, describing the features available.
+ attr_reader :configuration
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The ID of the customer for this session.
+ attr_reader :customer
+ # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
+ attr_reader :flow
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
+ attr_reader :locale
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
+ attr_reader :on_behalf_of
+ # The URL to redirect customers to when they click on the portal's link to return to your website.
+ attr_reader :return_url
+ # The short-lived URL of the session that gives customers access to the customer portal.
+ attr_reader :url
+
# Creates a session of the customer portal.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb
index 9f0cdad4..eac13ca0 100644
--- a/lib/stripe/resources/capability.rb
+++ b/lib/stripe/resources/capability.rb
@@ -13,6 +13,90 @@ module Stripe
"capability"
end
+ class FutureRequirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ attr_reader :original_fields_due
+ end
+
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ attr_reader :alternatives
+ # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
+ attr_reader :currently_due
+ # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account.
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.
+ attr_reader :eventually_due
+ # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+
+ class Requirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ attr_reader :original_fields_due
+ end
+
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ attr_reader :alternatives
+ # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
+ attr_reader :currently_due
+ # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
+ attr_reader :eventually_due
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+ # The account for which the capability enables functionality.
+ attr_reader :account
+ # Attribute for field future_requirements
+ attr_reader :future_requirements
+ # The identifier for the capability.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Whether the capability has been requested.
+ attr_reader :requested
+ # Time at which the capability was requested. Measured in seconds since the Unix epoch.
+ attr_reader :requested_at
+ # Attribute for field requirements
+ attr_reader :requirements
+ # The status of the capability.
+ attr_reader :status
+
def resource_url
if !respond_to?(:account) || account.nil?
raise NotImplementedError,
diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb
index 3579ff93..7dc16d05 100644
--- a/lib/stripe/resources/card.rb
+++ b/lib/stripe/resources/card.rb
@@ -17,6 +17,83 @@ module Stripe
"card"
end
+ class Networks < Stripe::StripeObject
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
+ attr_reader :preferred
+ end
+ # Attribute for field account
+ attr_reader :account
+ # City/District/Suburb/Town/Village.
+ attr_reader :address_city
+ # Billing address country, if provided when creating card.
+ attr_reader :address_country
+ # Address line 1 (Street address/PO Box/Company name).
+ attr_reader :address_line1
+ # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_line1_check
+ # Address line 2 (Apartment/Suite/Unit/Building).
+ attr_reader :address_line2
+ # State/County/Province/Region.
+ attr_reader :address_state
+ # ZIP or postal code.
+ attr_reader :address_zip
+ # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_zip_check
+ # 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. The field defaults to “unspecified”.
+ attr_reader :allow_redisplay
+ # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
+ attr_reader :available_payout_methods
+ # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
+ attr_reader :currency
+ # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
+ attr_reader :customer
+ # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
+ attr_reader :cvc_check
+ # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_reader :default_for_currency
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ attr_reader :dynamic_last4
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Unique identifier for the object.
+ attr_reader :id
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # 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.
+ attr_reader :metadata
+ # Cardholder name.
+ attr_reader :name
+ # Attribute for field networks
+ attr_reader :networks
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Status of a card based on the card issuer.
+ attr_reader :regulated_status
+ # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated.
+ attr_reader :status
+ # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
+ attr_reader :tokenization_method
+ # Always true for a deleted object
+ attr_reader :deleted
+
def resource_url
if respond_to?(:customer) && !customer.nil? && !customer.empty?
"#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
diff --git a/lib/stripe/resources/cash_balance.rb b/lib/stripe/resources/cash_balance.rb
index 4f374058..e46d8b01 100644
--- a/lib/stripe/resources/cash_balance.rb
+++ b/lib/stripe/resources/cash_balance.rb
@@ -9,6 +9,23 @@ module Stripe
"cash_balance"
end
+ class Settings < Stripe::StripeObject
+ # The configuration for how funds that land in the customer cash balance are reconciled.
+ attr_reader :reconciliation_mode
+ # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance
+ attr_reader :using_merchant_default
+ end
+ # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :available
+ # The ID of the customer whose cash balance this object represents.
+ attr_reader :customer
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field settings
+ attr_reader :settings
+
def resource_url
if !respond_to?(:customer) || customer.nil?
raise NotImplementedError,
diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb
index 3e532663..b9138d5c 100644
--- a/lib/stripe/resources/charge.rb
+++ b/lib/stripe/resources/charge.rb
@@ -20,6 +20,1618 @@ module Stripe
nested_resource_class_methods :refund, operations: %i[retrieve list]
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Billing address.
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ # Billing phone number (including extension).
+ attr_reader :phone
+ end
+
+ class FraudDetails < Stripe::StripeObject
+ # Assessments from Stripe. If set, the value is `fraudulent`.
+ attr_reader :stripe_report
+ # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
+ attr_reader :user_report
+ end
+
+ class Level3 < Stripe::StripeObject
+ class LineItem < Stripe::StripeObject
+ # Attribute for field discount_amount
+ attr_reader :discount_amount
+ # Attribute for field product_code
+ attr_reader :product_code
+ # Attribute for field product_description
+ attr_reader :product_description
+ # Attribute for field quantity
+ attr_reader :quantity
+ # Attribute for field tax_amount
+ attr_reader :tax_amount
+ # Attribute for field unit_cost
+ attr_reader :unit_cost
+ end
+ # Attribute for field customer_reference
+ attr_reader :customer_reference
+ # Attribute for field line_items
+ attr_reader :line_items
+ # Attribute for field merchant_reference
+ attr_reader :merchant_reference
+ # Attribute for field shipping_address_zip
+ attr_reader :shipping_address_zip
+ # Attribute for field shipping_amount
+ attr_reader :shipping_amount
+ # Attribute for field shipping_from_zip
+ attr_reader :shipping_from_zip
+ end
+
+ class Outcome < Stripe::StripeObject
+ class Rule < Stripe::StripeObject
+ # The action taken on the payment.
+ attr_reader :action
+ # Unique identifier for the object.
+ attr_reader :id
+ # The predicate to evaluate the payment against.
+ attr_reader :predicate
+ end
+ # An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
+ attr_reader :advice_code
+ # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
+ attr_reader :network_advice_code
+ # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ attr_reader :network_decline_code
+ # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
+ attr_reader :network_status
+ # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
+ attr_reader :reason
+ # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
+ attr_reader :risk_level
+ # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
+ attr_reader :risk_score
+ # The ID of the Radar rule that matched the payment, if applicable.
+ attr_reader :rule
+ # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
+ attr_reader :seller_message
+ # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.
+ attr_reader :type
+ end
+
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AchCreditTransfer < Stripe::StripeObject
+ # Account number to transfer funds to.
+ attr_reader :account_number
+ # Name of the bank associated with the routing number.
+ attr_reader :bank_name
+ # Routing transit number for the bank account to transfer funds to.
+ attr_reader :routing_number
+ # SWIFT code of the bank associated with the routing number.
+ attr_reader :swift_code
+ end
+
+ class AchDebit < Stripe::StripeObject
+ # Type of entity that holds the account. This can be either `individual` or `company`.
+ attr_reader :account_holder_type
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Routing transit number of the bank account.
+ attr_reader :routing_number
+ end
+
+ class AcssDebit < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Institution number of the bank account
+ attr_reader :institution_number
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ # Transit number of the bank account.
+ attr_reader :transit_number
+ end
+
+ class Affirm < Stripe::StripeObject
+ # The Affirm transaction ID associated with this payment.
+ attr_reader :transaction_id
+ end
+
+ class AfterpayClearpay < Stripe::StripeObject
+ # The Afterpay order ID associated with this payment intent.
+ attr_reader :order_id
+ # Order identifier shown to the merchant in Afterpay’s online portal.
+ attr_reader :reference
+ end
+
+ class Alipay < Stripe::StripeObject
+ # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
+ attr_reader :buyer_id
+ # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
+ attr_reader :fingerprint
+ # Transaction ID of this particular Alipay transaction.
+ attr_reader :transaction_id
+ end
+
+ class Alma < Stripe::StripeObject; end
+
+ class AmazonPay < Stripe::StripeObject
+ class Funding < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # The last four digits of the card.
+ attr_reader :last4
+ end
+ # Attribute for field card
+ attr_reader :card
+ # funding type of the underlying payment method.
+ attr_reader :type
+ end
+ # Attribute for field funding
+ attr_reader :funding
+ end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # Bank-State-Branch number of the bank account.
+ attr_reader :bsb_number
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_reader :sort_code
+ end
+
+ class Bancontact < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ attr_reader :iban_last4
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ # Can be one of `en`, `de`, `fr`, or `nl`
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by Bancontact directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ end
+
+ class Billie < Stripe::StripeObject; end
+
+ class Blik < Stripe::StripeObject
+ # A unique and immutable identifier assigned by BLIK to every buyer.
+ attr_reader :buyer_id
+ end
+
+ class Boleto < Stripe::StripeObject
+ # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
+ attr_reader :tax_id
+ end
+
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :cvc_check
+ end
+
+ class ExtendedAuthorization < Stripe::StripeObject
+ # Indicates whether or not the capture window is extended beyond the standard authorization.
+ attr_reader :status
+ end
+
+ class IncrementalAuthorization < Stripe::StripeObject
+ # Indicates whether or not the incremental authorization feature is supported.
+ attr_reader :status
+ end
+
+ class Installments < Stripe::StripeObject
+ class Plan < Stripe::StripeObject
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
+ attr_reader :count
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_reader :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_reader :type
+ end
+ # Installment plan selected for the payment.
+ attr_reader :plan
+ end
+
+ class Multicapture < Stripe::StripeObject
+ # Indicates whether or not multiple captures are supported.
+ attr_reader :status
+ end
+
+ class NetworkToken < Stripe::StripeObject
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
+ attr_reader :used
+ end
+
+ class Overcapture < Stripe::StripeObject
+ # The maximum amount that can be captured.
+ attr_reader :maximum_amount_capturable
+ # Indicates whether or not the authorized amount can be over-captured.
+ attr_reader :status
+ end
+
+ class ThreeDSecure < Stripe::StripeObject
+ # For authenticated transactions: how the customer was authenticated by
+ # the issuing bank.
+ attr_reader :authentication_flow
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
+ # indicating what degree of authentication was performed.
+ attr_reader :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_reader :exemption_indicator
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
+ # the outcome of Stripe's internal risk assessment.
+ attr_reader :exemption_indicator_applied
+ # Indicates the outcome of 3D Secure authentication.
+ attr_reader :result
+ # Additional information about why 3D Secure succeeded or failed based
+ # on the `result`.
+ attr_reader :result_reason
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
+ # (dsTransId) for this payment.
+ attr_reader :transaction_id
+ # The version of 3D Secure that was used.
+ attr_reader :version
+ end
+
+ class Wallet < Stripe::StripeObject
+ class AmexExpressCheckout < Stripe::StripeObject; end
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+
+ class Masterpass < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :shipping_address
+ end
+
+ class SamsungPay < Stripe::StripeObject; end
+
+ class VisaCheckout < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :shipping_address
+ end
+ # Attribute for field amex_express_checkout
+ attr_reader :amex_express_checkout
+ # Attribute for field apple_pay
+ attr_reader :apple_pay
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ attr_reader :dynamic_last4
+ # Attribute for field google_pay
+ attr_reader :google_pay
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field masterpass
+ attr_reader :masterpass
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ attr_reader :type
+ # Attribute for field visa_checkout
+ attr_reader :visa_checkout
+ end
+ # The authorized amount.
+ attr_reader :amount_authorized
+ # Authorization code on the charge.
+ attr_reader :authorization_code
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
+ attr_reader :capture_before
+ # Check results by Card networks on Card address and CVC at time of payment.
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Attribute for field extended_authorization
+ attr_reader :extended_authorization
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # Attribute for field incremental_authorization
+ attr_reader :incremental_authorization
+ # Installment details for this payment (Mexico only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_reader :installments
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # ID of the mandate used to make this payment or created by it.
+ attr_reader :mandate
+ # True if this payment was marked as MOTO and out of scope for SCA.
+ attr_reader :moto
+ # Attribute for field multicapture
+ attr_reader :multicapture
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :network
+ # If this card has network token credentials, this contains the details of the network token credentials.
+ attr_reader :network_token
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ attr_reader :network_transaction_id
+ # Attribute for field overcapture
+ attr_reader :overcapture
+ # Status of a card based on the card issuer.
+ attr_reader :regulated_status
+ # Populated if this transaction used 3D Secure authentication.
+ attr_reader :three_d_secure
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ attr_reader :wallet
+ end
+
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ attr_reader :type
+ end
+
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ attr_reader :transaction_status_information
+ end
+
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ attr_reader :type
+ end
+ # The authorized amount
+ attr_reader :amount_authorized
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ attr_reader :brand_product
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
+ attr_reader :capture_before
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Authorization response cryptogram.
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # 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.
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
+ attr_reader :incremental_authorization_supported
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ attr_reader :network_transaction_id
+ # Details about payments collected offline.
+ attr_reader :offline
+ # Defines whether the authorized amount can be over-captured or not
+ attr_reader :overcapture_supported
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ attr_reader :receipt
+ # Attribute for field wallet
+ attr_reader :wallet
+ end
+
+ class Cashapp < Stripe::StripeObject
+ # A unique and immutable identifier assigned by Cash App to every buyer.
+ attr_reader :buyer_id
+ # A public identifier for buyers using Cash App.
+ attr_reader :cashtag
+ end
+
+ class CustomerBalance < Stripe::StripeObject; end
+
+ class Eps < Stripe::StripeObject
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
+ attr_reader :bank
+ # Owner's verified full name. Values are verified or provided by EPS directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ # EPS rarely provides this information so the attribute is usually empty.
+ attr_reader :verified_name
+ end
+
+ class Fpx < Stripe::StripeObject
+ # Account holder type, if provided. Can be one of `individual` or `company`.
+ attr_reader :account_holder_type
+ # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
+ attr_reader :bank
+ # Unique transaction id generated by FPX for every request from the merchant
+ attr_reader :transaction_id
+ end
+
+ class Giropay < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ attr_reader :bic
+ # Owner's verified full name. Values are verified or provided by Giropay directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ # Giropay rarely provides this information so the attribute is usually empty.
+ attr_reader :verified_name
+ end
+
+ class Grabpay < Stripe::StripeObject
+ # Unique transaction id generated by GrabPay
+ attr_reader :transaction_id
+ end
+
+ class Ideal < Stripe::StripeObject
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank.
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ attr_reader :iban_last4
+ # Owner's verified full name. Values are verified or provided by iDEAL directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ end
+
+ class InteracPresent < Stripe::StripeObject
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ attr_reader :transaction_status_information
+ end
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
+ attr_reader :brand
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Authorization response cryptogram.
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # 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.
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ attr_reader :network_transaction_id
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ attr_reader :receipt
+ end
+
+ class KakaoPay < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ attr_reader :buyer_id
+ end
+
+ class Klarna < Stripe::StripeObject
+ class PayerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # The payer address country
+ attr_reader :country
+ end
+ # The payer's address
+ attr_reader :address
+ end
+ # The payer details for this transaction.
+ attr_reader :payer_details
+ # The Klarna payment method used for this transaction.
+ # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
+ attr_reader :payment_method_category
+ # Preferred language of the Klarna authorization page that the customer is redirected to.
+ # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
+ attr_reader :preferred_locale
+ end
+
+ class Konbini < Stripe::StripeObject
+ class Store < Stripe::StripeObject
+ # The name of the convenience store chain where the payment was completed.
+ attr_reader :chain
+ end
+ # If the payment succeeded, this contains the details of the convenience store where the payment was completed.
+ attr_reader :store
+ end
+
+ class KrCard < Stripe::StripeObject
+ # The local credit or debit card brand.
+ attr_reader :brand
+ # A unique identifier for the buyer as determined by the local payment processor.
+ attr_reader :buyer_id
+ # The last four digits of the card. This may not be present for American Express cards.
+ attr_reader :last4
+ end
+
+ class Link < Stripe::StripeObject
+ # Two-letter ISO code representing the funding source country beneath the Link payment.
+ # You could use this attribute to get a sense of international fees.
+ attr_reader :country
+ end
+
+ class Mobilepay < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # Brand of the card used in the transaction
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card
+ attr_reader :country
+ # Two digit number representing the card's expiration month
+ attr_reader :exp_month
+ # Two digit number representing the card's expiration year
+ attr_reader :exp_year
+ # The last 4 digits of the card
+ attr_reader :last4
+ end
+ # Internal card details
+ attr_reader :card
+ end
+
+ class Multibanco < Stripe::StripeObject
+ # Entity number associated with this Multibanco payment.
+ attr_reader :entity
+ # Reference number associated with this Multibanco payment.
+ attr_reader :reference
+ end
+
+ class NaverPay < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ attr_reader :buyer_id
+ end
+
+ class NzBankAccount < Stripe::StripeObject
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_reader :account_holder_name
+ # The numeric code for the bank account's bank.
+ attr_reader :bank_code
+ # The name of the bank.
+ attr_reader :bank_name
+ # The numeric code for the bank account's bank branch.
+ attr_reader :branch_code
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # The suffix of the bank account number.
+ attr_reader :suffix
+ end
+
+ class Oxxo < Stripe::StripeObject
+ # OXXO reference number
+ attr_reader :number
+ end
+
+ class P24 < Stripe::StripeObject
+ # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
+ attr_reader :bank
+ # Unique reference for this Przelewy24 payment.
+ attr_reader :reference
+ # Owner's verified full name. Values are verified or provided by Przelewy24 directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ # Przelewy24 rarely provides this information so the attribute is usually empty.
+ attr_reader :verified_name
+ end
+
+ class PayByBank < Stripe::StripeObject; end
+
+ class Payco < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ attr_reader :buyer_id
+ end
+
+ class Paynow < Stripe::StripeObject
+ # Reference number associated with this PayNow payment
+ attr_reader :reference
+ end
+
+ class Paypal < Stripe::StripeObject
+ class SellerProtection < Stripe::StripeObject
+ # An array of conditions that are covered for the transaction, if applicable.
+ attr_reader :dispute_categories
+ # Indicates whether the transaction is eligible for PayPal's seller protection.
+ attr_reader :status
+ end
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :country
+ # Owner's email. Values are provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :payer_email
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ attr_reader :payer_id
+ # Owner's full name. Values provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :payer_name
+ # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
+ attr_reader :seller_protection
+ # A unique ID generated by PayPal for this transaction.
+ attr_reader :transaction_id
+ end
+
+ class Pix < Stripe::StripeObject
+ # Unique transaction id generated by BCB
+ attr_reader :bank_transaction_id
+ end
+
+ class Promptpay < Stripe::StripeObject
+ # Bill reference generated by PromptPay
+ attr_reader :reference
+ end
+
+ class RevolutPay < Stripe::StripeObject
+ class Funding < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # The last four digits of the card.
+ attr_reader :last4
+ end
+ # Attribute for field card
+ attr_reader :card
+ # funding type of the underlying payment method.
+ attr_reader :type
+ end
+ # Attribute for field funding
+ attr_reader :funding
+ end
+
+ class SamsungPay < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ attr_reader :buyer_id
+ end
+
+ class Satispay < Stripe::StripeObject; end
+
+ class SepaCreditTransfer < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ attr_reader :bic
+ # IBAN of the bank account to transfer funds to.
+ attr_reader :iban
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Branch code of bank associated with the bank account.
+ attr_reader :branch_code
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four characters of the IBAN.
+ attr_reader :last4
+ # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve).
+ attr_reader :mandate
+ end
+
+ class Sofort < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ attr_reader :bic
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ attr_reader :iban_last4
+ # Preferred language of the SOFORT authorization page that the customer is redirected to.
+ # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by SOFORT directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ end
+
+ class StripeAccount < Stripe::StripeObject; end
+
+ class Swish < Stripe::StripeObject
+ # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
+ attr_reader :fingerprint
+ # Payer bank reference number for the payment
+ attr_reader :payment_reference
+ # The last four digits of the Swish account phone number
+ attr_reader :verified_phone_last4
+ end
+
+ class Twint < Stripe::StripeObject; end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ # Reference number to locate ACH payments with customer's bank.
+ attr_reader :payment_reference
+ # Routing number of the bank account.
+ attr_reader :routing_number
+ end
+
+ class Wechat < Stripe::StripeObject; end
+
+ class WechatPay < Stripe::StripeObject
+ # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
+ attr_reader :fingerprint
+ # Transaction ID of this particular WeChat Pay transaction.
+ attr_reader :transaction_id
+ end
+
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field ach_credit_transfer
+ attr_reader :ach_credit_transfer
+ # Attribute for field ach_debit
+ attr_reader :ach_debit
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # Attribute for field alma
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field billie
+ attr_reader :billie
+ # Attribute for field blik
+ attr_reader :blik
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ attr_reader :customer_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field fpx
+ attr_reader :fpx
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field interac_present
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field konbini
+ attr_reader :konbini
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field mobilepay
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # Attribute for field oxxo
+ attr_reader :oxxo
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ attr_reader :payco
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field pix
+ attr_reader :pix
+ # Attribute for field promptpay
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # Attribute for field satispay
+ attr_reader :satispay
+ # Attribute for field sepa_credit_transfer
+ attr_reader :sepa_credit_transfer
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field stripe_account
+ attr_reader :stripe_account
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field twint
+ attr_reader :twint
+ # The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types.
+ # An additional hash is included on `payment_method_details` with a name matching this value.
+ # It contains information specific to the payment method.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ # Attribute for field wechat
+ attr_reader :wechat
+ # Attribute for field wechat_pay
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ attr_reader :zip
+ end
+
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ attr_reader :presentment_currency
+ end
+
+ class RadarOptions < Stripe::StripeObject
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_reader :session
+ end
+
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_reader :carrier
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :tracking_number
+ end
+
+ class TransferData < Stripe::StripeObject
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ attr_reader :amount
+ # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
+ attr_reader :destination
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return charges that were created during the given date interval.
+ attr_accessor :created
+ # Only return charges for the customer specified by this customer ID.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+ # Only return charges for this transfer group, limited to 100.
+ attr_accessor :transfer_group
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil,
+ transfer_group: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ @transfer_group = transfer_group
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Destination < Stripe::RequestParams
+ # ID of an existing, connected Stripe account.
+ attr_accessor :account
+ # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
+ attr_accessor :amount
+
+ def initialize(account: nil, amount: nil)
+ @account = account
+ @amount = amount
+ end
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # Attribute for param field application_fee
+ attr_accessor :application_fee
+ # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
+ attr_accessor :application_fee_amount
+ # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
+ attr_accessor :capture
+ # 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).
+ attr_accessor :currency
+ # The ID of an existing customer that will be charged in this request.
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ attr_accessor :description
+ # Attribute for param field destination
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
+ attr_accessor :on_behalf_of
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ attr_accessor :shipping
+ # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.
+ attr_accessor :source
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ capture: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ shipping: nil,
+ source: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @application_fee = application_fee
+ @application_fee_amount = application_fee_amount
+ @capture = capture
+ @currency = currency
+ @customer = customer
+ @description = description
+ @destination = destination
+ @expand = expand
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @radar_options = radar_options
+ @receipt_email = receipt_email
+ @shipping = shipping
+ @source = source
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class FraudDetails < Stripe::RequestParams
+ # Either `safe` or `fraudulent`.
+ attr_accessor :user_report
+
+ def initialize(user_report: nil)
+ @user_report = user_report
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
+ attr_accessor :fraud_details
+ # 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`.
+ attr_accessor :metadata
+ # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ attr_accessor :shipping
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_accessor :transfer_group
+
+ def initialize(
+ customer: nil,
+ description: nil,
+ expand: nil,
+ fraud_details: nil,
+ metadata: nil,
+ receipt_email: nil,
+ shipping: nil,
+ transfer_group: nil
+ )
+ @customer = customer
+ @description = description
+ @expand = expand
+ @fraud_details = fraud_details
+ @metadata = metadata
+ @receipt_email = receipt_email
+ @shipping = shipping
+ @transfer_group = transfer_group
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # The amount to capture, which must be less than or equal to the original amount.
+ attr_accessor :amount
+ # An application fee to add on to this charge.
+ attr_accessor :application_fee
+ # An application fee amount to add on to this charge, which must be less than or equal to the original amount.
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
+ attr_accessor :receipt_email
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ receipt_email: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @application_fee = application_fee
+ @application_fee_amount = application_fee_amount
+ @expand = expand
+ @receipt_email = receipt_email
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_reader :amount
+ # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
+ attr_reader :amount_captured
+ # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
+ attr_reader :amount_refunded
+ # ID of the Connect application that created the charge.
+ attr_reader :application
+ # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
+ attr_reader :application_fee
+ # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
+ attr_reader :application_fee_amount
+ # Authorization code on the charge.
+ attr_reader :authorization_code
+ # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
+ attr_reader :balance_transaction
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
+ attr_reader :calculated_statement_descriptor
+ # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
+ attr_reader :captured
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # ID of the customer this charge is for if one exists.
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Whether the charge has been disputed.
+ attr_reader :disputed
+ # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
+ attr_reader :failure_balance_transaction
+ # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).
+ attr_reader :failure_code
+ # Message to user further explaining reason for charge failure if available.
+ attr_reader :failure_message
+ # Information on fraud assessments for the charge.
+ attr_reader :fraud_details
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field level3
+ attr_reader :level3
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
+ attr_reader :on_behalf_of
+ # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
+ attr_reader :outcome
+ # `true` if the charge succeeded, or was successfully authorized for later capture.
+ attr_reader :paid
+ # ID of the PaymentIntent associated with this charge, if one exists.
+ attr_reader :payment_intent
+ # ID of the payment method used in this charge.
+ attr_reader :payment_method
+ # Details about the payment method at the time of the transaction.
+ attr_reader :payment_method_details
+ # Attribute for field presentment_details
+ attr_reader :presentment_details
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_reader :radar_options
+ # This is the email address that the receipt for this charge was sent to.
+ attr_reader :receipt_email
+ # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.
+ attr_reader :receipt_number
+ # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
+ attr_reader :receipt_url
+ # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
+ attr_reader :refunded
+ # A list of refunds that have been applied to the charge.
+ attr_reader :refunds
+ # ID of the review associated with this charge if one exists.
+ attr_reader :review
+ # Shipping information for the charge.
+ attr_reader :shipping
+ # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
+ attr_reader :source
+ # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
+ attr_reader :source_transfer
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ attr_reader :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ attr_reader :statement_descriptor_suffix
+ # The status of the payment is either `succeeded`, `pending`, or `failed`.
+ attr_reader :status
+ # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).
+ attr_reader :transfer
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ attr_reader :transfer_data
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_reader :transfer_group
+
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
#
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb
index bec5269a..d14d9f82 100644
--- a/lib/stripe/resources/checkout/session.rb
+++ b/lib/stripe/resources/checkout/session.rb
@@ -27,6 +27,3530 @@ module Stripe
"checkout.session"
end
+ class AdaptivePricing < Stripe::StripeObject
+ # Whether Adaptive Pricing is enabled.
+ attr_reader :enabled
+ end
+
+ class AfterExpiration < Stripe::StripeObject
+ class Recovery < Stripe::StripeObject
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
+ attr_reader :allow_promotion_codes
+ # If `true`, a recovery url will be generated to recover this Checkout Session if it
+ # expires before a transaction is completed. It will be attached to the
+ # Checkout Session object upon expiration.
+ attr_reader :enabled
+ # The timestamp at which the recovery URL will expire.
+ attr_reader :expires_at
+ # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session
+ attr_reader :url
+ end
+ # When set, configuration used to recover the Checkout Session on expiry.
+ attr_reader :recovery
+ end
+
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # Indicates whether automatic tax is enabled for the session
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ # The status of the most recent automated tax calculation for this session.
+ attr_reader :status
+ end
+
+ class CollectedInformation < Stripe::StripeObject
+ class ShippingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Customer name.
+ attr_reader :name
+ end
+ # Shipping information for this Checkout Session.
+ attr_reader :shipping_details
+ end
+
+ class Consent < Stripe::StripeObject
+ # If `opt_in`, the customer consents to receiving promotional communications
+ # from the merchant about this Checkout Session.
+ attr_reader :promotions
+ # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
+ attr_reader :terms_of_service
+ end
+
+ class ConsentCollection < Stripe::StripeObject
+ class PaymentMethodReuseAgreement < Stripe::StripeObject
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
+ #
+ # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ attr_reader :position
+ end
+ # If set to `hidden`, it will hide legal text related to the reuse of a payment method.
+ attr_reader :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ attr_reader :promotions
+ # If set to `required`, it requires customers to accept the terms of service before being able to pay.
+ attr_reader :terms_of_service
+ end
+
+ class CurrencyConversion < Stripe::StripeObject
+ # Total of all items in source currency before discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total of all items in source currency after discounts and taxes are applied.
+ attr_reader :amount_total
+ # Exchange rate used to convert source currency amounts to customer currency amounts
+ attr_reader :fx_rate
+ # Creation currency of the CheckoutSession before localization
+ attr_reader :source_currency
+ end
+
+ class CustomField < Stripe::StripeObject
+ class Dropdown < Stripe::StripeObject
+ class Option < Stripe::StripeObject
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_reader :label
+ # 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.
+ attr_reader :value
+ end
+ # The value that will pre-fill on the payment page.
+ attr_reader :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_reader :options
+ # The option selected by the customer. This will be the `value` for the option.
+ attr_reader :value
+ end
+
+ class Label < Stripe::StripeObject
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_reader :custom
+ # The type of the label.
+ attr_reader :type
+ end
+
+ class Numeric < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_reader :minimum_length
+ # The value entered by the customer, containing only digits.
+ attr_reader :value
+ end
+
+ class Text < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_reader :minimum_length
+ # The value entered by the customer.
+ attr_reader :value
+ end
+ # Attribute for field dropdown
+ attr_reader :dropdown
+ # 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.
+ attr_reader :key
+ # Attribute for field label
+ attr_reader :label
+ # Attribute for field numeric
+ attr_reader :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_reader :optional
+ # Attribute for field text
+ attr_reader :text
+ # The type of the field.
+ attr_reader :type
+ end
+
+ class CustomText < Stripe::StripeObject
+ class AfterSubmit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+
+ class Submit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+
+ class TermsOfServiceAcceptance < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_reader :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_reader :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_reader :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_reader :terms_of_service_acceptance
+ end
+
+ class CustomerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class TaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ attr_reader :type
+ # The value of the tax ID.
+ attr_reader :value
+ end
+ # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
+ attr_reader :address
+ # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.
+ # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.
+ attr_reader :email
+ # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
+ attr_reader :name
+ # The customer's phone number after a completed Checkout Session.
+ attr_reader :phone
+ # The customer’s tax exempt status after a completed Checkout Session.
+ attr_reader :tax_exempt
+ # The customer’s tax IDs after a completed Checkout Session.
+ attr_reader :tax_ids
+ end
+
+ class Discount < Stripe::StripeObject
+ # Coupon attached to the Checkout Session.
+ attr_reader :coupon
+ # Promotion code attached to the Checkout Session.
+ attr_reader :promotion_code
+ end
+
+ class InvoiceCreation < Stripe::StripeObject
+ class InvoiceData < Stripe::StripeObject
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ attr_reader :name
+ # The value of the custom field.
+ attr_reader :value
+ end
+
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+
+ class RenderingOptions < Stripe::StripeObject
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ attr_reader :amount_tax_display
+ end
+ # The account tax IDs associated with the invoice.
+ attr_reader :account_tax_ids
+ # Custom fields displayed on the invoice.
+ attr_reader :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Footer displayed on the invoice.
+ attr_reader :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_reader :issuer
+ # 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.
+ attr_reader :metadata
+ # Options for invoice PDF rendering.
+ attr_reader :rendering_options
+ end
+ # Indicates whether invoice creation is enabled for the Checkout Session.
+ attr_reader :enabled
+ # Attribute for field invoice_data
+ attr_reader :invoice_data
+ end
+
+ class OptionalItem < Stripe::StripeObject
+ class AdjustableQuantity < Stripe::StripeObject
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_reader :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ attr_reader :maximum
+ # 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.
+ attr_reader :minimum
+ end
+ # Attribute for field adjustable_quantity
+ attr_reader :adjustable_quantity
+ # Attribute for field price
+ attr_reader :price
+ # Attribute for field quantity
+ attr_reader :quantity
+ end
+
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
+ # ID of the payment method configuration used.
+ attr_reader :id
+ # ID of the parent payment method configuration used.
+ attr_reader :parent
+ end
+
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # A URL for custom mandate text
+ attr_reader :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
+ attr_reader :default_for
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ attr_reader :transaction_type
+ end
+ # Currency supported by the bank account. Returned when the Session is in `setup` mode.
+ attr_reader :currency
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+
+ class Affirm < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class AfterpayClearpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Alipay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class AmazonPay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class Bancontact < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Boleto < Stripe::StripeObject
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Card < Stripe::StripeObject
+ class Installments < Stripe::StripeObject
+ # Indicates if installments are enabled
+ attr_reader :enabled
+ end
+
+ class Restrictions < Stripe::StripeObject
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
+ attr_reader :brands_blocked
+ end
+ # Attribute for field installments
+ attr_reader :installments
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
+ attr_reader :request_extended_authorization
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
+ attr_reader :request_incremental_authorization
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
+ attr_reader :request_multicapture
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
+ attr_reader :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_reader :request_three_d_secure
+ # Attribute for field restrictions
+ attr_reader :restrictions
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_reader :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_reader :statement_descriptor_suffix_kanji
+ end
+
+ class Cashapp < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ attr_reader :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_reader :requested_address_types
+ # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_reader :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Eps < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Fpx < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Giropay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Grabpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Ideal < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class KakaoPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Klarna < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Konbini < Stripe::StripeObject
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class KrCard < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Link < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Mobilepay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Multibanco < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class NaverPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ end
+
+ class Oxxo < Stripe::StripeObject
+ # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class P24 < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Payco < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ end
+
+ class Paynow < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Paypal < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Preferred locale of the PayPal checkout page that the customer is redirected to.
+ attr_reader :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Pix < Stripe::StripeObject
+ # The number of seconds after which Pix payment will expire.
+ attr_reader :expires_after_seconds
+ end
+
+ class RevolutPay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class SamsungPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class Sofort < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Swish < Stripe::StripeObject
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
+ attr_reader :reference
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_reader :return_url
+ end
+ # Attribute for field financial_connections
+ attr_reader :financial_connections
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ attr_reader :customer_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field fpx
+ attr_reader :fpx
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field konbini
+ attr_reader :konbini
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field mobilepay
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field oxxo
+ attr_reader :oxxo
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field payco
+ attr_reader :payco
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field pix
+ attr_reader :pix
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class Permissions < Stripe::StripeObject
+ # Determines which entity is allowed to update the shipping details.
+ #
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ #
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ attr_reader :update_shipping_details
+ end
+
+ class PhoneNumberCollection < Stripe::StripeObject
+ # Indicates whether phone number collection is enabled for the session
+ attr_reader :enabled
+ end
+
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ attr_reader :presentment_currency
+ end
+
+ class SavedPaymentMethodOptions < Stripe::StripeObject
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
+ attr_reader :allow_redisplay_filters
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
+ attr_reader :payment_method_remove
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
+ attr_reader :payment_method_save
+ end
+
+ class ShippingAddressCollection < Stripe::StripeObject
+ # 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, SY, UM, VI`.
+ attr_reader :allowed_countries
+ end
+
+ class ShippingCost < Stripe::StripeObject
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # Total shipping cost before any discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
+ attr_reader :amount_tax
+ # Total shipping cost after discounts and taxes are applied.
+ attr_reader :amount_total
+ # The ID of the ShippingRate for this order.
+ attr_reader :shipping_rate
+ # The taxes applied to the shipping rate.
+ attr_reader :taxes
+ end
+
+ class ShippingOption < Stripe::StripeObject
+ # A non-negative integer in cents representing how much to charge.
+ attr_reader :shipping_amount
+ # The shipping rate.
+ attr_reader :shipping_rate
+ end
+
+ class TaxIdCollection < Stripe::StripeObject
+ # Indicates whether tax ID collection is enabled for the session
+ attr_reader :enabled
+ # Indicates whether a tax ID is required on the payment page
+ attr_reader :required
+ end
+
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ attr_reader :discount
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ attr_reader :breakdown
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CustomerDetails < Stripe::RequestParams
+ # Customer's email address.
+ attr_accessor :email
+
+ def initialize(email: nil)
+ @email = email
+ end
+ end
+ # Only return Checkout Sessions that were created during the given date interval.
+ attr_accessor :created
+ # Only return the Checkout Sessions for the Customer specified.
+ attr_accessor :customer
+ # Only return the Checkout Sessions for the Customer details specified.
+ attr_accessor :customer_details
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return the Checkout Session for the PaymentIntent specified.
+ attr_accessor :payment_intent
+ # Only return the Checkout Sessions for the Payment Link specified.
+ attr_accessor :payment_link
+ # 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.
+ attr_accessor :starting_after
+ # Only return the Checkout Sessions matching the given status.
+ attr_accessor :status
+ # Only return the Checkout Session for the subscription specified.
+ attr_accessor :subscription
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ customer_details: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ payment_link: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ )
+ @created = created
+ @customer = customer
+ @customer_details = customer_details
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @payment_link = payment_link
+ @starting_after = starting_after
+ @status = status
+ @subscription = subscription
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AdaptivePricing < Stripe::RequestParams
+ # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class AfterExpiration < Stripe::RequestParams
+ class Recovery < Stripe::RequestParams
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
+ attr_accessor :allow_promotion_codes
+ # If `true`, a recovery URL will be generated to recover this Checkout Session if it
+ # expires before a successful transaction is completed. It will be attached to the
+ # Checkout Session object upon expiration.
+ attr_accessor :enabled
+
+ def initialize(allow_promotion_codes: nil, enabled: nil)
+ @allow_promotion_codes = allow_promotion_codes
+ @enabled = enabled
+ end
+ end
+ # Configure a Checkout Session that can be used to recover an expired session.
+ attr_accessor :recovery
+
+ def initialize(recovery: nil)
+ @recovery = recovery
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ attr_accessor :position
+
+ def initialize(position: nil)
+ @position = position
+ end
+ end
+ # 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.
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ attr_accessor :terms_of_service
+
+ def initialize(
+ payment_method_reuse_agreement: nil,
+ promotions: nil,
+ terms_of_service: nil
+ )
+ @payment_method_reuse_agreement = payment_method_reuse_agreement
+ @promotions = promotions
+ @terms_of_service = terms_of_service
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_accessor :label
+ # 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.
+ attr_accessor :value
+
+ def initialize(label: nil, value: nil)
+ @label = label
+ @value = value
+ end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_accessor :options
+
+ def initialize(default_value: nil, options: nil)
+ @default_value = default_value
+ @options = options
+ end
+ end
+
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_accessor :custom
+ # The type of the label.
+ attr_accessor :type
+
+ def initialize(custom: nil, type: nil)
+ @custom = custom
+ @type = type
+ end
+ end
+
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+ # Configuration for `type=dropdown` fields.
+ attr_accessor :dropdown
+ # 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.
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ attr_accessor :text
+ # The type of the field.
+ attr_accessor :type
+
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ )
+ @dropdown = dropdown
+ @key = key
+ @label = label
+ @numeric = numeric
+ @optional = optional
+ @text = text
+ @type = type
+ end
+ end
+
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_accessor :terms_of_service_acceptance
+
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ )
+ @after_submit = after_submit
+ @shipping_address = shipping_address
+ @submit = submit
+ @terms_of_service_acceptance = terms_of_service_acceptance
+ end
+ end
+
+ class CustomerUpdate < Stripe::RequestParams
+ # Describes whether Checkout saves the billing address onto `customer.address`.
+ # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
+ attr_accessor :address
+ # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
+ attr_accessor :name
+ # Describes whether Checkout saves shipping information onto `customer.shipping`.
+ # To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
+ attr_accessor :shipping
+
+ def initialize(address: nil, name: nil, shipping: nil)
+ @address = address
+ @name = name
+ @shipping = shipping
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this Session.
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this Session.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, promotion_code: nil)
+ @coupon = coupon
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+
+ def initialize(amount_tax_display: nil)
+ @amount_tax_display = amount_tax_display
+ end
+ end
+ # The account tax IDs associated with the invoice.
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @custom_fields = custom_fields
+ @description = description
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @rendering_options = rendering_options
+ end
+ end
+ # Set to `true` to enable invoice creation.
+ attr_accessor :enabled
+ # Parameters passed when creating invoices for payment-mode Checkout Sessions.
+ attr_accessor :invoice_data
+
+ def initialize(enabled: nil, invoice_data: nil)
+ @enabled = enabled
+ @invoice_data = invoice_data
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
+ attr_accessor :maximum
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
+ attr_accessor :adjustable_quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
+ attr_accessor :dynamic_tax_rates
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
+ attr_accessor :quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
+ attr_accessor :tax_rates
+
+ def initialize(
+ adjustable_quantity: nil,
+ dynamic_tax_rates: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @adjustable_quantity = adjustable_quantity
+ @dynamic_tax_rates = dynamic_tax_rates
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # 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.
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @price = price
+ @quantity = quantity
+ end
+ end
+
+ class PaymentIntentData < Stripe::RequestParams
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. For details,
+ # see the PaymentIntents [use case for connected
+ # accounts](/docs/payments/connected-accounts).
+ attr_accessor :on_behalf_of
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the
+ # customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,
+ # Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ attr_accessor :setup_future_usage
+ # Shipping information for this payment.
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # The parameters used to automatically create a Transfer when the payment succeeds.
+ # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+ # 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.
+ attr_accessor :transfer_group
+
+ def initialize(
+ application_fee_amount: nil,
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @application_fee_amount = application_fee_amount
+ @capture_method = capture_method
+ @description = description
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @receipt_email = receipt_email
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout.
+ attr_accessor :allow_redisplay
+
+ def initialize(allow_redisplay: nil)
+ @allow_redisplay = allow_redisplay
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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). This is only accepted for Checkout Sessions in `setup` mode.
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(
+ currency: nil,
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @currency = currency
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ # Setting to true enables installments for this Checkout Session.
+ # Setting to false will prevent any installment plan from applying to a payment.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Restrictions < Stripe::RequestParams
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
+ attr_accessor :brands_blocked
+
+ def initialize(brands_blocked: nil)
+ @brands_blocked = brands_blocked
+ end
+ end
+ # Installment options for card payments
+ attr_accessor :installments
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # Restrictions to apply to the card payment method. For example, you can block specific card brands.
+ attr_accessor :restrictions
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+
+ def initialize(
+ installments: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ restrictions: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil
+ )
+ @installments = installments
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @restrictions = restrictions
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+
+ def initialize(expires_after_seconds: nil)
+ @expires_after_seconds = expires_after_seconds
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
+ attr_accessor :reference
+
+ def initialize(reference: nil)
+ @reference = reference
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(permissions: nil, prefetch: nil)
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # contains details about the AU Becs Debit payment method options.
+ attr_accessor :au_becs_debit
+ # contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # contains details about the Card payment method options.
+ attr_accessor :card
+ # contains details about the Cashapp Pay payment method options.
+ attr_accessor :cashapp
+ # contains details about the Customer Balance payment method options.
+ attr_accessor :customer_balance
+ # contains details about the EPS payment method options.
+ attr_accessor :eps
+ # contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # contains details about the Korean card payment method options.
+ attr_accessor :kr_card
+ # contains details about the Link payment method options.
+ attr_accessor :link
+ # contains details about the Mobilepay payment method options.
+ attr_accessor :mobilepay
+ # contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # contains details about the P24 payment method options.
+ attr_accessor :p24
+ # contains details about the Pay By Bank payment method options.
+ attr_accessor :pay_by_bank
+ # contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # contains details about the Pix payment method options.
+ attr_accessor :pix
+ # contains details about the RevolutPay payment method options.
+ attr_accessor :revolut_pay
+ # contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # contains details about the Sepa Debit payment method options.
+ attr_accessor :sepa_debit
+ # contains details about the Sofort payment method options.
+ attr_accessor :sofort
+ # contains details about the Swish payment method options.
+ attr_accessor :swish
+ # contains details about the Us Bank Account payment method options.
+ attr_accessor :us_bank_account
+ # contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ us_bank_account: nil,
+ wechat_pay: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @boleto = boleto
+ @card = card
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ end
+ end
+
+ class Permissions < Stripe::RequestParams
+ # Determines which entity is allowed to update the shipping details.
+ #
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ #
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ attr_accessor :update_shipping_details
+
+ def initialize(update_shipping_details: nil)
+ @update_shipping_details = update_shipping_details
+ end
+ end
+
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ #
+ # Can only be set in `payment` and `subscription` mode.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class SavedPaymentMethodOptions < Stripe::RequestParams
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
+ attr_accessor :allow_redisplay_filters
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
+ attr_accessor :payment_method_save
+
+ def initialize(allow_redisplay_filters: nil, payment_method_save: nil)
+ @allow_redisplay_filters = allow_redisplay_filters
+ @payment_method_save = payment_method_save
+ end
+ end
+
+ class SetupIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account for which the setup is intended.
+ attr_accessor :on_behalf_of
+
+ def initialize(description: nil, metadata: nil, on_behalf_of: nil)
+ @description = description
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ end
+ end
+
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ attr_accessor :allowed_countries
+
+ def initialize(allowed_countries: nil)
+ @allowed_countries = allowed_countries
+ end
+ end
+
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(issuer: nil)
+ @issuer = issuer
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # 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. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
+ attr_accessor :billing_cycle_anchor
+ # The tax rates that will apply to any subscription item that does not have
+ # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
+ # from the subscription.
+ attr_accessor :default_tax_rates
+ # 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 the [customer portal](https://stripe.com/docs/customer-management).
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # 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`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer
+ # will get before being charged for the first time. Has to be at least
+ # 48 hours in the future.
+ attr_accessor :trial_end
+ # Integer representing the number of trial period days before the
+ # customer is charged for the first time. Has to be at least 1.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ application_fee_percent: nil,
+ billing_cycle_anchor: nil,
+ default_tax_rates: nil,
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @application_fee_percent = application_fee_percent
+ @billing_cycle_anchor = billing_cycle_anchor
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @transfer_data = transfer_data
+ @trial_end = trial_end
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ attr_accessor :required
+
+ def initialize(enabled: nil, required: nil)
+ @enabled = enabled
+ @required = required
+ end
+ end
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ attr_accessor :adaptive_pricing
+ # Configure actions after a Checkout Session has expired.
+ attr_accessor :after_expiration
+ # Enables user redeemable promotion codes.
+ attr_accessor :allow_promotion_codes
+ # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
+ attr_accessor :automatic_tax
+ # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
+ attr_accessor :billing_address_collection
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
+ attr_accessor :cancel_url
+ # A unique string to reference the Checkout Session. This can be a
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
+ # session with your internal systems.
+ attr_accessor :client_reference_id
+ # Configure fields for the Checkout Session to gather active consent from customers.
+ attr_accessor :consent_collection
+ # 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). Required in `setup` mode when `payment_method_types` is not set.
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ attr_accessor :custom_text
+ # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card
+ # payment method will be used to prefill the email, name, card details, and billing address
+ # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
+ # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
+ #
+ # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
+ # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
+ #
+ # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.
+ #
+ # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
+ attr_accessor :customer
+ # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
+ #
+ # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
+ # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
+ #
+ # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
+ # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
+ #
+ # Can only be set in `payment` and `setup` mode.
+ attr_accessor :customer_creation
+ # If provided, this value will be used when the Customer object is created.
+ # If not provided, customers will be asked to enter their email address.
+ # Use this parameter to prefill customer data if you already have an email
+ # on file. To access information about the customer once a session is
+ # complete, use the `customer` field.
+ attr_accessor :customer_email
+ # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
+ attr_accessor :customer_update
+ # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
+ attr_accessor :expires_at
+ # Generate a post-purchase Invoice for one-time payments.
+ attr_accessor :invoice_creation
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+ #
+ # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
+ attr_accessor :line_items
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
+ attr_accessor :locale
+ # 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`.
+ attr_accessor :metadata
+ # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.
+ attr_accessor :mode
+ # 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).
+ #
+ # There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
+ #
+ # For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ attr_accessor :payment_method_collection
+ # The ID of the payment method configuration to use with this Checkout session.
+ attr_accessor :payment_method_configuration
+ # This parameter allows you to set some attributes on the payment method created during a Checkout session.
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration.
+ attr_accessor :payment_method_options
+ # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
+ #
+ # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
+ #
+ # Read more about the supported payment methods and their requirements in our [payment
+ # method details guide](/docs/payments/checkout/payment-methods).
+ #
+ # If multiple payment methods are passed, Checkout will dynamically reorder them to
+ # prioritize the most relevant payment methods based on the customer's location and
+ # other characteristics.
+ attr_accessor :payment_method_types
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ #
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
+ attr_accessor :permissions
+ # Controls phone number collection settings for the session.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts
+ # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
+ attr_accessor :phone_number_collection
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
+ attr_accessor :redirect_on_completion
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
+ # and redirect-based payment methods are enabled on the session.
+ attr_accessor :return_url
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+ attr_accessor :saved_payment_method_options
+ # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
+ attr_accessor :setup_intent_data
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ attr_accessor :shipping_options
+ # Describes the type of transaction being performed by Checkout in order
+ # to customize relevant text on the page, such as the submit button.
+ # `submit_type` can only be specified on Checkout Sessions in
+ # `payment` or `subscription` mode. If blank or `auto`, `pay` is used.
+ attr_accessor :submit_type
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
+ attr_accessor :subscription_data
+ # The URL to which Stripe should send customers when payment or setup
+ # is complete.
+ # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
+ # information from the successful Checkout Session on your page, read the
+ # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
+ attr_accessor :success_url
+ # Controls tax ID collection during checkout.
+ attr_accessor :tax_id_collection
+ # The UI mode of the Session. Defaults to `hosted`.
+ attr_accessor :ui_mode
+
+ def initialize(
+ adaptive_pricing: nil,
+ after_expiration: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ cancel_url: nil,
+ client_reference_id: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer: nil,
+ customer_creation: nil,
+ customer_email: nil,
+ customer_update: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ locale: nil,
+ metadata: nil,
+ mode: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ permissions: nil,
+ phone_number_collection: nil,
+ redirect_on_completion: nil,
+ return_url: nil,
+ saved_payment_method_options: nil,
+ setup_intent_data: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ success_url: nil,
+ tax_id_collection: nil,
+ ui_mode: nil
+ )
+ @adaptive_pricing = adaptive_pricing
+ @after_expiration = after_expiration
+ @allow_promotion_codes = allow_promotion_codes
+ @automatic_tax = automatic_tax
+ @billing_address_collection = billing_address_collection
+ @cancel_url = cancel_url
+ @client_reference_id = client_reference_id
+ @consent_collection = consent_collection
+ @currency = currency
+ @custom_fields = custom_fields
+ @custom_text = custom_text
+ @customer = customer
+ @customer_creation = customer_creation
+ @customer_email = customer_email
+ @customer_update = customer_update
+ @discounts = discounts
+ @expand = expand
+ @expires_at = expires_at
+ @invoice_creation = invoice_creation
+ @line_items = line_items
+ @locale = locale
+ @metadata = metadata
+ @mode = mode
+ @optional_items = optional_items
+ @payment_intent_data = payment_intent_data
+ @payment_method_collection = payment_method_collection
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @permissions = permissions
+ @phone_number_collection = phone_number_collection
+ @redirect_on_completion = redirect_on_completion
+ @return_url = return_url
+ @saved_payment_method_options = saved_payment_method_options
+ @setup_intent_data = setup_intent_data
+ @shipping_address_collection = shipping_address_collection
+ @shipping_options = shipping_options
+ @submit_type = submit_type
+ @subscription_data = subscription_data
+ @success_url = success_url
+ @tax_id_collection = tax_id_collection
+ @ui_mode = ui_mode
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CollectedInformation < Stripe::RequestParams
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The address of the customer
+ attr_accessor :address
+ # The name of customer
+ attr_accessor :name
+
+ def initialize(address: nil, name: nil)
+ @address = address
+ @name = name
+ end
+ end
+ # The shipping details to apply to this Session.
+ attr_accessor :shipping_details
+
+ def initialize(shipping_details: nil)
+ @shipping_details = shipping_details
+ end
+ end
+
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+ # Information about the customer collected within the Checkout Session.
+ attr_accessor :collected_information
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ attr_accessor :shipping_options
+
+ def initialize(
+ collected_information: nil,
+ expand: nil,
+ metadata: nil,
+ shipping_options: nil
+ )
+ @collected_information = collected_information
+ @expand = expand
+ @metadata = metadata
+ @shipping_options = shipping_options
+ end
+ end
+
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ attr_reader :adaptive_pricing
+ # When set, provides configuration for actions to take if this Checkout Session expires.
+ attr_reader :after_expiration
+ # Enables user redeemable promotion codes.
+ attr_reader :allow_promotion_codes
+ # Total of all items before discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total of all items after discounts and taxes are applied.
+ attr_reader :amount_total
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
+ attr_reader :billing_address_collection
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
+ attr_reader :cancel_url
+ # A unique string to reference the Checkout Session. This can be a
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
+ # Session with your internal systems.
+ attr_reader :client_reference_id
+ # The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded`. Client secret to be used when initializing Stripe.js embedded checkout.
+ attr_reader :client_secret
+ # Information about the customer collected within the Checkout Session.
+ attr_reader :collected_information
+ # Results of `consent_collection` for this session.
+ attr_reader :consent
+ # When set, provides configuration for the Checkout Session to gather active consent from customers.
+ attr_reader :consent_collection
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions
+ attr_reader :currency_conversion
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_reader :custom_fields
+ # Attribute for field custom_text
+ attr_reader :custom_text
+ # The ID of the customer for this Session.
+ # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout
+ # will create a new customer object based on information provided
+ # during the payment flow unless an existing customer was provided when
+ # the Session was created.
+ attr_reader :customer
+ # Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
+ attr_reader :customer_creation
+ # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode.
+ attr_reader :customer_details
+ # If provided, this value will be used when the Customer object is created.
+ # If not provided, customers will be asked to enter their email address.
+ # Use this parameter to prefill customer data if you already have an email
+ # on file. To access information about the customer once the payment flow is
+ # complete, use the `customer` attribute.
+ attr_reader :customer_email
+ # List of coupons and promotion codes attached to the Checkout Session.
+ attr_reader :discounts
+ # The timestamp at which the Checkout Session will expire.
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # ID of the invoice created by the Checkout Session, if it exists.
+ attr_reader :invoice
+ # Details on the state of invoice creation for the Checkout Session.
+ attr_reader :invoice_creation
+ # The line items purchased by the customer.
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
+ attr_reader :locale
+ # 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.
+ attr_reader :metadata
+ # The mode of the Checkout Session.
+ attr_reader :mode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The optional items presented to the customer at checkout.
+ attr_reader :optional_items
+ # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ attr_reader :payment_intent
+ # The ID of the Payment Link that created this Session.
+ attr_reader :payment_link
+ # Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
+ attr_reader :payment_method_collection
+ # Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
+ attr_reader :payment_method_configuration_details
+ # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
+ attr_reader :payment_method_options
+ # A list of the types of payment methods (e.g. card) this Checkout
+ # Session is allowed to accept.
+ attr_reader :payment_method_types
+ # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
+ # You can use this value to decide when to fulfill your customer's order.
+ attr_reader :payment_status
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ #
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
+ attr_reader :permissions
+ # Attribute for field phone_number_collection
+ attr_reader :phone_number_collection
+ # Attribute for field presentment_details
+ attr_reader :presentment_details
+ # The ID of the original expired Checkout Session that triggered the recovery flow.
+ attr_reader :recovered_from
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
+ attr_reader :redirect_on_completion
+ # Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
+ attr_reader :return_url
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+ attr_reader :saved_payment_method_options
+ # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ attr_reader :setup_intent
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
+ attr_reader :shipping_address_collection
+ # The details of the customer cost of shipping, including the customer chosen ShippingRate.
+ attr_reader :shipping_cost
+ # The shipping rate options applied to this Session.
+ attr_reader :shipping_options
+ # The status of the Checkout Session, one of `open`, `complete`, or `expired`.
+ attr_reader :status
+ # Describes the type of transaction being performed by Checkout in order to customize
+ # relevant text on the page, such as the submit button. `submit_type` can only be
+ # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
+ attr_reader :submit_type
+ # The ID of the subscription for Checkout Sessions in `subscription` mode.
+ attr_reader :subscription
+ # The URL the customer will be directed to after the payment or
+ # subscription creation is successful.
+ attr_reader :success_url
+ # Attribute for field tax_id_collection
+ attr_reader :tax_id_collection
+ # Tax and discount details for the computed total amount.
+ attr_reader :total_details
+ # The UI mode of the Session. Defaults to `hosted`.
+ attr_reader :ui_mode
+ # The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`
+ # This value is only present when the session is active.
+ attr_reader :url
+
# Creates a Checkout Session object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb
index ba630f38..3bf04e0a 100644
--- a/lib/stripe/resources/climate/order.rb
+++ b/lib/stripe/resources/climate/order.rb
@@ -15,6 +15,173 @@ module Stripe
"climate.order"
end
+ class Beneficiary < Stripe::StripeObject
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ attr_reader :public_name
+ end
+
+ class DeliveryDetail < Stripe::StripeObject
+ class Location < Stripe::StripeObject
+ # The city where the supplier is located.
+ attr_reader :city
+ # Two-letter ISO code representing the country where the supplier is located.
+ attr_reader :country
+ # The geographic latitude where the supplier is located.
+ attr_reader :latitude
+ # The geographic longitude where the supplier is located.
+ attr_reader :longitude
+ # The state/county/province/region where the supplier is located.
+ attr_reader :region
+ end
+ # Time at which the delivery occurred. Measured in seconds since the Unix epoch.
+ attr_reader :delivered_at
+ # Specific location of this delivery.
+ attr_reader :location
+ # Quantity of carbon removal supplied by this delivery.
+ attr_reader :metric_tons
+ # Once retired, a URL to the registry entry for the tons from this delivery.
+ attr_reader :registry_url
+ # A supplier of carbon removal.
+ attr_reader :supplier
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ attr_accessor :public_name
+
+ def initialize(public_name: nil)
+ @public_name = public_name
+ end
+ end
+ # Requested amount of carbon removal units. Either this or `metric_tons` must be specified.
+ attr_accessor :amount
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ attr_accessor :beneficiary
+ # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Requested number of tons for the order. Either this or `amount` must be specified.
+ attr_accessor :metric_tons
+ # Unique identifier of the Climate product.
+ attr_accessor :product
+
+ def initialize(
+ amount: nil,
+ beneficiary: nil,
+ currency: nil,
+ expand: nil,
+ metadata: nil,
+ metric_tons: nil,
+ product: nil
+ )
+ @amount = amount
+ @beneficiary = beneficiary
+ @currency = currency
+ @expand = expand
+ @metadata = metadata
+ @metric_tons = metric_tons
+ @product = product
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ attr_accessor :public_name
+
+ def initialize(public_name: nil)
+ @public_name = public_name
+ end
+ end
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ attr_accessor :beneficiary
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(beneficiary: nil, expand: nil, metadata: nil)
+ @beneficiary = beneficiary
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.
+ attr_reader :amount_fees
+ # Total amount of the carbon removal in the currency's smallest unit.
+ attr_reader :amount_subtotal
+ # Total amount of the order including fees in the currency's smallest unit.
+ attr_reader :amount_total
+ # Attribute for field beneficiary
+ attr_reader :beneficiary
+ # Time at which the order was canceled. Measured in seconds since the Unix epoch.
+ attr_reader :canceled_at
+ # Reason for the cancellation of this order.
+ attr_reader :cancellation_reason
+ # For delivered orders, a URL to a delivery certificate for the order.
+ attr_reader :certificate
+ # Time at which the order was confirmed. Measured in seconds since the Unix epoch.
+ attr_reader :confirmed_at
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order.
+ attr_reader :currency
+ # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
+ attr_reader :delayed_at
+ # Time at which the order was delivered. Measured in seconds since the Unix epoch.
+ attr_reader :delivered_at
+ # Details about the delivery of carbon removal for this order.
+ attr_reader :delivery_details
+ # The year this order is expected to be delivered.
+ attr_reader :expected_delivery_year
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # Quantity of carbon removal that is included in this order.
+ attr_reader :metric_tons
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Unique ID for the Climate `Product` this order is purchasing.
+ attr_reader :product
+ # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.
+ attr_reader :product_substituted_at
+ # The current status of this order.
+ attr_reader :status
+
# Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb
index d80743e0..39320fac 100644
--- a/lib/stripe/resources/climate/product.rb
+++ b/lib/stripe/resources/climate/product.rb
@@ -13,6 +13,53 @@ module Stripe
"climate.product"
end
+ class CurrentPricesPerMetricTon < Stripe::StripeObject
+ # Fees for one metric ton of carbon removal in the currency's smallest unit.
+ attr_reader :amount_fees
+ # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.
+ attr_reader :amount_subtotal
+ # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.
+ attr_reader :amount_total
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Current prices for a metric ton of carbon removal in a currency's smallest unit.
+ attr_reader :current_prices_per_metric_ton
+ # The year in which the carbon removal is expected to be delivered.
+ attr_reader :delivery_year
+ # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings
+ # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)
+ # for a list of available carbon removal products.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The quantity of metric tons available for reservation.
+ attr_reader :metric_tons_available
+ # The Climate product's name.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The carbon removal suppliers that fulfill orders for this Climate product.
+ attr_reader :suppliers
+
# Lists all available Climate product objects.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/climate/supplier.rb b/lib/stripe/resources/climate/supplier.rb
index e01dd24c..35a889b1 100644
--- a/lib/stripe/resources/climate/supplier.rb
+++ b/lib/stripe/resources/climate/supplier.rb
@@ -12,6 +12,51 @@ module Stripe
"climate.supplier"
end
+ class Location < Stripe::StripeObject
+ # The city where the supplier is located.
+ attr_reader :city
+ # Two-letter ISO code representing the country where the supplier is located.
+ attr_reader :country
+ # The geographic latitude where the supplier is located.
+ attr_reader :latitude
+ # The geographic longitude where the supplier is located.
+ attr_reader :longitude
+ # The state/county/province/region where the supplier is located.
+ attr_reader :region
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # Unique identifier for the object.
+ attr_reader :id
+ # Link to a webpage to learn more about the supplier.
+ attr_reader :info_url
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The locations in which this supplier operates.
+ attr_reader :locations
+ # Name of this carbon removal supplier.
+ attr_reader :name
+ # String representing the object’s type. Objects of the same type share the same value.
+ attr_reader :object
+ # The scientific pathway used for carbon removal.
+ attr_reader :removal_pathway
+
# Lists all available Climate supplier objects.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/confirmation_token.rb b/lib/stripe/resources/confirmation_token.rb
index bfda75f7..b54317e0 100644
--- a/lib/stripe/resources/confirmation_token.rb
+++ b/lib/stripe/resources/confirmation_token.rb
@@ -15,6 +15,1454 @@ module Stripe
"confirmation_token"
end
+ class MandateData < Stripe::StripeObject
+ class CustomerAcceptance < Stripe::StripeObject
+ class Online < Stripe::StripeObject
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_reader :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_reader :user_agent
+ end
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_reader :online
+ # The type of customer acceptance information included with the Mandate.
+ attr_reader :type
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_reader :customer_acceptance
+ end
+
+ class PaymentMethodOptions < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # The `cvc_update` Token collected from the Payment Element.
+ attr_reader :cvc_token
+ end
+ # This hash contains the card payment method options.
+ attr_reader :card
+ end
+
+ class PaymentMethodPreview < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Institution number of the bank account.
+ attr_reader :institution_number
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Transit number of the bank account.
+ attr_reader :transit_number
+ end
+
+ class Affirm < Stripe::StripeObject; end
+ class AfterpayClearpay < Stripe::StripeObject; end
+ class Alipay < Stripe::StripeObject; end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # Six-digit number identifying bank and branch associated with this bank account.
+ attr_reader :bsb_number
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_reader :sort_code
+ end
+
+ class Bancontact < Stripe::StripeObject; end
+ class Billie < Stripe::StripeObject; end
+
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Billing address.
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ # Billing phone number (including extension).
+ attr_reader :phone
+ end
+
+ class Blik < Stripe::StripeObject; end
+
+ class Boleto < Stripe::StripeObject
+ # Uniquely identifies the customer tax id (CNPJ or CPF)
+ attr_reader :tax_id
+ end
+
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :cvc_check
+ end
+
+ class GeneratedFrom < Stripe::StripeObject
+ class PaymentMethodDetails < Stripe::StripeObject
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ attr_reader :type
+ end
+
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ attr_reader :transaction_status_information
+ end
+
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ attr_reader :type
+ end
+ # The authorized amount
+ attr_reader :amount_authorized
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ attr_reader :brand_product
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
+ attr_reader :capture_before
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Authorization response cryptogram.
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # 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.
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
+ attr_reader :incremental_authorization_supported
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ attr_reader :network_transaction_id
+ # Details about payments collected offline.
+ attr_reader :offline
+ # Defines whether the authorized amount can be over-captured or not
+ attr_reader :overcapture_supported
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ attr_reader :receipt
+ # Attribute for field wallet
+ attr_reader :wallet
+ end
+ # Attribute for field card_present
+ attr_reader :card_present
+ # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.
+ attr_reader :type
+ end
+ # The charge that created this object.
+ attr_reader :charge
+ # Transaction-specific details of the payment method used in the payment.
+ attr_reader :payment_method_details
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ attr_reader :setup_attempt
+ end
+
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ attr_reader :available
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
+ attr_reader :preferred
+ end
+
+ class ThreeDSecureUsage < Stripe::StripeObject
+ # Whether 3D Secure is supported on this card.
+ attr_reader :supported
+ end
+
+ class Wallet < Stripe::StripeObject
+ class AmexExpressCheckout < Stripe::StripeObject; end
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+
+ class Masterpass < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :shipping_address
+ end
+
+ class SamsungPay < Stripe::StripeObject; end
+
+ class VisaCheckout < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :shipping_address
+ end
+ # Attribute for field amex_express_checkout
+ attr_reader :amex_express_checkout
+ # Attribute for field apple_pay
+ attr_reader :apple_pay
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ attr_reader :dynamic_last4
+ # Attribute for field google_pay
+ attr_reader :google_pay
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field masterpass
+ attr_reader :masterpass
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ attr_reader :type
+ # Attribute for field visa_checkout
+ attr_reader :visa_checkout
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # Checks on Card address and CVC if provided.
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future.
+ attr_reader :display_brand
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Details of the original PaymentMethod that created this object.
+ attr_reader :generated_from
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ attr_reader :networks
+ # Status of a card based on the card issuer.
+ attr_reader :regulated_status
+ # Contains details on how this Card may be used for 3D Secure authentication.
+ attr_reader :three_d_secure_usage
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ attr_reader :wallet
+ end
+
+ class CardPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ attr_reader :available
+ # The preferred network for the card.
+ attr_reader :preferred
+ end
+
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ attr_reader :type
+ end
+
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ attr_reader :type
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ attr_reader :brand_product
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ attr_reader :networks
+ # Details about payment methods collected offline.
+ attr_reader :offline
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ # Attribute for field wallet
+ attr_reader :wallet
+ end
+
+ class Cashapp < Stripe::StripeObject
+ # A unique and immutable identifier assigned by Cash App to every buyer.
+ attr_reader :buyer_id
+ # A public identifier for buyers using Cash App.
+ attr_reader :cashtag
+ end
+
+ class CustomerBalance < Stripe::StripeObject; end
+
+ class Eps < Stripe::StripeObject
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
+ attr_reader :bank
+ end
+
+ class Fpx < Stripe::StripeObject
+ # Account holder type, if provided. Can be one of `individual` or `company`.
+ attr_reader :account_holder_type
+ # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
+ attr_reader :bank
+ end
+
+ class Giropay < Stripe::StripeObject; end
+ class Grabpay < Stripe::StripeObject; end
+
+ class Ideal < Stripe::StripeObject
+ # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank, if the bank was provided.
+ attr_reader :bic
+ end
+
+ class InteracPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ attr_reader :available
+ # The preferred network for the card.
+ attr_reader :preferred
+ end
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
+ attr_reader :brand
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ attr_reader :networks
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ end
+
+ class KakaoPay < Stripe::StripeObject; end
+
+ class Klarna < Stripe::StripeObject
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ attr_reader :month
+ # The four-digit year of birth.
+ attr_reader :year
+ end
+ # The customer's date of birth, if provided.
+ attr_reader :dob
+ end
+
+ class Konbini < Stripe::StripeObject; end
+
+ class KrCard < Stripe::StripeObject
+ # The local credit or debit card brand.
+ attr_reader :brand
+ # The last four digits of the card. This may not be present for American Express cards.
+ attr_reader :last4
+ end
+
+ class Link < Stripe::StripeObject
+ # Account owner's email address.
+ attr_reader :email
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_reader :persistent_token
+ end
+
+ class Mobilepay < Stripe::StripeObject; end
+ class Multibanco < Stripe::StripeObject; end
+
+ class NaverPay < Stripe::StripeObject
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
+ attr_reader :buyer_id
+ # Whether to fund this transaction with Naver Pay points or a card.
+ attr_reader :funding
+ end
+
+ class NzBankAccount < Stripe::StripeObject
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_reader :account_holder_name
+ # The numeric code for the bank account's bank.
+ attr_reader :bank_code
+ # The name of the bank.
+ attr_reader :bank_name
+ # The numeric code for the bank account's bank branch.
+ attr_reader :branch_code
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # The suffix of the bank account number.
+ attr_reader :suffix
+ end
+
+ class Oxxo < Stripe::StripeObject; end
+
+ class P24 < Stripe::StripeObject
+ # The customer's bank, if provided.
+ attr_reader :bank
+ end
+
+ class PayByBank < Stripe::StripeObject; end
+ class Payco < Stripe::StripeObject; end
+ class Paynow < Stripe::StripeObject; end
+
+ class Paypal < Stripe::StripeObject
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :country
+ # Owner's email. Values are provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :payer_email
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ attr_reader :payer_id
+ end
+
+ class Pix < Stripe::StripeObject; end
+ class Promptpay < Stripe::StripeObject; end
+ class RevolutPay < Stripe::StripeObject; end
+ class SamsungPay < Stripe::StripeObject; end
+ class Satispay < Stripe::StripeObject; end
+
+ class SepaDebit < Stripe::StripeObject
+ class GeneratedFrom < Stripe::StripeObject
+ # The ID of the Charge that generated this PaymentMethod, if any.
+ attr_reader :charge
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ attr_reader :setup_attempt
+ end
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Branch code of bank associated with the bank account.
+ attr_reader :branch_code
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Information about the object that generated this PaymentMethod.
+ attr_reader :generated_from
+ # Last four characters of the IBAN.
+ attr_reader :last4
+ end
+
+ class Sofort < Stripe::StripeObject
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ end
+
+ class Swish < Stripe::StripeObject; end
+ class Twint < Stripe::StripeObject; end
+
+ class UsBankAccount < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # The preferred network.
+ attr_reader :preferred
+ # All supported networks.
+ attr_reader :supported
+ end
+
+ class StatusDetails < Stripe::StripeObject
+ class Blocked < Stripe::StripeObject
+ # The ACH network code that resulted in this block.
+ attr_reader :network_code
+ # The reason why this PaymentMethod's fingerprint has been blocked
+ attr_reader :reason
+ end
+ # Attribute for field blocked
+ attr_reader :blocked
+ end
+ # Account holder type: individual or company.
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_reader :account_type
+ # The name of the bank.
+ attr_reader :bank_name
+ # The ID of the Financial Connections Account used to create the payment method.
+ attr_reader :financial_connections_account
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Contains information about US bank account networks that can be used.
+ attr_reader :networks
+ # Routing number of the bank account.
+ attr_reader :routing_number
+ # Contains information about the future reusability of this PaymentMethod.
+ attr_reader :status_details
+ end
+
+ class WechatPay < Stripe::StripeObject; end
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # 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. The field defaults to “unspecified”.
+ attr_reader :allow_redisplay
+ # Attribute for field alma
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field billie
+ attr_reader :billie
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # Attribute for field blik
+ attr_reader :blik
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
+ attr_reader :customer
+ # Attribute for field customer_balance
+ attr_reader :customer_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field fpx
+ attr_reader :fpx
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field interac_present
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field konbini
+ attr_reader :konbini
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field mobilepay
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # Attribute for field oxxo
+ attr_reader :oxxo
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ attr_reader :payco
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field pix
+ attr_reader :pix
+ # Attribute for field promptpay
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # Attribute for field satispay
+ attr_reader :satispay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field twint
+ attr_reader :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ attr_reader :zip
+ end
+
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address
+ attr_accessor :address
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension)
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of an existing PaymentMethod.
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod.
+ attr_accessor :payment_method_data
+ # Return URL used to confirm the Intent.
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this ConfirmationToken's payment method.
+ #
+ # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
+ attr_accessor :setup_future_usage
+ # Shipping information for this ConfirmationToken.
+ attr_accessor :shipping
+
+ def initialize(
+ expand: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil
+ )
+ @expand = expand
+ @payment_method = payment_method
+ @payment_method_data = payment_method_data
+ @return_url = return_url
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Data used for generating a Mandate.
+ attr_reader :mandate_data
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
+ attr_reader :payment_intent
+ # Payment-method-specific configuration for this ConfirmationToken.
+ attr_reader :payment_method_options
+ # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
+ attr_reader :payment_method_preview
+ # Return URL used to confirm the Intent.
+ attr_reader :return_url
+ # Indicates that you intend to make future payments with this ConfirmationToken's payment method.
+ #
+ # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
+ attr_reader :setup_future_usage
+ # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
+ attr_reader :setup_intent
+ # Shipping information collected on this ConfirmationToken.
+ attr_reader :shipping
+ # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.
+ attr_reader :use_stripe_sdk
+
def test_helpers
TestHelpers.new(self)
end
diff --git a/lib/stripe/resources/connect_collection_transfer.rb b/lib/stripe/resources/connect_collection_transfer.rb
new file mode 100644
index 00000000..3e0d4fc7
--- /dev/null
+++ b/lib/stripe/resources/connect_collection_transfer.rb
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ class ConnectCollectionTransfer < APIResource
+ OBJECT_NAME = "connect_collection_transfer"
+ def self.object_name
+ "connect_collection_transfer"
+ end
+
+ # Amount transferred, in cents (or local equivalent).
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # ID of the account that funds are being collected for.
+ attr_reader :destination
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ end
+end
diff --git a/lib/stripe/resources/country_spec.rb b/lib/stripe/resources/country_spec.rb
index c463c5d0..d448586e 100644
--- a/lib/stripe/resources/country_spec.rb
+++ b/lib/stripe/resources/country_spec.rb
@@ -16,6 +16,60 @@ module Stripe
"country_spec"
end
+ class VerificationFields < Stripe::StripeObject
+ class Company < Stripe::StripeObject
+ # Additional fields which are only required for some users.
+ attr_reader :additional
+ # Fields which every account must eventually provide.
+ attr_reader :minimum
+ end
+
+ class Individual < Stripe::StripeObject
+ # Additional fields which are only required for some users.
+ attr_reader :additional
+ # Fields which every account must eventually provide.
+ attr_reader :minimum
+ end
+ # Attribute for field company
+ attr_reader :company
+ # Attribute for field individual
+ attr_reader :individual
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # The default currency for this country. This applies to both payment methods and bank accounts.
+ attr_reader :default_currency
+ # Unique identifier for the object. Represented as the ISO country code for this country.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Currencies that can be accepted in the specific country (for transfers).
+ attr_reader :supported_bank_account_currencies
+ # Currencies that can be accepted in the specified country (for payments).
+ attr_reader :supported_payment_currencies
+ # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).
+ attr_reader :supported_payment_methods
+ # Countries that can accept transfers from the specified country.
+ attr_reader :supported_transfer_countries
+ # Attribute for field verification_fields
+ attr_reader :verification_fields
+
# Lists all Country Spec objects available in the API.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/country_specs", params: params, opts: opts)
diff --git a/lib/stripe/resources/coupon.rb b/lib/stripe/resources/coupon.rb
index 99942322..946d46fd 100644
--- a/lib/stripe/resources/coupon.rb
+++ b/lib/stripe/resources/coupon.rb
@@ -16,6 +16,191 @@ module Stripe
"coupon"
end
+ class AppliesTo < Stripe::StripeObject
+ # A list of product IDs this coupon applies to
+ attr_reader :products
+ end
+
+ class CurrencyOptions < Stripe::StripeObject
+ # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
+ attr_reader :amount_off
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ attr_accessor :amount_off
+
+ def initialize(amount_off: nil)
+ @amount_off = amount_off
+ end
+ end
+ # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ attr_accessor :name
+
+ def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil)
+ @currency_options = currency_options
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AppliesTo < Stripe::RequestParams
+ # An array of Product IDs that this Coupon will apply to.
+ attr_accessor :products
+
+ def initialize(products: nil)
+ @products = products
+ end
+ end
+
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ attr_accessor :amount_off
+
+ def initialize(amount_off: nil)
+ @amount_off = amount_off
+ end
+ end
+ # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
+ attr_accessor :amount_off
+ # A hash containing directions for what this Coupon will apply discounts to.
+ attr_accessor :applies_to
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
+ attr_accessor :currency
+ # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
+ attr_accessor :duration
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.
+ attr_accessor :id
+ # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
+ attr_accessor :max_redemptions
+ # 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`.
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ attr_accessor :name
+ # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
+ attr_accessor :percent_off
+ # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
+ attr_accessor :redeem_by
+
+ def initialize(
+ amount_off: nil,
+ applies_to: nil,
+ currency: nil,
+ currency_options: nil,
+ duration: nil,
+ expand: nil,
+ id: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ name: nil,
+ percent_off: nil,
+ redeem_by: nil
+ )
+ @amount_off = amount_off
+ @applies_to = applies_to
+ @currency = currency
+ @currency_options = currency_options
+ @duration = duration
+ @expand = expand
+ @id = id
+ @max_redemptions = max_redemptions
+ @metadata = metadata
+ @name = name
+ @percent_off = percent_off
+ @redeem_by = redeem_by
+ end
+ end
+ # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
+ attr_reader :amount_off
+ # Attribute for field applies_to
+ attr_reader :applies_to
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
+ attr_reader :currency
+ # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_reader :currency_options
+ # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
+ attr_reader :duration
+ # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.
+ attr_reader :duration_in_months
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
+ attr_reader :max_redemptions
+ # 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.
+ attr_reader :metadata
+ # Name of the coupon displayed to customers on for instance invoices or receipts.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
+ attr_reader :percent_off
+ # Date after which the coupon can no longer be redeemed.
+ attr_reader :redeem_by
+ # Number of times this coupon has been applied to a customer.
+ attr_reader :times_redeemed
+ # Taking account of the above properties, whether this coupon can still be applied to a customer.
+ attr_reader :valid
+ # Always true for a deleted object
+ attr_reader :deleted
+
# You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
#
# A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb
index a0bf41a0..14d80484 100644
--- a/lib/stripe/resources/credit_note.rb
+++ b/lib/stripe/resources/credit_note.rb
@@ -15,6 +15,645 @@ module Stripe
"credit_note"
end
+ class DiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ attr_reader :discount
+ end
+
+ class PretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ attr_reader :type
+ end
+
+ class Refund < Stripe::StripeObject
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent).
+ attr_reader :amount_refunded
+ # ID of the refund.
+ attr_reader :refund
+ end
+
+ class ShippingCost < Stripe::StripeObject
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # Total shipping cost before any taxes are applied.
+ attr_reader :amount_subtotal
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
+ attr_reader :amount_tax
+ # Total shipping cost after taxes are applied.
+ attr_reader :amount_total
+ # The ID of the ShippingRate for this invoice.
+ attr_reader :shipping_rate
+ # The taxes applied to the shipping rate.
+ attr_reader :taxes
+ end
+
+ class TotalTax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ # The type of tax information.
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return credit notes that were created during the given date interval.
+ attr_accessor :created
+ # Only return credit notes for the customer specified by this customer ID.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return credit notes for the invoice specified by this invoice ID.
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate = tax_rate
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @invoice_line_item = invoice_line_item
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ @type = type
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ attr_accessor :refund
+
+ def initialize(amount_refunded: nil, refund: nil)
+ @amount_refunded = amount_refunded
+ @refund = refund
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the invoice.
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ attr_accessor :shipping_cost
+
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ )
+ @amount = amount
+ @credit_amount = credit_amount
+ @effective_at = effective_at
+ @email_type = email_type
+ @expand = expand
+ @invoice = invoice
+ @lines = lines
+ @memo = memo
+ @metadata = metadata
+ @out_of_band_amount = out_of_band_amount
+ @reason = reason
+ @refund_amount = refund_amount
+ @refunds = refunds
+ @shipping_cost = shipping_cost
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Credit note memo.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, memo: nil, metadata: nil)
+ @expand = expand
+ @memo = memo
+ @metadata = metadata
+ end
+ end
+
+ class PreviewParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate = tax_rate
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @invoice_line_item = invoice_line_item
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ @type = type
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ attr_accessor :refund
+
+ def initialize(amount_refunded: nil, refund: nil)
+ @amount_refunded = amount_refunded
+ @refund = refund
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the invoice.
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ attr_accessor :shipping_cost
+
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ )
+ @amount = amount
+ @credit_amount = credit_amount
+ @effective_at = effective_at
+ @email_type = email_type
+ @expand = expand
+ @invoice = invoice
+ @lines = lines
+ @memo = memo
+ @metadata = metadata
+ @out_of_band_amount = out_of_band_amount
+ @reason = reason
+ @refund_amount = refund_amount
+ @refunds = refunds
+ @shipping_cost = shipping_cost
+ end
+ end
+
+ class ListPreviewLineItemsParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate = tax_rate
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @invoice_line_item = invoice_line_item
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ @type = type
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ attr_accessor :refund
+
+ def initialize(amount_refunded: nil, refund: nil)
+ @amount_refunded = amount_refunded
+ @refund = refund
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ attr_accessor :email_type
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the invoice.
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Line items that make up the credit note.
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ attr_accessor :shipping_cost
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil,
+ starting_after: nil
+ )
+ @amount = amount
+ @credit_amount = credit_amount
+ @effective_at = effective_at
+ @email_type = email_type
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @lines = lines
+ @memo = memo
+ @metadata = metadata
+ @out_of_band_amount = out_of_band_amount
+ @reason = reason
+ @refund_amount = refund_amount
+ @refunds = refunds
+ @shipping_cost = shipping_cost
+ @starting_after = starting_after
+ end
+ end
+
+ class VoidCreditNoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
+ attr_reader :amount
+ # This is the sum of all the shipping amounts.
+ attr_reader :amount_shipping
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # ID of the customer.
+ attr_reader :customer
+ # Customer balance transaction related to this credit note.
+ attr_reader :customer_balance_transaction
+ # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
+ attr_reader :discount_amount
+ # The aggregate amounts calculated per discount for all line items.
+ attr_reader :discount_amounts
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_reader :effective_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # ID of the invoice.
+ attr_reader :invoice
+ # Line items that make up the credit note
+ attr_reader :lines
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Customer-facing text that appears on the credit note PDF.
+ attr_reader :memo
+ # 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.
+ attr_reader :metadata
+ # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Amount that was credited outside of Stripe.
+ attr_reader :out_of_band_amount
+ # The link to download the PDF of the credit note.
+ attr_reader :pdf
+ # The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
+ attr_reader :pretax_credit_amounts
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_reader :reason
+ # Refunds related to this credit note.
+ attr_reader :refunds
+ # The details of the cost of shipping, including the ShippingRate applied to the invoice.
+ attr_reader :shipping_cost
+ # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
+ attr_reader :status
+ # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
+ attr_reader :subtotal
+ # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
+ attr_reader :subtotal_excluding_tax
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
+ attr_reader :total
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
+ attr_reader :total_excluding_tax
+ # The aggregate tax information for all line items.
+ attr_reader :total_taxes
+ # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
+ attr_reader :type
+ # The time that the credit note was voided.
+ attr_reader :voided_at
+
# Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
# its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
# in any combination of the following:
diff --git a/lib/stripe/resources/credit_note_line_item.rb b/lib/stripe/resources/credit_note_line_item.rb
index 8782c90f..8f159a65 100644
--- a/lib/stripe/resources/credit_note_line_item.rb
+++ b/lib/stripe/resources/credit_note_line_item.rb
@@ -8,5 +8,72 @@ module Stripe
def self.object_name
"credit_note_line_item"
end
+
+ class DiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ attr_reader :discount
+ end
+
+ class PretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ attr_reader :type
+ end
+
+ class Tax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ # The type of tax information.
+ attr_reader :type
+ end
+ # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
+ attr_reader :amount
+ # Description of the item being credited.
+ attr_reader :description
+ # The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
+ attr_reader :discount_amount
+ # The amount of discount calculated per discount for this line item
+ attr_reader :discount_amounts
+ # Unique identifier for the object.
+ attr_reader :id
+ # ID of the invoice line item being credited
+ attr_reader :invoice_line_item
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
+ attr_reader :pretax_credit_amounts
+ # The number of units of product being credited.
+ attr_reader :quantity
+ # The tax rates which apply to the line item.
+ attr_reader :tax_rates
+ # The tax information of the line item.
+ attr_reader :taxes
+ # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.
+ attr_reader :type
+ # The cost of each unit of product being credited.
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :unit_amount_decimal
end
end
diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb
index 630a0560..0520033c 100644
--- a/lib/stripe/resources/customer.rb
+++ b/lib/stripe/resources/customer.rb
@@ -22,6 +22,830 @@ module Stripe
nested_resource_class_methods :source, operations: %i[create retrieve update delete list]
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class InvoiceSettings < Stripe::StripeObject
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ attr_reader :name
+ # The value of the custom field.
+ attr_reader :value
+ end
+
+ class RenderingOptions < Stripe::StripeObject
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ attr_reader :amount_tax_display
+ # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
+ attr_reader :template
+ end
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_reader :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ attr_reader :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ attr_reader :footer
+ # Default options for invoice PDF rendering for this customer.
+ attr_reader :rendering_options
+ end
+
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_reader :carrier
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :tracking_number
+ end
+
+ class Tax < Stripe::StripeObject
+ class Location < Stripe::StripeObject
+ # The identified tax country of the customer.
+ attr_reader :country
+ # The data source used to infer the customer's location.
+ attr_reader :source
+ # The identified tax state, county, province, or region of the customer.
+ attr_reader :state
+ end
+ # Surfaces if automatic tax computation is possible given the current customer location information.
+ attr_reader :automatic_tax
+ # A recent IP address of the customer used for tax reporting and tax location inference.
+ attr_reader :ip_address
+ # The identified tax location of the customer.
+ attr_reader :location
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ attr_accessor :reconciliation_mode
+
+ def initialize(reconciliation_mode: nil)
+ @reconciliation_mode = reconciliation_mode
+ end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ attr_accessor :settings
+
+ def initialize(settings: nil)
+ @settings = settings
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ attr_accessor :template
+
+ def initialize(amount_tax_display: nil, template: nil)
+ @amount_tax_display = amount_tax_display
+ @template = template
+ end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ )
+ @custom_fields = custom_fields
+ @default_payment_method = default_payment_method
+ @footer = footer
+ @rendering_options = rendering_options
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Customer shipping address.
+ attr_accessor :address
+ # Customer name.
+ attr_accessor :name
+ # Customer phone (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`.
+ attr_accessor :validate_location
+
+ def initialize(ip_address: nil, validate_location: nil)
+ @ip_address = ip_address
+ @validate_location = validate_location
+ end
+ end
+ # The customer's address.
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ attr_accessor :cash_balance
+ # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.
+ #
+ # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
+ #
+ # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.
+ attr_accessor :default_source
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ attr_accessor :invoice_settings
+ # 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`.
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ attr_accessor :next_invoice_sequence
+ # The customer's phone number.
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ attr_accessor :shipping
+ # Attribute for param field source
+ attr_accessor :source
+ # Tax details about the customer.
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ attr_accessor :tax_exempt
+ # Attribute for param field validate
+ attr_accessor :validate
+
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ default_source: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ validate: nil
+ )
+ @address = address
+ @balance = balance
+ @cash_balance = cash_balance
+ @default_source = default_source
+ @description = description
+ @email = email
+ @expand = expand
+ @invoice_prefix = invoice_prefix
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @name = name
+ @next_invoice_sequence = next_invoice_sequence
+ @phone = phone
+ @preferred_locales = preferred_locales
+ @shipping = shipping
+ @source = source
+ @tax = tax
+ @tax_exempt = tax_exempt
+ @validate = validate
+ end
+ end
+
+ class DeleteDiscountParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return customers that were created during the given date interval.
+ attr_accessor :created
+ # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
+ attr_accessor :email
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
+ attr_accessor :test_clock
+
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ test_clock: nil
+ )
+ @created = created
+ @email = email
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @test_clock = test_clock
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ attr_accessor :reconciliation_mode
+
+ def initialize(reconciliation_mode: nil)
+ @reconciliation_mode = reconciliation_mode
+ end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ attr_accessor :settings
+
+ def initialize(settings: nil)
+ @settings = settings
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ attr_accessor :template
+
+ def initialize(amount_tax_display: nil, template: nil)
+ @amount_tax_display = amount_tax_display
+ @template = template
+ end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ )
+ @custom_fields = custom_fields
+ @default_payment_method = default_payment_method
+ @footer = footer
+ @rendering_options = rendering_options
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Customer shipping address.
+ attr_accessor :address
+ # Customer name.
+ attr_accessor :name
+ # Customer phone (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.
+ attr_accessor :validate_location
+
+ def initialize(ip_address: nil, validate_location: nil)
+ @ip_address = ip_address
+ @validate_location = validate_location
+ end
+ end
+
+ class TaxIdDatum < Stripe::RequestParams
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(type: nil, value: nil)
+ @type = type
+ @value = value
+ end
+ end
+ # The customer's address.
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ attr_accessor :cash_balance
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ attr_accessor :invoice_settings
+ # 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`.
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ attr_accessor :next_invoice_sequence
+ # Attribute for param field payment_method
+ attr_accessor :payment_method
+ # The customer's phone number.
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ attr_accessor :shipping
+ # Attribute for param field source
+ attr_accessor :source
+ # Tax details about the customer.
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ attr_accessor :tax_id_data
+ # ID of the test clock to attach to the customer.
+ attr_accessor :test_clock
+ # Attribute for param field validate
+ attr_accessor :validate
+
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ payment_method: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ tax_id_data: nil,
+ test_clock: nil,
+ validate: nil
+ )
+ @address = address
+ @balance = balance
+ @cash_balance = cash_balance
+ @description = description
+ @email = email
+ @expand = expand
+ @invoice_prefix = invoice_prefix
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @name = name
+ @next_invoice_sequence = next_invoice_sequence
+ @payment_method = payment_method
+ @phone = phone
+ @preferred_locales = preferred_locales
+ @shipping = shipping
+ @source = source
+ @tax = tax
+ @tax_exempt = tax_exempt
+ @tax_id_data = tax_id_data
+ @test_clock = test_clock
+ @validate = validate
+ end
+ end
+
+ class ListPaymentMethodsParams < Stripe::RequestParams
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ attr_accessor :type
+
+ def initialize(
+ allow_redisplay: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @allow_redisplay = allow_redisplay
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class RetrievePaymentMethodParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class CreateFundingInstructionsParams < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The type of the `bank_transfer`
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Additional parameters for `bank_transfer` funding types
+ attr_accessor :bank_transfer
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The `funding_type` to get the instructions for.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @currency = currency
+ @expand = expand
+ @funding_type = funding_type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FundCashBalanceParams < Stripe::RequestParams
+ # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
+ attr_accessor :reference
+
+ def initialize(amount: nil, currency: nil, expand: nil, reference: nil)
+ @amount = amount
+ @currency = currency
+ @expand = expand
+ @reference = reference
+ end
+ end
+ # The customer's address.
+ attr_reader :address
+ # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
+ attr_reader :balance
+ # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.
+ attr_reader :cash_balance
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.
+ attr_reader :currency
+ # ID of the default payment source for the customer.
+ #
+ # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.
+ attr_reader :default_source
+ # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.
+ #
+ # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.
+ #
+ # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`.
+ attr_reader :delinquent
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Describes the current discount active on the customer, if there is one.
+ attr_reader :discount
+ # The customer's email address.
+ attr_reader :email
+ # Unique identifier for the object.
+ attr_reader :id
+ # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.
+ attr_reader :invoice_credit_balance
+ # The prefix for the customer used to generate unique invoice numbers.
+ attr_reader :invoice_prefix
+ # Attribute for field invoice_settings
+ attr_reader :invoice_settings
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The customer's full name or business name.
+ attr_reader :name
+ # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
+ attr_reader :next_invoice_sequence
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The customer's phone number.
+ attr_reader :phone
+ # The customer's preferred locales (languages), ordered by preference.
+ attr_reader :preferred_locales
+ # Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
+ attr_reader :shipping
+ # The customer's payment sources, if any.
+ attr_reader :sources
+ # The customer's current subscriptions, if any.
+ attr_reader :subscriptions
+ # Attribute for field tax
+ attr_reader :tax
+ # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**.
+ attr_reader :tax_exempt
+ # The customer's tax IDs.
+ attr_reader :tax_ids
+ # ID of the test clock that this customer belongs to.
+ attr_reader :test_clock
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new customer object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/customers", params: params, opts: opts)
diff --git a/lib/stripe/resources/customer_balance_transaction.rb b/lib/stripe/resources/customer_balance_transaction.rb
index b72efd03..bbb3a34e 100644
--- a/lib/stripe/resources/customer_balance_transaction.rb
+++ b/lib/stripe/resources/customer_balance_transaction.rb
@@ -16,6 +16,35 @@ module Stripe
"customer_balance_transaction"
end
+ # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.
+ attr_reader :amount
+ # The ID of the checkout session (if any) that created the transaction.
+ attr_reader :checkout_session
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The ID of the credit note (if any) related to the transaction.
+ attr_reader :credit_note
+ # 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).
+ attr_reader :currency
+ # The ID of the customer the transaction belongs to.
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
+ attr_reader :ending_balance
+ # Unique identifier for the object.
+ attr_reader :id
+ # The ID of the invoice (if any) related to the transaction.
+ attr_reader :invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.
+ attr_reader :type
+
def resource_url
if !respond_to?(:customer) || customer.nil?
raise NotImplementedError,
diff --git a/lib/stripe/resources/customer_cash_balance_transaction.rb b/lib/stripe/resources/customer_cash_balance_transaction.rb
index 3d072e91..8324de9e 100644
--- a/lib/stripe/resources/customer_cash_balance_transaction.rb
+++ b/lib/stripe/resources/customer_cash_balance_transaction.rb
@@ -11,5 +11,114 @@ module Stripe
def self.object_name
"customer_cash_balance_transaction"
end
+
+ class AdjustedForOverdraft < Stripe::StripeObject
+ # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
+ attr_reader :balance_transaction
+ # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
+ attr_reader :linked_transaction
+ end
+
+ class AppliedToPayment < Stripe::StripeObject
+ # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
+ attr_reader :payment_intent
+ end
+
+ class Funded < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The BIC of the bank of the sender of the funding.
+ attr_reader :bic
+ # The last 4 digits of the IBAN of the sender of the funding.
+ attr_reader :iban_last4
+ # The full name of the sender, as supplied by the sending bank.
+ attr_reader :sender_name
+ end
+
+ class GbBankTransfer < Stripe::StripeObject
+ # The last 4 digits of the account number of the sender of the funding.
+ attr_reader :account_number_last4
+ # The full name of the sender, as supplied by the sending bank.
+ attr_reader :sender_name
+ # The sort code of the bank of the sender of the funding
+ attr_reader :sort_code
+ end
+
+ class JpBankTransfer < Stripe::StripeObject
+ # The name of the bank of the sender of the funding.
+ attr_reader :sender_bank
+ # The name of the bank branch of the sender of the funding.
+ attr_reader :sender_branch
+ # The full name of the sender, as supplied by the sending bank.
+ attr_reader :sender_name
+ end
+
+ class UsBankTransfer < Stripe::StripeObject
+ # The banking network used for this funding.
+ attr_reader :network
+ # The full name of the sender, as supplied by the sending bank.
+ attr_reader :sender_name
+ end
+ # Attribute for field eu_bank_transfer
+ attr_reader :eu_bank_transfer
+ # Attribute for field gb_bank_transfer
+ attr_reader :gb_bank_transfer
+ # Attribute for field jp_bank_transfer
+ attr_reader :jp_bank_transfer
+ # The user-supplied reference field on the bank transfer.
+ attr_reader :reference
+ # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_reader :type
+ # Attribute for field us_bank_transfer
+ attr_reader :us_bank_transfer
+ end
+ # Attribute for field bank_transfer
+ attr_reader :bank_transfer
+ end
+
+ class RefundedFromPayment < Stripe::StripeObject
+ # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.
+ attr_reader :refund
+ end
+
+ class TransferredToBalance < Stripe::StripeObject
+ # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.
+ attr_reader :balance_transaction
+ end
+
+ class UnappliedFromPayment < Stripe::StripeObject
+ # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.
+ attr_reader :payment_intent
+ end
+ # Attribute for field adjusted_for_overdraft
+ attr_reader :adjusted_for_overdraft
+ # Attribute for field applied_to_payment
+ attr_reader :applied_to_payment
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # The customer whose available cash balance changed as a result of this transaction.
+ attr_reader :customer
+ # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :ending_balance
+ # Attribute for field funded
+ attr_reader :funded
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
+ attr_reader :net_amount
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field refunded_from_payment
+ attr_reader :refunded_from_payment
+ # Attribute for field transferred_to_balance
+ attr_reader :transferred_to_balance
+ # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
+ attr_reader :type
+ # Attribute for field unapplied_from_payment
+ attr_reader :unapplied_from_payment
end
end
diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb
index b6af08c2..e0d77972 100644
--- a/lib/stripe/resources/customer_session.rb
+++ b/lib/stripe/resources/customer_session.rb
@@ -16,6 +16,165 @@ module Stripe
"customer_session"
end
+ class Components < Stripe::StripeObject
+ class BuyButton < Stripe::StripeObject
+ # Whether the buy button is enabled.
+ attr_reader :enabled
+ end
+
+ class PaymentElement < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
+ #
+ # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
+ attr_reader :payment_method_allow_redisplay_filters
+ # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
+ attr_reader :payment_method_redisplay
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
+ attr_reader :payment_method_redisplay_limit
+ # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
+ #
+ # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
+ attr_reader :payment_method_remove
+ # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
+ #
+ # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
+ attr_reader :payment_method_save
+ # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
+ #
+ # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
+ attr_reader :payment_method_save_usage
+ end
+ # Whether the Payment Element is enabled.
+ attr_reader :enabled
+ # This hash defines whether the Payment Element supports certain features.
+ attr_reader :features
+ end
+
+ class PricingTable < Stripe::StripeObject
+ # Whether the pricing table is enabled.
+ attr_reader :enabled
+ end
+ # This hash contains whether the buy button is enabled.
+ attr_reader :buy_button
+ # This hash contains whether the Payment Element is enabled and the features it supports.
+ attr_reader :payment_element
+ # This hash contains whether the pricing table is enabled.
+ attr_reader :pricing_table
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class BuyButton < Stripe::RequestParams
+ # Whether the buy button is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class PaymentElement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
+ #
+ # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
+ attr_accessor :payment_method_allow_redisplay_filters
+ # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
+ attr_accessor :payment_method_redisplay
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
+ attr_accessor :payment_method_redisplay_limit
+ # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
+ #
+ # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
+ attr_accessor :payment_method_remove
+ # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
+ #
+ # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
+ attr_accessor :payment_method_save
+ # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
+ #
+ # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
+ attr_accessor :payment_method_save_usage
+
+ def initialize(
+ payment_method_allow_redisplay_filters: nil,
+ payment_method_redisplay: nil,
+ payment_method_redisplay_limit: nil,
+ payment_method_remove: nil,
+ payment_method_save: nil,
+ payment_method_save_usage: nil
+ )
+ @payment_method_allow_redisplay_filters = payment_method_allow_redisplay_filters
+ @payment_method_redisplay = payment_method_redisplay
+ @payment_method_redisplay_limit = payment_method_redisplay_limit
+ @payment_method_remove = payment_method_remove
+ @payment_method_save = payment_method_save
+ @payment_method_save_usage = payment_method_save_usage
+ end
+ end
+ # Whether the Payment Element is enabled.
+ attr_accessor :enabled
+ # This hash defines whether the Payment Element supports certain features.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class PricingTable < Stripe::RequestParams
+ # Whether the pricing table is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+ # Configuration for buy button.
+ attr_accessor :buy_button
+ # Configuration for the Payment Element.
+ attr_accessor :payment_element
+ # Configuration for the pricing table.
+ attr_accessor :pricing_table
+
+ def initialize(buy_button: nil, payment_element: nil, pricing_table: nil)
+ @buy_button = buy_button
+ @payment_element = payment_element
+ @pricing_table = pricing_table
+ end
+ end
+ # Configuration for each component. Exactly 1 component must be enabled.
+ attr_accessor :components
+ # The ID of an existing customer for which to create the Customer Session.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(components: nil, customer: nil, expand: nil)
+ @components = components
+ @customer = customer
+ @expand = expand
+ end
+ end
+ # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.
+ #
+ # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ attr_reader :client_secret
+ # Configuration for the components supported by this Customer Session.
+ attr_reader :components
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The Customer the Customer Session was created for.
+ attr_reader :customer
+ # The timestamp at which this Customer Session will expire.
+ attr_reader :expires_at
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
# Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/discount.rb b/lib/stripe/resources/discount.rb
index e0278cd3..4be0398a 100644
--- a/lib/stripe/resources/discount.rb
+++ b/lib/stripe/resources/discount.rb
@@ -11,5 +11,34 @@ module Stripe
def self.object_name
"discount"
end
+
+ # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
+ attr_reader :checkout_session
+ # A coupon contains information about a percent-off or amount-off discount you
+ # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
+ # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
+ attr_reader :coupon
+ # The ID of the customer associated with this discount.
+ attr_reader :customer
+ # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
+ attr_reader :end
+ # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
+ attr_reader :id
+ # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
+ attr_reader :invoice
+ # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
+ attr_reader :invoice_item
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The promotion code applied to create this discount.
+ attr_reader :promotion_code
+ # Date that the coupon was applied.
+ attr_reader :start
+ # The subscription that this coupon is applied to, if it is applied to a particular subscription.
+ attr_reader :subscription
+ # The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
+ attr_reader :subscription_item
+ # Always true for a deleted object
+ attr_reader :deleted
end
end
diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb
index f5aeee87..cd536a6a 100644
--- a/lib/stripe/resources/dispute.rb
+++ b/lib/stripe/resources/dispute.rb
@@ -16,6 +16,616 @@ module Stripe
"dispute"
end
+ class Evidence < Stripe::StripeObject
+ class EnhancedEvidence < Stripe::StripeObject
+ class VisaCompellingEvidence3 < Stripe::StripeObject
+ class DisputedTransaction < Stripe::StripeObject
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ attr_reader :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ attr_reader :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ attr_reader :customer_device_id
+ # The email address of the customer.
+ attr_reader :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ attr_reader :customer_purchase_ip
+ # Categorization of disputed payment.
+ attr_reader :merchandise_or_services
+ # A description of the product or service that was sold.
+ attr_reader :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ attr_reader :shipping_address
+ end
+
+ class PriorUndisputedTransaction < Stripe::StripeObject
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
+ attr_reader :charge
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ attr_reader :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ attr_reader :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ attr_reader :customer_device_id
+ # The email address of the customer.
+ attr_reader :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ attr_reader :customer_purchase_ip
+ # A description of the product or service that was sold.
+ attr_reader :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ attr_reader :shipping_address
+ end
+ # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ attr_reader :disputed_transaction
+ # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ attr_reader :prior_undisputed_transactions
+ end
+
+ class VisaCompliance < Stripe::StripeObject
+ # A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
+ attr_reader :fee_acknowledged
+ end
+ # Attribute for field visa_compelling_evidence_3
+ attr_reader :visa_compelling_evidence_3
+ # Attribute for field visa_compliance
+ attr_reader :visa_compliance
+ end
+ # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.
+ attr_reader :access_activity_log
+ # The billing address provided by the customer.
+ attr_reader :billing_address
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
+ attr_reader :cancellation_policy
+ # An explanation of how and when the customer was shown your refund policy prior to purchase.
+ attr_reader :cancellation_policy_disclosure
+ # A justification for why the customer's subscription was not canceled.
+ attr_reader :cancellation_rebuttal
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
+ attr_reader :customer_communication
+ # The email address of the customer.
+ attr_reader :customer_email_address
+ # The name of the customer.
+ attr_reader :customer_name
+ # The IP address that the customer used when making the purchase.
+ attr_reader :customer_purchase_ip
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
+ attr_reader :customer_signature
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
+ attr_reader :duplicate_charge_documentation
+ # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.
+ attr_reader :duplicate_charge_explanation
+ # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
+ attr_reader :duplicate_charge_id
+ # Attribute for field enhanced_evidence
+ attr_reader :enhanced_evidence
+ # A description of the product or service that was sold.
+ attr_reader :product_description
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
+ attr_reader :receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
+ attr_reader :refund_policy
+ # Documentation demonstrating that the customer was shown your refund policy prior to purchase.
+ attr_reader :refund_policy_disclosure
+ # A justification for why the customer is not entitled to a refund.
+ attr_reader :refund_refusal_explanation
+ # The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
+ attr_reader :service_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ attr_reader :service_documentation
+ # The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ attr_reader :shipping_address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ attr_reader :shipping_carrier
+ # The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ attr_reader :shipping_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ attr_reader :shipping_documentation
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :shipping_tracking_number
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ attr_reader :uncategorized_file
+ # Any additional evidence or statements.
+ attr_reader :uncategorized_text
+ end
+
+ class EvidenceDetails < Stripe::StripeObject
+ class EnhancedEligibility < Stripe::StripeObject
+ class VisaCompellingEvidence3 < Stripe::StripeObject
+ # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.
+ attr_reader :required_actions
+ # Visa Compelling Evidence 3.0 eligibility status.
+ attr_reader :status
+ end
+
+ class VisaCompliance < Stripe::StripeObject
+ # Visa compliance eligibility status.
+ attr_reader :status
+ end
+ # Attribute for field visa_compelling_evidence_3
+ attr_reader :visa_compelling_evidence_3
+ # Attribute for field visa_compliance
+ attr_reader :visa_compliance
+ end
+ # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute.
+ attr_reader :due_by
+ # Attribute for field enhanced_eligibility
+ attr_reader :enhanced_eligibility
+ # Whether evidence has been staged for this dispute.
+ attr_reader :has_evidence
+ # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed.
+ attr_reader :past_due
+ # The number of times evidence has been submitted. Typically, you may only submit evidence once.
+ attr_reader :submission_count
+ end
+
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AmazonPay < Stripe::StripeObject
+ # The AmazonPay dispute type, chargeback or claim
+ attr_reader :dispute_type
+ end
+
+ class Card < Stripe::StripeObject
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # The type of dispute opened. Different case types may have varying fees and financial impact.
+ attr_reader :case_type
+ # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network.
+ attr_reader :network_reason_code
+ end
+
+ class Klarna < Stripe::StripeObject
+ # The reason for the dispute as defined by Klarna
+ attr_reader :reason_code
+ end
+
+ class Paypal < Stripe::StripeObject
+ # The ID of the dispute in PayPal.
+ attr_reader :case_id
+ # The reason for the dispute as defined by PayPal
+ attr_reader :reason_code
+ end
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Payment method type.
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return disputes associated to the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return disputes that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class EnhancedEvidence < Stripe::RequestParams
+ class VisaCompellingEvidence3 < Stripe::RequestParams
+ class DisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ attr_accessor :customer_purchase_ip
+ # Categorization of disputed payment.
+ attr_accessor :merchandise_or_services
+ # A description of the product or service that was sold.
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :shipping_address
+
+ def initialize(
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ merchandise_or_services: nil,
+ product_description: nil,
+ shipping_address: nil
+ )
+ @customer_account_id = customer_account_id
+ @customer_device_fingerprint = customer_device_fingerprint
+ @customer_device_id = customer_device_id
+ @customer_email_address = customer_email_address
+ @customer_purchase_ip = customer_purchase_ip
+ @merchandise_or_services = merchandise_or_services
+ @product_description = product_description
+ @shipping_address = shipping_address
+ end
+ end
+
+ class PriorUndisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
+ attr_accessor :charge
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ attr_accessor :customer_purchase_ip
+ # A description of the product or service that was sold.
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :shipping_address
+
+ def initialize(
+ charge: nil,
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ product_description: nil,
+ shipping_address: nil
+ )
+ @charge = charge
+ @customer_account_id = customer_account_id
+ @customer_device_fingerprint = customer_device_fingerprint
+ @customer_device_id = customer_device_id
+ @customer_email_address = customer_email_address
+ @customer_purchase_ip = customer_purchase_ip
+ @product_description = product_description
+ @shipping_address = shipping_address
+ end
+ end
+ # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :disputed_transaction
+ # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :prior_undisputed_transactions
+
+ def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil)
+ @disputed_transaction = disputed_transaction
+ @prior_undisputed_transactions = prior_undisputed_transactions
+ end
+ end
+
+ class VisaCompliance < Stripe::RequestParams
+ # A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
+ attr_accessor :fee_acknowledged
+
+ def initialize(fee_acknowledged: nil)
+ @fee_acknowledged = fee_acknowledged
+ end
+ end
+ # Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :visa_compelling_evidence_3
+ # Evidence provided for Visa compliance evidence submission.
+ attr_accessor :visa_compliance
+
+ def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil)
+ @visa_compelling_evidence_3 = visa_compelling_evidence_3
+ @visa_compliance = visa_compliance
+ end
+ end
+ # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000.
+ attr_accessor :access_activity_log
+ # The billing address provided by the customer.
+ attr_accessor :billing_address
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
+ attr_accessor :cancellation_policy
+ # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ attr_accessor :cancellation_policy_disclosure
+ # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000.
+ attr_accessor :cancellation_rebuttal
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
+ attr_accessor :customer_communication
+ # The email address of the customer.
+ attr_accessor :customer_email_address
+ # The name of the customer.
+ attr_accessor :customer_name
+ # The IP address that the customer used when making the purchase.
+ attr_accessor :customer_purchase_ip
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
+ attr_accessor :customer_signature
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
+ attr_accessor :duplicate_charge_documentation
+ # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000.
+ attr_accessor :duplicate_charge_explanation
+ # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
+ attr_accessor :duplicate_charge_id
+ # Additional evidence for qualifying evidence programs.
+ attr_accessor :enhanced_evidence
+ # A description of the product or service that was sold. Has a maximum character count of 20,000.
+ attr_accessor :product_description
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
+ attr_accessor :receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
+ attr_accessor :refund_policy
+ # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ attr_accessor :refund_policy_disclosure
+ # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000.
+ attr_accessor :refund_refusal_explanation
+ # The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
+ attr_accessor :service_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ attr_accessor :service_documentation
+ # The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ attr_accessor :shipping_address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ attr_accessor :shipping_carrier
+ # The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ attr_accessor :shipping_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ attr_accessor :shipping_documentation
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :shipping_tracking_number
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ attr_accessor :uncategorized_file
+ # Any additional evidence or statements. Has a maximum character count of 20,000.
+ attr_accessor :uncategorized_text
+
+ def initialize(
+ access_activity_log: nil,
+ billing_address: nil,
+ cancellation_policy: nil,
+ cancellation_policy_disclosure: nil,
+ cancellation_rebuttal: nil,
+ customer_communication: nil,
+ customer_email_address: nil,
+ customer_name: nil,
+ customer_purchase_ip: nil,
+ customer_signature: nil,
+ duplicate_charge_documentation: nil,
+ duplicate_charge_explanation: nil,
+ duplicate_charge_id: nil,
+ enhanced_evidence: nil,
+ product_description: nil,
+ receipt: nil,
+ refund_policy: nil,
+ refund_policy_disclosure: nil,
+ refund_refusal_explanation: nil,
+ service_date: nil,
+ service_documentation: nil,
+ shipping_address: nil,
+ shipping_carrier: nil,
+ shipping_date: nil,
+ shipping_documentation: nil,
+ shipping_tracking_number: nil,
+ uncategorized_file: nil,
+ uncategorized_text: nil
+ )
+ @access_activity_log = access_activity_log
+ @billing_address = billing_address
+ @cancellation_policy = cancellation_policy
+ @cancellation_policy_disclosure = cancellation_policy_disclosure
+ @cancellation_rebuttal = cancellation_rebuttal
+ @customer_communication = customer_communication
+ @customer_email_address = customer_email_address
+ @customer_name = customer_name
+ @customer_purchase_ip = customer_purchase_ip
+ @customer_signature = customer_signature
+ @duplicate_charge_documentation = duplicate_charge_documentation
+ @duplicate_charge_explanation = duplicate_charge_explanation
+ @duplicate_charge_id = duplicate_charge_id
+ @enhanced_evidence = enhanced_evidence
+ @product_description = product_description
+ @receipt = receipt
+ @refund_policy = refund_policy
+ @refund_policy_disclosure = refund_policy_disclosure
+ @refund_refusal_explanation = refund_refusal_explanation
+ @service_date = service_date
+ @service_documentation = service_documentation
+ @shipping_address = shipping_address
+ @shipping_carrier = shipping_carrier
+ @shipping_date = shipping_date
+ @shipping_documentation = shipping_documentation
+ @shipping_tracking_number = shipping_tracking_number
+ @uncategorized_file = uncategorized_file
+ @uncategorized_text = uncategorized_text
+ end
+ end
+ # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
+ attr_accessor :submit
+
+ def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil)
+ @evidence = evidence
+ @expand = expand
+ @metadata = metadata
+ @submit = submit
+ end
+ end
+
+ class CloseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
+ attr_reader :amount
+ # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
+ attr_reader :balance_transactions
+ # ID of the charge that's disputed.
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # List of eligibility types that are included in `enhanced_evidence`.
+ attr_reader :enhanced_eligibility_types
+ # Attribute for field evidence
+ attr_reader :evidence
+ # Attribute for field evidence_details
+ attr_reader :evidence_details
+ # Unique identifier for the object.
+ attr_reader :id
+ # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
+ attr_reader :is_charge_refundable
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # Network-dependent reason code for the dispute.
+ attr_reader :network_reason_code
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the PaymentIntent that's disputed.
+ attr_reader :payment_intent
+ # Attribute for field payment_method_details
+ attr_reader :payment_method_details
+ # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
+ attr_reader :reason
+ # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
+ attr_reader :status
+
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
#
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
diff --git a/lib/stripe/resources/entitlements/active_entitlement.rb b/lib/stripe/resources/entitlements/active_entitlement.rb
index c009cb5f..65ed540b 100644
--- a/lib/stripe/resources/entitlements/active_entitlement.rb
+++ b/lib/stripe/resources/entitlements/active_entitlement.rb
@@ -12,6 +12,43 @@ module Stripe
"entitlements.active_entitlement"
end
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.
+ attr_reader :feature
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ attr_reader :lookup_key
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
# Retrieve a list of active entitlements for a customer
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/entitlements/active_entitlement_summary.rb b/lib/stripe/resources/entitlements/active_entitlement_summary.rb
new file mode 100644
index 00000000..7fd0fa7f
--- /dev/null
+++ b/lib/stripe/resources/entitlements/active_entitlement_summary.rb
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ module Entitlements
+ # A summary of a customer's active entitlements.
+ class ActiveEntitlementSummary < APIResource
+ OBJECT_NAME = "entitlements.active_entitlement_summary"
+ def self.object_name
+ "entitlements.active_entitlement_summary"
+ end
+
+ # The customer that is entitled to this feature.
+ attr_reader :customer
+ # The list of entitlements this customer has.
+ attr_reader :entitlements
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ end
+ end
+end
diff --git a/lib/stripe/resources/entitlements/feature.rb b/lib/stripe/resources/entitlements/feature.rb
index 75d755ab..43120209 100644
--- a/lib/stripe/resources/entitlements/feature.rb
+++ b/lib/stripe/resources/entitlements/feature.rb
@@ -15,6 +15,87 @@ module Stripe
"entitlements.feature"
end
+ class ListParams < Stripe::RequestParams
+ # If set, filter results to only include features with the given archive status.
+ attr_accessor :archived
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # If set, filter results to only include features with the given lookup_key.
+ attr_accessor :lookup_key
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ archived: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_key: nil,
+ starting_after: nil
+ )
+ @archived = archived
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @lookup_key = lookup_key
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ attr_accessor :lookup_key
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ attr_accessor :name
+
+ def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil)
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ attr_accessor :name
+
+ def initialize(active: nil, expand: nil, metadata: nil, name: nil)
+ @active = active
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ attr_reader :active
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ attr_reader :lookup_key
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ attr_reader :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
# Creates a feature
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/ephemeral_key.rb b/lib/stripe/resources/ephemeral_key.rb
index 547f56c9..e4da261a 100644
--- a/lib/stripe/resources/ephemeral_key.rb
+++ b/lib/stripe/resources/ephemeral_key.rb
@@ -11,6 +11,27 @@ module Stripe
"ephemeral_key"
end
+ class DeleteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Time at which the key will expire. Measured in seconds since the Unix epoch.
+ attr_reader :expires
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The key's secret. You can use this value to make authorized requests to the Stripe API.
+ attr_reader :secret
+
# Invalidates a short-lived API key for a given resource.
def self.delete(key, params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb
index f5ba303a..a0478f33 100644
--- a/lib/stripe/resources/event.rb
+++ b/lib/stripe/resources/event.rb
@@ -40,6 +40,96 @@ module Stripe
"event"
end
+ class Data < Stripe::StripeObject
+ # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.
+ attr_reader :object
+ # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements.
+ attr_reader :previous_attributes
+ end
+
+ class Request < Stripe::StripeObject
+ # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
+ attr_reader :id
+ # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
+ attr_reader :idempotency_key
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return events that were created during the given date interval.
+ attr_accessor :created
+ # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
+ attr_accessor :delivery_success
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.
+ attr_accessor :type
+ # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.
+ attr_accessor :types
+
+ def initialize(
+ created: nil,
+ delivery_success: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ types: nil
+ )
+ @created = created
+ @delivery_success = delivery_success
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ @types = types
+ end
+ end
+ # The connected account that originates the event.
+ attr_reader :account
+ # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.
+ attr_reader :api_version
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Attribute for field data
+ attr_reader :data
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
+ attr_reader :pending_webhooks
+ # Information on the API request that triggers the event.
+ attr_reader :request
+ # Description of the event (for example, `invoice.created` or `charge.refunded`).
+ attr_reader :type
+
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/events", params: params, opts: opts)
diff --git a/lib/stripe/resources/exchange_rate.rb b/lib/stripe/resources/exchange_rate.rb
index e585f4e7..72ca13c5 100644
--- a/lib/stripe/resources/exchange_rate.rb
+++ b/lib/stripe/resources/exchange_rate.rb
@@ -36,6 +36,30 @@ module Stripe
"exchange_rate"
end
+ class ListParams < Stripe::RequestParams
+ # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.
+ attr_accessor :limit
+ # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
+ attr_reader :rates
+
# Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/exchange_rates", params: params, opts: opts)
diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb
index ce8fb84c..665385e2 100644
--- a/lib/stripe/resources/file.rb
+++ b/lib/stripe/resources/file.rb
@@ -18,6 +18,108 @@ module Stripe
"file"
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return files that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
+ attr_accessor :purpose
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ purpose: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @purpose = purpose
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class FileLinkData < Stripe::RequestParams
+ # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ attr_accessor :create
+ # The link isn't available after this future timestamp.
+ attr_accessor :expires_at
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(create: nil, expires_at: nil, metadata: nil)
+ @create = create
+ @expires_at = expires_at
+ @metadata = metadata
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.
+ attr_accessor :file
+ # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
+ attr_accessor :file_link_data
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ attr_accessor :purpose
+
+ def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil)
+ @expand = expand
+ @file = file
+ @file_link_data = file_link_data
+ @purpose = purpose
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The file expires and isn't available at this time in epoch seconds.
+ attr_reader :expires_at
+ # The suitable name for saving the file to a filesystem.
+ attr_reader :filename
+ # Unique identifier for the object.
+ attr_reader :id
+ # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.
+ attr_reader :links
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ attr_reader :purpose
+ # The size of the file object in bytes.
+ attr_reader :size
+ # A suitable title for the document.
+ attr_reader :title
+ # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
+ attr_reader :type
+ # Use your live secret API key to download the file from this URL.
+ attr_reader :url
+
# To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
#
# All of Stripe's officially supported Client libraries support sending multipart/form-data.
diff --git a/lib/stripe/resources/file_link.rb b/lib/stripe/resources/file_link.rb
index 95590180..fd67693a 100644
--- a/lib/stripe/resources/file_link.rb
+++ b/lib/stripe/resources/file_link.rb
@@ -15,6 +15,109 @@ module Stripe
"file_link"
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return links that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Filter links by their expiration status. By default, Stripe returns all links.
+ attr_accessor :expired
+ # Only return links for the given file.
+ attr_accessor :file
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ expired: nil,
+ file: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @expired = expired
+ @file = file
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The link isn't usable after this future timestamp.
+ attr_accessor :expires_at
+ # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ attr_accessor :file
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @file = file
+ @metadata = metadata
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
+ attr_accessor :expires_at
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, expires_at: nil, metadata: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @metadata = metadata
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Returns if the link is already expired.
+ attr_reader :expired
+ # Time that the link expires.
+ attr_reader :expires_at
+ # The file object this link points to.
+ attr_reader :file
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The publicly accessible URL to download the file.
+ attr_reader :url
+
# Creates a new file link object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/file_links", params: params, opts: opts)
diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb
index d10c0f99..c27b5bd4 100644
--- a/lib/stripe/resources/financial_connections/account.rb
+++ b/lib/stripe/resources/financial_connections/account.rb
@@ -12,6 +12,243 @@ module Stripe
"financial_connections.account"
end
+ class AccountHolder < Stripe::StripeObject
+ # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
+ attr_reader :account
+ # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
+ attr_reader :customer
+ # Type of account holder that this account belongs to.
+ attr_reader :type
+ end
+
+ class Balance < Stripe::StripeObject
+ class Cash < Stripe::StripeObject
+ # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions.
+ #
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ #
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
+ attr_reader :available
+ end
+
+ class Credit < Stripe::StripeObject
+ # The credit that has been used by the account holder.
+ #
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ #
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
+ attr_reader :used
+ end
+ # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.
+ attr_reader :as_of
+ # Attribute for field cash
+ attr_reader :cash
+ # Attribute for field credit
+ attr_reader :credit
+ # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
+ #
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ #
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
+ attr_reader :current
+ # The `type` of the balance. An additional hash is included on the balance with a name matching this value.
+ attr_reader :type
+ end
+
+ class BalanceRefresh < Stripe::StripeObject
+ # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
+ attr_reader :last_attempted_at
+ # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
+ attr_reader :next_refresh_available_at
+ # The status of the last refresh attempt.
+ attr_reader :status
+ end
+
+ class OwnershipRefresh < Stripe::StripeObject
+ # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
+ attr_reader :last_attempted_at
+ # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
+ attr_reader :next_refresh_available_at
+ # The status of the last refresh attempt.
+ attr_reader :status
+ end
+
+ class TransactionRefresh < Stripe::StripeObject
+ # Unique identifier for the object.
+ attr_reader :id
+ # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
+ attr_reader :last_attempted_at
+ # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
+ attr_reader :next_refresh_available_at
+ # The status of the last refresh attempt.
+ attr_reader :status
+ end
+
+ class ListParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved.
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved.
+ attr_accessor :customer
+
+ def initialize(account: nil, customer: nil)
+ @account = account
+ @customer = customer
+ end
+ end
+ # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
+ attr_accessor :account_holder
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # If present, only return accounts that were collected as part of the given session.
+ attr_accessor :session
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ account_holder: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ session: nil,
+ starting_after: nil
+ )
+ @account_holder = account_holder
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @session = session
+ @starting_after = starting_after
+ end
+ end
+
+ class ListOwnersParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The ID of the ownership object to fetch owners from.
+ attr_accessor :ownership
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ ownership: nil,
+ starting_after: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @ownership = ownership
+ @starting_after = starting_after
+ end
+ end
+
+ class DisconnectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RefreshAccountParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The list of account features that you would like to refresh.
+ attr_accessor :features
+
+ def initialize(expand: nil, features: nil)
+ @expand = expand
+ @features = features
+ end
+ end
+
+ class SubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The list of account features to which you would like to subscribe.
+ attr_accessor :features
+
+ def initialize(expand: nil, features: nil)
+ @expand = expand
+ @features = features
+ end
+ end
+
+ class UnsubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The list of account features from which you would like to unsubscribe.
+ attr_accessor :features
+
+ def initialize(expand: nil, features: nil)
+ @expand = expand
+ @features = features
+ end
+ end
+ # The account holder that this account belongs to.
+ attr_reader :account_holder
+ # The most recent information about the account's balance.
+ attr_reader :balance
+ # The state of the most recent attempt to refresh the account balance.
+ attr_reader :balance_refresh
+ # The type of the account. Account category is further divided in `subcategory`.
+ attr_reader :category
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # A human-readable name that has been assigned to this account, either by the account holder or by the institution.
+ attr_reader :display_name
+ # Unique identifier for the object.
+ attr_reader :id
+ # The name of the institution that holds this account.
+ attr_reader :institution_name
+ # The last 4 digits of the account number. If present, this will be 4 numeric characters.
+ attr_reader :last4
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The most recent information about the account's owners.
+ attr_reader :ownership
+ # The state of the most recent attempt to refresh the account owners.
+ attr_reader :ownership_refresh
+ # The list of permissions granted by this account.
+ attr_reader :permissions
+ # The status of the link to the account.
+ attr_reader :status
+ # If `category` is `cash`, one of:
+ #
+ # - `checking`
+ # - `savings`
+ # - `other`
+ #
+ # If `category` is `credit`, one of:
+ #
+ # - `mortgage`
+ # - `line_of_credit`
+ # - `credit_card`
+ # - `other`
+ #
+ # If `category` is `investment` or `other`, this will be `other`.
+ attr_reader :subcategory
+ # The list of data refresh subscriptions requested on this account.
+ attr_reader :subscriptions
+ # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
+ attr_reader :supported_payment_method_types
+ # The state of the most recent attempt to refresh the account transactions.
+ attr_reader :transaction_refresh
+
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
def disconnect(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/financial_connections/account_owner.rb b/lib/stripe/resources/financial_connections/account_owner.rb
index e9251e06..c5ef9819 100644
--- a/lib/stripe/resources/financial_connections/account_owner.rb
+++ b/lib/stripe/resources/financial_connections/account_owner.rb
@@ -9,6 +9,23 @@ module Stripe
def self.object_name
"financial_connections.account_owner"
end
+
+ # The email address of the owner.
+ attr_reader :email
+ # Unique identifier for the object.
+ attr_reader :id
+ # The full name of the owner.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The ownership object that this owner belongs to.
+ attr_reader :ownership
+ # The raw phone number of the owner.
+ attr_reader :phone
+ # The raw physical address of the owner.
+ attr_reader :raw_address
+ # The timestamp of the refresh that updated this owner.
+ attr_reader :refreshed_at
end
end
end
diff --git a/lib/stripe/resources/financial_connections/account_ownership.rb b/lib/stripe/resources/financial_connections/account_ownership.rb
index 8e6daa21..439272e0 100644
--- a/lib/stripe/resources/financial_connections/account_ownership.rb
+++ b/lib/stripe/resources/financial_connections/account_ownership.rb
@@ -9,6 +9,15 @@ module Stripe
def self.object_name
"financial_connections.account_ownership"
end
+
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # A paginated list of owners for this account.
+ attr_reader :owners
end
end
end
diff --git a/lib/stripe/resources/financial_connections/session.rb b/lib/stripe/resources/financial_connections/session.rb
index 420d7991..533b3727 100644
--- a/lib/stripe/resources/financial_connections/session.rb
+++ b/lib/stripe/resources/financial_connections/session.rb
@@ -12,6 +12,101 @@ module Stripe
"financial_connections.session"
end
+ class AccountHolder < Stripe::StripeObject
+ # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
+ attr_reader :account
+ # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
+ attr_reader :customer
+ # Type of account holder that this account belongs to.
+ attr_reader :type
+ end
+
+ class Filters < Stripe::StripeObject
+ # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ attr_reader :account_subcategories
+ # List of countries from which to filter accounts.
+ attr_reader :countries
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
+ attr_accessor :customer
+ # Type of account holder to collect accounts for.
+ attr_accessor :type
+
+ def initialize(account: nil, customer: nil, type: nil)
+ @account = account
+ @customer = customer
+ @type = type
+ end
+ end
+
+ class Filters < Stripe::RequestParams
+ # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ attr_accessor :account_subcategories
+ # List of countries from which to collect accounts.
+ attr_accessor :countries
+
+ def initialize(account_subcategories: nil, countries: nil)
+ @account_subcategories = account_subcategories
+ @countries = countries
+ end
+ end
+ # The account holder to link accounts for.
+ attr_accessor :account_holder
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Filters to restrict the kinds of accounts to collect.
+ attr_accessor :filters
+ # List of data features that you would like to request access to.
+ #
+ # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(
+ account_holder: nil,
+ expand: nil,
+ filters: nil,
+ permissions: nil,
+ prefetch: nil,
+ return_url: nil
+ )
+ @account_holder = account_holder
+ @expand = expand
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+ # The account holder for whom accounts are collected in this session.
+ attr_reader :account_holder
+ # The accounts that were collected as part of this Session.
+ attr_reader :accounts
+ # A value that will be passed to the client to launch the authentication flow.
+ attr_reader :client_secret
+ # Attribute for field filters
+ attr_reader :filters
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Permissions requested for accounts collected during this session.
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_reader :return_url
+
# To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb
index 26b86145..b1c616fe 100644
--- a/lib/stripe/resources/financial_connections/transaction.rb
+++ b/lib/stripe/resources/financial_connections/transaction.rb
@@ -12,6 +12,98 @@ module Stripe
"financial_connections.transaction"
end
+ class StatusTransitions < Stripe::StripeObject
+ # Time at which this transaction posted. Measured in seconds since the Unix epoch.
+ attr_reader :posted_at
+ # Time at which this transaction was voided. Measured in seconds since the Unix epoch.
+ attr_reader :void_at
+ end
+
+ class ListParams < Stripe::RequestParams
+ class TransactedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class TransactionRefresh < Stripe::RequestParams
+ # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
+ attr_accessor :after
+
+ def initialize(after: nil)
+ @after = after
+ end
+ end
+ # The ID of the Financial Connections Account whose transactions will be retrieved.
+ attr_accessor :account
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
+ attr_accessor :transacted_at
+ # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
+ attr_accessor :transaction_refresh
+
+ def initialize(
+ account: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transacted_at: nil,
+ transaction_refresh: nil
+ )
+ @account = account
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @transacted_at = transacted_at
+ @transaction_refresh = transaction_refresh
+ end
+ end
+ # The ID of the Financial Connections Account this transaction belongs to.
+ attr_reader :account
+ # The amount of this transaction, in cents (or local equivalent).
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # The description of this transaction.
+ attr_reader :description
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The status of the transaction.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
+ attr_reader :transacted_at
+ # The token of the transaction refresh that last updated or created this transaction.
+ attr_reader :transaction_refresh
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ attr_reader :updated
+
# Returns a list of Financial Connections Transaction objects.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/forwarding/request.rb b/lib/stripe/resources/forwarding/request.rb
index 58611c32..0d548ad0 100644
--- a/lib/stripe/resources/forwarding/request.rb
+++ b/lib/stripe/resources/forwarding/request.rb
@@ -28,6 +28,162 @@ module Stripe
"forwarding.request"
end
+ class RequestContext < Stripe::StripeObject
+ # The time it took in milliseconds for the destination endpoint to respond.
+ attr_reader :destination_duration
+ # The IP address of the destination.
+ attr_reader :destination_ip_address
+ end
+
+ class RequestDetails < Stripe::StripeObject
+ class Header < Stripe::StripeObject
+ # The header name.
+ attr_reader :name
+ # The header value.
+ attr_reader :value
+ end
+ # The body payload to send to the destination endpoint.
+ attr_reader :body
+ # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ attr_reader :headers
+ # The HTTP method used to call the destination endpoint.
+ attr_reader :http_method
+ end
+
+ class ResponseDetails < Stripe::StripeObject
+ class Header < Stripe::StripeObject
+ # The header name.
+ attr_reader :name
+ # The header value.
+ attr_reader :value
+ end
+ # The response body from the destination endpoint to Stripe.
+ attr_reader :body
+ # HTTP headers that the destination endpoint returned.
+ attr_reader :headers
+ # The HTTP status code that the destination endpoint returned.
+ attr_reader :status
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Return results where the `created` field is greater than this value.
+ attr_accessor :gt
+ # Return results where the `created` field is greater than or equal to this value.
+ attr_accessor :gte
+ # Return results where the `created` field is less than this value.
+ attr_accessor :lt
+ # Return results where the `created` field is less than or equal to this value.
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.
+ attr_accessor :created
+ # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Request < Stripe::RequestParams
+ class Header < Stripe::RequestParams
+ # The header name.
+ attr_accessor :name
+ # The header value.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+ # The body payload to send to the destination endpoint.
+ attr_accessor :body
+ # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ attr_accessor :headers
+
+ def initialize(body: nil, headers: nil)
+ @body = body
+ @headers = headers
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ attr_accessor :payment_method
+ # The field kinds to be replaced in the forwarded request.
+ attr_accessor :replacements
+ # The request body and headers to be sent to the destination endpoint.
+ attr_accessor :request
+ # The destination URL for the forwarded request. Must be supported by the config.
+ attr_accessor :url
+
+ def initialize(
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ replacements: nil,
+ request: nil,
+ url: nil
+ )
+ @expand = expand
+ @metadata = metadata
+ @payment_method = payment_method
+ @replacements = replacements
+ @request = request
+ @url = url
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ attr_reader :payment_method
+ # The field kinds to be replaced in the forwarded request.
+ attr_reader :replacements
+ # Context about the request from Stripe's servers to the destination endpoint.
+ attr_reader :request_context
+ # The request that was sent to the destination endpoint. We redact any sensitive fields.
+ attr_reader :request_details
+ # The response that the destination endpoint returned to us. We redact any sensitive fields.
+ attr_reader :response_details
+ # The destination URL for the forwarded request. Must be supported by the config.
+ attr_reader :url
+
# Creates a ForwardingRequest object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb
index 887917c5..62f5ccf8 100644
--- a/lib/stripe/resources/funding_instructions.rb
+++ b/lib/stripe/resources/funding_instructions.rb
@@ -13,6 +13,314 @@ module Stripe
"funding_instructions"
end
+ class BankTransfer < Stripe::StripeObject
+ class FinancialAddress < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # The ABA account number
+ attr_reader :account_number
+ # The account type
+ attr_reader :account_type
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The bank name
+ attr_reader :bank_name
+ # The ABA routing number
+ attr_reader :routing_number
+ end
+
+ class Iban < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The BIC/SWIFT code of the account.
+ attr_reader :bic
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # The IBAN of the account.
+ attr_reader :iban
+ end
+
+ class SortCode < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ attr_reader :account_holder_name
+ # The account number
+ attr_reader :account_number
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The six-digit sort code
+ attr_reader :sort_code
+ end
+
+ class Spei < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The three-digit bank code
+ attr_reader :bank_code
+ # The short banking institution name
+ attr_reader :bank_name
+ # The CLABE number
+ attr_reader :clabe
+ end
+
+ class Swift < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # The account number
+ attr_reader :account_number
+ # The account type
+ attr_reader :account_type
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The bank name
+ attr_reader :bank_name
+ # The SWIFT code
+ attr_reader :swift_code
+ end
+
+ class Zengin < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # The account number
+ attr_reader :account_number
+ # The bank account type. In Japan, this can only be `futsu` or `toza`.
+ attr_reader :account_type
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The bank code of the account
+ attr_reader :bank_code
+ # The bank name of the account
+ attr_reader :bank_name
+ # The branch code of the account
+ attr_reader :branch_code
+ # The branch name of the account
+ attr_reader :branch_name
+ end
+ # ABA Records contain U.S. bank account details per the ABA format.
+ attr_reader :aba
+ # Iban Records contain E.U. bank account details per the SEPA format.
+ attr_reader :iban
+ # Sort Code Records contain U.K. bank account details per the sort code format.
+ attr_reader :sort_code
+ # SPEI Records contain Mexico bank account details per the SPEI format.
+ attr_reader :spei
+ # The payment networks supported by this FinancialAddress
+ attr_reader :supported_networks
+ # SWIFT Records contain U.S. bank account details per the SWIFT format.
+ attr_reader :swift
+ # The type of financial address
+ attr_reader :type
+ # Zengin Records contain Japan bank account details per the Zengin format.
+ attr_reader :zengin
+ end
+ # The country of the bank account to fund
+ attr_reader :country
+ # A list of financial addresses that can be used to fund a particular balance
+ attr_reader :financial_addresses
+ # The bank_transfer type
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ attr_reader :bank_transfer
+ # 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).
+ attr_reader :currency
+ # The `funding_type` of the returned instructions
+ attr_reader :funding_type
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
def resource_url
if !respond_to?(:customer) || customer.nil?
raise NotImplementedError,
diff --git a/lib/stripe/resources/identity/verification_report.rb b/lib/stripe/resources/identity/verification_report.rb
index 5f32046c..96081919 100644
--- a/lib/stripe/resources/identity/verification_report.rb
+++ b/lib/stripe/resources/identity/verification_report.rb
@@ -22,6 +22,263 @@ module Stripe
"identity.verification_report"
end
+ class Document < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class Dob < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ attr_reader :month
+ # The four-digit year.
+ attr_reader :year
+ end
+
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ attr_reader :reason
+ end
+
+ class ExpirationDate < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ attr_reader :month
+ # The four-digit year.
+ attr_reader :year
+ end
+
+ class IssuedDate < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ attr_reader :month
+ # The four-digit year.
+ attr_reader :year
+ end
+ # Address as it appears in the document.
+ attr_reader :address
+ # Date of birth as it appears in the document.
+ attr_reader :dob
+ # Details on the verification error. Present when status is `unverified`.
+ attr_reader :error
+ # Expiration date of the document.
+ attr_reader :expiration_date
+ # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.
+ attr_reader :files
+ # First name as it appears in the document.
+ attr_reader :first_name
+ # Issued date of the document.
+ attr_reader :issued_date
+ # Issuing country of the document.
+ attr_reader :issuing_country
+ # Last name as it appears in the document.
+ attr_reader :last_name
+ # Document ID number.
+ attr_reader :number
+ # Status of this `document` check.
+ attr_reader :status
+ # Type of the document.
+ attr_reader :type
+ end
+
+ class Email < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ attr_reader :reason
+ end
+ # Email to be verified.
+ attr_reader :email
+ # Details on the verification error. Present when status is `unverified`.
+ attr_reader :error
+ # Status of this `email` check.
+ attr_reader :status
+ end
+
+ class IdNumber < Stripe::StripeObject
+ class Dob < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ attr_reader :month
+ # The four-digit year.
+ attr_reader :year
+ end
+
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ attr_reader :reason
+ end
+ # Date of birth.
+ attr_reader :dob
+ # Details on the verification error. Present when status is `unverified`.
+ attr_reader :error
+ # First name.
+ attr_reader :first_name
+ # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.
+ attr_reader :id_number
+ # Type of ID number.
+ attr_reader :id_number_type
+ # Last name.
+ attr_reader :last_name
+ # Status of this `id_number` check.
+ attr_reader :status
+ end
+
+ class Options < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ attr_reader :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ attr_reader :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ attr_reader :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ attr_reader :require_matching_selfie
+ end
+
+ class IdNumber < Stripe::StripeObject; end
+ # Attribute for field document
+ attr_reader :document
+ # Attribute for field id_number
+ attr_reader :id_number
+ end
+
+ class Phone < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ attr_reader :reason
+ end
+ # Details on the verification error. Present when status is `unverified`.
+ attr_reader :error
+ # Phone to be verified.
+ attr_reader :phone
+ # Status of this `phone` check.
+ attr_reader :status
+ end
+
+ class Selfie < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ attr_reader :reason
+ end
+ # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.
+ attr_reader :document
+ # Details on the verification error. Present when status is `unverified`.
+ attr_reader :error
+ # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.
+ attr_reader :selfie
+ # Status of this `selfie` check.
+ attr_reader :status
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_accessor :client_reference_id
+ # Only return VerificationReports that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return VerificationReports of this type
+ attr_accessor :type
+ # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.
+ attr_accessor :verification_session
+
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ verification_session: nil
+ )
+ @client_reference_id = client_reference_id
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ @verification_session = verification_session
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_reader :client_reference_id
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Result from a document check
+ attr_reader :document
+ # Result from a email check
+ attr_reader :email
+ # Unique identifier for the object.
+ attr_reader :id
+ # Result from an id_number check
+ attr_reader :id_number
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field options
+ attr_reader :options
+ # Result from a phone check
+ attr_reader :phone
+ # Result from a selfie check
+ attr_reader :selfie
+ # Type of report.
+ attr_reader :type
+ # The configuration token of a verification flow from the dashboard.
+ attr_reader :verification_flow
+ # ID of the VerificationSession that created this report.
+ attr_reader :verification_session
+
# List all verification reports.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb
index 0e0a76ed..7941fdd4 100644
--- a/lib/stripe/resources/identity/verification_session.rb
+++ b/lib/stripe/resources/identity/verification_session.rb
@@ -24,6 +24,358 @@ module Stripe
"identity.verification_session"
end
+ class LastError < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification or user-session failure.
+ attr_reader :code
+ # A message that explains the reason for verification or user-session failure.
+ attr_reader :reason
+ end
+
+ class Options < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ attr_reader :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ attr_reader :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ attr_reader :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ attr_reader :require_matching_selfie
+ end
+
+ class Email < Stripe::StripeObject
+ # Request one time password verification of `provided_details.email`.
+ attr_reader :require_verification
+ end
+
+ class IdNumber < Stripe::StripeObject; end
+
+ class Phone < Stripe::StripeObject
+ # Request one time password verification of `provided_details.phone`.
+ attr_reader :require_verification
+ end
+ # Attribute for field document
+ attr_reader :document
+ # Attribute for field email
+ attr_reader :email
+ # Attribute for field id_number
+ attr_reader :id_number
+ # Attribute for field phone
+ attr_reader :phone
+ end
+
+ class ProvidedDetails < Stripe::StripeObject
+ # Email of user being verified
+ attr_reader :email
+ # Phone number of user being verified
+ attr_reader :phone
+ end
+
+ class Redaction < Stripe::StripeObject
+ # Indicates whether this object and its related objects have been redacted or not.
+ attr_reader :status
+ end
+
+ class VerifiedOutputs < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class Dob < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ attr_reader :month
+ # The four-digit year.
+ attr_reader :year
+ end
+ # The user's verified address.
+ attr_reader :address
+ # The user’s verified date of birth.
+ attr_reader :dob
+ # The user's verified email address
+ attr_reader :email
+ # The user's verified first name.
+ attr_reader :first_name
+ # The user's verified id number.
+ attr_reader :id_number
+ # The user's verified id number type.
+ attr_reader :id_number_type
+ # The user's verified last name.
+ attr_reader :last_name
+ # The user's verified phone number
+ attr_reader :phone
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_accessor :client_reference_id
+ # Only return VerificationSessions that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Attribute for param field related_customer
+ attr_accessor :related_customer
+ # 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.
+ attr_accessor :starting_after
+ # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
+ attr_accessor :status
+
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ related_customer: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @client_reference_id = client_reference_id
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @related_customer = related_customer
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ attr_accessor :require_matching_selfie
+
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ )
+ @allowed_types = allowed_types
+ @require_id_number = require_id_number
+ @require_live_capture = require_live_capture
+ @require_matching_selfie = require_matching_selfie
+ end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ attr_accessor :email
+ # Phone number of user being verified
+ attr_accessor :phone
+
+ def initialize(email: nil, phone: nil)
+ @email = email
+ @phone = phone
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_accessor :client_reference_id
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ attr_accessor :provided_details
+ # Customer ID
+ attr_accessor :related_customer
+ # The URL that the user will be redirected to upon completing the verification flow.
+ attr_accessor :return_url
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
+ attr_accessor :type
+ # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
+ attr_accessor :verification_flow
+
+ def initialize(
+ client_reference_id: nil,
+ expand: nil,
+ metadata: nil,
+ options: nil,
+ provided_details: nil,
+ related_customer: nil,
+ return_url: nil,
+ type: nil,
+ verification_flow: nil
+ )
+ @client_reference_id = client_reference_id
+ @expand = expand
+ @metadata = metadata
+ @options = options
+ @provided_details = provided_details
+ @related_customer = related_customer
+ @return_url = return_url
+ @type = type
+ @verification_flow = verification_flow
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ attr_accessor :require_matching_selfie
+
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ )
+ @allowed_types = allowed_types
+ @require_id_number = require_id_number
+ @require_live_capture = require_live_capture
+ @require_matching_selfie = require_matching_selfie
+ end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ attr_accessor :email
+ # Phone number of user being verified
+ attr_accessor :phone
+
+ def initialize(email: nil, phone: nil)
+ @email = email
+ @phone = phone
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ attr_accessor :provided_details
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ attr_accessor :type
+
+ def initialize(expand: nil, metadata: nil, options: nil, provided_details: nil, type: nil)
+ @expand = expand
+ @metadata = metadata
+ @options = options
+ @provided_details = provided_details
+ @type = type
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RedactParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_reader :client_reference_id
+ # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.
+ attr_reader :client_secret
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # If present, this property tells you the last error encountered when processing the verification.
+ attr_reader :last_error
+ # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)
+ attr_reader :last_verification_report
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # A set of options for the session’s verification checks.
+ attr_reader :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ attr_reader :provided_details
+ # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
+ attr_reader :redaction
+ # Customer ID
+ attr_reader :related_customer
+ # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
+ attr_reader :status
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ attr_reader :type
+ # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.
+ attr_reader :url
+ # The configuration token of a verification flow from the dashboard.
+ attr_reader :verification_flow
+ # The user’s verified data.
+ attr_reader :verified_outputs
+
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
#
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb
index d507744e..3fd3f5b1 100644
--- a/lib/stripe/resources/invoice.rb
+++ b/lib/stripe/resources/invoice.rb
@@ -49,6 +49,3211 @@ module Stripe
nested_resource_class_methods :line, operations: %i[list]
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ # The status of the most recent automated tax calculation for this invoice.
+ attr_reader :status
+ end
+
+ class ConfirmationSecret < Stripe::StripeObject
+ # The client_secret of the payment that Stripe creates for the invoice after finalization.
+ attr_reader :client_secret
+ # The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
+ attr_reader :type
+ end
+
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ attr_reader :name
+ # The value of the custom field.
+ attr_reader :value
+ end
+
+ class CustomerAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class CustomerShipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_reader :carrier
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :tracking_number
+ end
+
+ class CustomerTaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ attr_reader :type
+ # The value of the tax ID.
+ attr_reader :value
+ end
+
+ class FromInvoice < Stripe::StripeObject
+ # The relation between this invoice and the cloned invoice
+ attr_reader :action
+ # The invoice that was cloned.
+ attr_reader :invoice
+ end
+
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+
+ class LastFinalizationError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ attr_reader :setup_intent
+ # Attribute for field source
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ attr_reader :type
+ end
+
+ class Parent < Stripe::StripeObject
+ class QuoteDetails < Stripe::StripeObject
+ # Attribute for field quote
+ attr_reader :quote
+ end
+
+ class SubscriptionDetails < Stripe::StripeObject
+ # Attribute for field metadata
+ attr_reader :metadata
+ # Attribute for field subscription
+ attr_reader :subscription
+ # Attribute for field subscription_proration_date
+ attr_reader :subscription_proration_date
+ end
+ # Attribute for field quote_details
+ attr_reader :quote_details
+ # Attribute for field subscription_details
+ attr_reader :subscription_details
+ # Attribute for field type
+ attr_reader :type
+ end
+
+ class PaymentSettings < Stripe::StripeObject
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Transaction type of the mandate.
+ attr_reader :transaction_type
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+
+ class Bancontact < Stripe::StripeObject
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_reader :preferred_language
+ end
+
+ class Card < Stripe::StripeObject
+ class Installments < Stripe::StripeObject
+ # Whether Installments are enabled for this Invoice.
+ attr_reader :enabled
+ end
+ # Attribute for field installments
+ attr_reader :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_reader :request_three_d_secure
+ end
+
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ attr_reader :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_reader :funding_type
+ end
+
+ class Konbini < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject; end
+
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ attr_reader :prefetch
+ end
+ # Attribute for field financial_connections
+ attr_reader :financial_connections
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_reader :us_bank_account
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ attr_reader :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ attr_reader :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
+ attr_reader :payment_method_types
+ end
+
+ class Rendering < Stripe::StripeObject
+ class Pdf < Stripe::StripeObject
+ # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
+ attr_reader :page_size
+ end
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ attr_reader :amount_tax_display
+ # Invoice pdf rendering options
+ attr_reader :pdf
+ # ID of the rendering template that the invoice is formatted by.
+ attr_reader :template
+ # Version of the rendering template that the invoice is using.
+ attr_reader :template_version
+ end
+
+ class ShippingCost < Stripe::StripeObject
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # Total shipping cost before any taxes are applied.
+ attr_reader :amount_subtotal
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
+ attr_reader :amount_tax
+ # Total shipping cost after taxes are applied.
+ attr_reader :amount_total
+ # The ID of the ShippingRate for this invoice.
+ attr_reader :shipping_rate
+ # The taxes applied to the shipping rate.
+ attr_reader :taxes
+ end
+
+ class ShippingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_reader :carrier
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :tracking_number
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # The time that the invoice draft was finalized.
+ attr_reader :finalized_at
+ # The time that the invoice was marked uncollectible.
+ attr_reader :marked_uncollectible_at
+ # The time that the invoice was paid.
+ attr_reader :paid_at
+ # The time that the invoice was voided.
+ attr_reader :voided_at
+ end
+
+ class ThresholdReason < Stripe::StripeObject
+ class ItemReason < Stripe::StripeObject
+ # The IDs of the line items that triggered the threshold invoice.
+ attr_reader :line_item_ids
+ # The quantity threshold boundary that applied to the given line item.
+ attr_reader :usage_gte
+ end
+ # The total invoice amount threshold boundary if it triggered the threshold invoice.
+ attr_reader :amount_gte
+ # Indicates which line items triggered a threshold invoice.
+ attr_reader :item_reasons
+ end
+
+ class TotalDiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ attr_reader :discount
+ end
+
+ class TotalPretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ attr_reader :type
+ end
+
+ class TotalTax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ # The type of tax information.
+ attr_reader :type
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(installments: nil, request_three_d_secure: nil)
+ @installments = installments
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+
+ def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil)
+ @default_mandate = default_mandate
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ end
+ end
+
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ attr_accessor :page_size
+
+ def initialize(page_size: nil)
+ @page_size = page_size
+ end
+ end
+ # 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.
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ attr_accessor :template_version
+
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil)
+ @amount_tax_display = amount_tax_display
+ @pdf = pdf
+ @template = template
+ @template_version = template_version
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address
+ attr_accessor :address
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension)
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
+ attr_accessor :collection_method
+ # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
+ attr_accessor :custom_fields
+ # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ attr_accessor :description
+ # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ attr_accessor :payment_settings
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ attr_accessor :statement_descriptor
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
+ attr_accessor :transfer_data
+
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ custom_fields: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @application_fee_amount = application_fee_amount
+ @auto_advance = auto_advance
+ @automatic_tax = automatic_tax
+ @automatically_finalizes_at = automatically_finalizes_at
+ @collection_method = collection_method
+ @custom_fields = custom_fields
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @due_date = due_date
+ @effective_at = effective_at
+ @expand = expand
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @number = number
+ @on_behalf_of = on_behalf_of
+ @payment_settings = payment_settings
+ @rendering = rendering
+ @shipping_cost = shipping_cost
+ @shipping_details = shipping_details
+ @statement_descriptor = statement_descriptor
+ @transfer_data = transfer_data
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class DueDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
+ attr_accessor :collection_method
+ # Only return invoices that were created during the given date interval.
+ attr_accessor :created
+ # Only return invoices for the customer specified by this customer ID.
+ attr_accessor :customer
+ # Attribute for param field due_date
+ attr_accessor :due_date
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
+ attr_accessor :status
+ # Only return invoices for the subscription specified by this subscription ID.
+ attr_accessor :subscription
+
+ def initialize(
+ collection_method: nil,
+ created: nil,
+ customer: nil,
+ due_date: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ )
+ @collection_method = collection_method
+ @created = created
+ @customer = customer
+ @due_date = due_date
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @subscription = subscription
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class FromInvoice < Stripe::RequestParams
+ # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
+ attr_accessor :action
+ # The `id` of the invoice that will be cloned.
+ attr_accessor :invoice
+
+ def initialize(action: nil, invoice: nil)
+ @action = action
+ @invoice = invoice
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(installments: nil, request_three_d_secure: nil)
+ @installments = installments
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+
+ def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil)
+ @default_mandate = default_mandate
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ end
+ end
+
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ attr_accessor :page_size
+
+ def initialize(page_size: nil)
+ @page_size = page_size
+ end
+ end
+ # 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.
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ attr_accessor :template_version
+
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil)
+ @amount_tax_display = amount_tax_display
+ @pdf = pdf
+ @template = template
+ @template_version = template_version
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address
+ attr_accessor :address
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension)
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # The currency to create this invoice in. Defaults to that of `customer` if not specified.
+ attr_accessor :currency
+ # A list of up to 4 custom fields to be displayed on the invoice.
+ attr_accessor :custom_fields
+ # The ID of the customer who will be billed.
+ attr_accessor :customer
+ # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ attr_accessor :description
+ # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ attr_accessor :footer
+ # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ attr_accessor :from_invoice
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ attr_accessor :payment_settings
+ # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
+ attr_accessor :pending_invoice_items_behavior
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ attr_accessor :statement_descriptor
+ # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
+ attr_accessor :subscription
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
+ attr_accessor :transfer_data
+
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ currency: nil,
+ custom_fields: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ from_invoice: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ pending_invoice_items_behavior: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ subscription: nil,
+ transfer_data: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @application_fee_amount = application_fee_amount
+ @auto_advance = auto_advance
+ @automatic_tax = automatic_tax
+ @automatically_finalizes_at = automatically_finalizes_at
+ @collection_method = collection_method
+ @currency = currency
+ @custom_fields = custom_fields
+ @customer = customer
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @due_date = due_date
+ @effective_at = effective_at
+ @expand = expand
+ @footer = footer
+ @from_invoice = from_invoice
+ @issuer = issuer
+ @metadata = metadata
+ @number = number
+ @on_behalf_of = on_behalf_of
+ @payment_settings = payment_settings
+ @pending_invoice_items_behavior = pending_invoice_items_behavior
+ @rendering = rendering
+ @shipping_cost = shipping_cost
+ @shipping_details = shipping_details
+ @statement_descriptor = statement_descriptor
+ @subscription = subscription
+ @transfer_data = transfer_data
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class AddLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @country = country
+ @description = description
+ @display_name = display_name
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @jurisdiction_level = jurisdiction_level
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ )
+ @amount = amount
+ @tax_rate_data = tax_rate_data
+ @taxability_reason = taxability_reason
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
+ attr_accessor :invoice_item
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoice_item: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @invoice_item = invoice_item
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :invoice_metadata
+ # The line items to add.
+ attr_accessor :lines
+
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil)
+ @expand = expand
+ @invoice_metadata = invoice_metadata
+ @lines = lines
+ end
+ end
+
+ class FinalizeInvoiceParams < Stripe::RequestParams
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ attr_accessor :auto_advance
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(auto_advance: nil, expand: nil)
+ @auto_advance = auto_advance
+ @expand = expand
+ end
+ end
+
+ class MarkUncollectibleParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class PayParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
+ #
+ # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
+ attr_accessor :forgive
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
+ attr_accessor :mandate
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
+ attr_accessor :off_session
+ # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
+ attr_accessor :paid_out_of_band
+ # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
+ attr_accessor :payment_method
+ # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
+ attr_accessor :source
+
+ def initialize(
+ expand: nil,
+ forgive: nil,
+ mandate: nil,
+ off_session: nil,
+ paid_out_of_band: nil,
+ payment_method: nil,
+ source: nil
+ )
+ @expand = expand
+ @forgive = forgive
+ @mandate = mandate
+ @off_session = off_session
+ @paid_out_of_band = paid_out_of_band
+ @payment_method = payment_method
+ @source = source
+ end
+ end
+
+ class RemoveLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
+ attr_accessor :behavior
+ # ID of an existing line item to remove from this invoice.
+ attr_accessor :id
+
+ def initialize(behavior: nil, id: nil)
+ @behavior = behavior
+ @id = id
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :invoice_metadata
+ # The line items to remove.
+ attr_accessor :lines
+
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil)
+ @expand = expand
+ @invoice_metadata = invoice_metadata
+ @lines = lines
+ end
+ end
+
+ class SendInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @country = country
+ @description = description
+ @display_name = display_name
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @jurisdiction_level = jurisdiction_level
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ )
+ @amount = amount
+ @tax_rate_data = tax_rate_data
+ @taxability_reason = taxability_reason
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # ID of an existing line item on the invoice.
+ attr_accessor :id
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @id = id
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ attr_accessor :invoice_metadata
+ # The line items to update.
+ attr_accessor :lines
+
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil)
+ @expand = expand
+ @invoice_metadata = invoice_metadata
+ @lines = lines
+ end
+ end
+
+ class VoidInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreatePreviewParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Customer shipping address.
+ attr_accessor :address
+ # Customer name.
+ attr_accessor :name
+ # Customer phone (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ attr_accessor :ip_address
+
+ def initialize(ip_address: nil)
+ @ip_address = ip_address
+ end
+ end
+
+ class TaxId < Stripe::RequestParams
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(type: nil, value: nil)
+ @type = type
+ @value = value
+ end
+ end
+ # The customer's address.
+ attr_accessor :address
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ attr_accessor :shipping
+ # Tax details about the customer.
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ attr_accessor :tax_ids
+
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil)
+ @address = address
+ @shipping = shipping
+ @tax = tax
+ @tax_exempt = tax_exempt
+ @tax_ids = tax_ids
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
+ attr_accessor :amount
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
+ attr_accessor :currency
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
+ attr_accessor :discountable
+ # The coupons to redeem into discounts for the invoice item in the preview.
+ attr_accessor :discounts
+ # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
+ attr_accessor :invoiceitem
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Non-negative integer. The quantity of units for the invoice item.
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+ # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoiceitem: nil,
+ metadata: nil,
+ period: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @invoiceitem = invoiceitem
+ @metadata = metadata
+ @period = period
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @tax_rates = tax_rates
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class ScheduleDetails < Stripe::RequestParams
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ attr_accessor :trial_end
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @currency = currency
+ @default_payment_method = default_payment_method
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @end_date = end_date
+ @invoice_settings = invoice_settings
+ @items = items
+ @iterations = iterations
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @start_date = start_date
+ @transfer_data = transfer_data
+ @trial = trial
+ @trial_end = trial_end
+ end
+ end
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_accessor :end_behavior
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ attr_accessor :phases
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
+ attr_accessor :proration_behavior
+
+ def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
+ @end_behavior = end_behavior
+ @phases = phases
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class SubscriptionDetails < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Subscription item to update.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @clear_usage = clear_usage
+ @deleted = deleted
+ @discounts = discounts
+ @id = id
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ attr_accessor :cancel_at_period_end
+ # This simulates the subscription being canceled or expired immediately.
+ attr_accessor :cancel_now
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # A list of up to 20 subscription items, each with an attached price.
+ attr_accessor :items
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
+ attr_accessor :proration_date
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
+ attr_accessor :resume_at
+ # Date a subscription is intended to start (can be future or past).
+ attr_accessor :start_date
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
+ attr_accessor :trial_end
+
+ def initialize(
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancel_now: nil,
+ default_tax_rates: nil,
+ items: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ resume_at: nil,
+ start_date: nil,
+ trial_end: nil
+ )
+ @billing_cycle_anchor = billing_cycle_anchor
+ @cancel_at = cancel_at
+ @cancel_at_period_end = cancel_at_period_end
+ @cancel_now = cancel_now
+ @default_tax_rates = default_tax_rates
+ @items = items
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @resume_at = resume_at
+ @start_date = start_date
+ @trial_end = trial_end
+ end
+ end
+ # Settings for automatic tax lookup for this invoice preview.
+ attr_accessor :automatic_tax
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
+ attr_accessor :currency
+ # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ attr_accessor :customer
+ # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ attr_accessor :customer_details
+ # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
+ attr_accessor :invoice_items
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_accessor :on_behalf_of
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
+ attr_accessor :preview_mode
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
+ attr_accessor :schedule
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
+ attr_accessor :schedule_details
+ # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
+ attr_accessor :subscription
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
+ attr_accessor :subscription_details
+
+ def initialize(
+ automatic_tax: nil,
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_items: nil,
+ issuer: nil,
+ on_behalf_of: nil,
+ preview_mode: nil,
+ schedule: nil,
+ schedule_details: nil,
+ subscription: nil,
+ subscription_details: nil
+ )
+ @automatic_tax = automatic_tax
+ @currency = currency
+ @customer = customer
+ @customer_details = customer_details
+ @discounts = discounts
+ @expand = expand
+ @invoice_items = invoice_items
+ @issuer = issuer
+ @on_behalf_of = on_behalf_of
+ @preview_mode = preview_mode
+ @schedule = schedule
+ @schedule_details = schedule_details
+ @subscription = subscription
+ @subscription_details = subscription_details
+ end
+ end
+ # The country of the business associated with this invoice, most often the business creating the invoice.
+ attr_reader :account_country
+ # The public name of the business associated with this invoice, most often the business creating the invoice.
+ attr_reader :account_name
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ attr_reader :account_tax_ids
+ # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
+ attr_reader :amount_due
+ # Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
+ attr_reader :amount_overpaid
+ # The amount, in cents (or local equivalent), that was paid.
+ attr_reader :amount_paid
+ # The difference between amount_due and amount_paid, in cents (or local equivalent).
+ attr_reader :amount_remaining
+ # This is the sum of all the shipping amounts.
+ attr_reader :amount_shipping
+ # ID of the Connect Application that created the invoice.
+ attr_reader :application
+ # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
+ attr_reader :attempt_count
+ # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
+ attr_reader :attempted
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ attr_reader :auto_advance
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
+ attr_reader :automatically_finalizes_at
+ # Indicates the reason why the invoice was created.
+ #
+ # * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
+ # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
+ # * `subscription_create`: A new subscription was created.
+ # * `subscription_cycle`: A subscription advanced into a new period.
+ # * `subscription_threshold`: A subscription reached a billing threshold.
+ # * `subscription_update`: A subscription was updated.
+ # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
+ attr_reader :billing_reason
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
+ attr_reader :collection_method
+ # The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
+ attr_reader :confirmation_secret
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Custom fields displayed on the invoice.
+ attr_reader :custom_fields
+ # The ID of the customer who will be billed.
+ attr_reader :customer
+ # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_address
+ # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_email
+ # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_name
+ # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_phone
+ # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_shipping
+ # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_tax_exempt
+ # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
+ attr_reader :customer_tax_ids
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ attr_reader :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ attr_reader :default_source
+ # The tax rates applied to this invoice, if any.
+ attr_reader :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ attr_reader :description
+ # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
+ attr_reader :discounts
+ # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
+ attr_reader :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ attr_reader :effective_at
+ # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
+ attr_reader :ending_balance
+ # Footer displayed on the invoice.
+ attr_reader :footer
+ # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ attr_reader :from_invoice
+ # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
+ attr_reader :hosted_invoice_url
+ # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.
+ attr_reader :id
+ # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
+ attr_reader :invoice_pdf
+ # Attribute for field issuer
+ attr_reader :issuer
+ # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
+ attr_reader :last_finalization_error
+ # The ID of the most recent non-draft revision of this invoice
+ attr_reader :latest_revision
+ # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
+ attr_reader :lines
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
+ attr_reader :next_payment_attempt
+ # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_reader :on_behalf_of
+ # Attribute for field parent
+ attr_reader :parent
+ # Attribute for field payment_settings
+ attr_reader :payment_settings
+ # Payments for this invoice
+ attr_reader :payments
+ # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
+ attr_reader :period_end
+ # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
+ attr_reader :period_start
+ # Total amount of all post-payment credit notes issued for this invoice.
+ attr_reader :post_payment_credit_notes_amount
+ # Total amount of all pre-payment credit notes issued for this invoice.
+ attr_reader :pre_payment_credit_notes_amount
+ # This is the transaction number that appears on email receipts sent for this invoice.
+ attr_reader :receipt_number
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ attr_reader :rendering
+ # The details of the cost of shipping, including the ShippingRate applied on the invoice.
+ attr_reader :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ attr_reader :shipping_details
+ # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
+ attr_reader :starting_balance
+ # Extra information about an invoice for the customer's credit card statement.
+ attr_reader :statement_descriptor
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # Attribute for field subscription
+ attr_reader :subscription
+ # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
+ attr_reader :subtotal
+ # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
+ attr_reader :subtotal_excluding_tax
+ # ID of the test clock this invoice belongs to.
+ attr_reader :test_clock
+ # Attribute for field threshold_reason
+ attr_reader :threshold_reason
+ # Total after discounts and taxes.
+ attr_reader :total
+ # The aggregate amounts calculated per discount across all line items.
+ attr_reader :total_discount_amounts
+ # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
+ attr_reader :total_excluding_tax
+ # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
+ attr_reader :total_pretax_credit_amounts
+ # The aggregate tax information of all line items.
+ attr_reader :total_taxes
+ # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
+ attr_reader :webhooks_delivered_at
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
def add_lines(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb
index 65d6156b..f2541aa9 100644
--- a/lib/stripe/resources/invoice_item.rb
+++ b/lib/stripe/resources/invoice_item.rb
@@ -24,6 +24,406 @@ module Stripe
"invoiceitem"
end
+ class Parent < Stripe::StripeObject
+ class SubscriptionDetails < Stripe::StripeObject
+ # Attribute for field subscription
+ attr_reader :subscription
+ # Attribute for field subscription_item
+ attr_reader :subscription_item
+ end
+ # Attribute for field subscription_details
+ attr_reader :subscription_details
+ # Attribute for field type
+ attr_reader :type
+ end
+
+ class Period < Stripe::StripeObject
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_reader :end
+ # The start of the period. This value is inclusive.
+ attr_reader :start
+ end
+
+ class Pricing < Stripe::StripeObject
+ class PriceDetails < Stripe::StripeObject
+ # The ID of the price this item is associated with.
+ attr_reader :price
+ # The ID of the product this item is associated with.
+ attr_reader :product
+ end
+ # Attribute for field price_details
+ attr_reader :price_details
+ # The type of the pricing details.
+ attr_reader :type
+ # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.
+ attr_reader :unit_amount_decimal
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @tax_rates = tax_rates
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return invoice items that were created during the given date interval.
+ attr_accessor :created
+ # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.
+ attr_accessor :pending
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ pending: nil,
+ starting_after: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @pending = pending
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # The ID of the customer who will be billed when this invoice item is billed.
+ attr_accessor :customer
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.
+ attr_accessor :discountable
+ # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
+ attr_accessor :invoice
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ attr_accessor :quantity
+ # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
+ attr_accessor :subscription
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ invoice: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @currency = currency
+ @customer = customer
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @expand = expand
+ @invoice = invoice
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @subscription = subscription
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @tax_rates = tax_rates
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # The ID of the customer who will be billed when this invoice item is billed.
+ attr_reader :customer
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :date
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # If true, discounts will apply to this invoice item. Always false for prorations.
+ attr_reader :discountable
+ # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
+ attr_reader :discounts
+ # Unique identifier for the object.
+ attr_reader :id
+ # The ID of the invoice this invoice item belongs to.
+ attr_reader :invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field parent
+ attr_reader :parent
+ # Attribute for field period
+ attr_reader :period
+ # The pricing information of the invoice item.
+ attr_reader :pricing
+ # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
+ attr_reader :proration
+ # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
+ attr_reader :quantity
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ attr_reader :tax_rates
+ # ID of the test clock this invoice item belongs to.
+ attr_reader :test_clock
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/invoiceitems", params: params, opts: opts)
diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb
index c497bfbe..632cc59f 100644
--- a/lib/stripe/resources/invoice_line_item.rb
+++ b/lib/stripe/resources/invoice_line_item.rb
@@ -13,6 +13,356 @@ module Stripe
"line_item"
end
+ class DiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ attr_reader :discount
+ end
+
+ class Parent < Stripe::StripeObject
+ class InvoiceItemDetails < Stripe::StripeObject
+ class ProrationDetails < Stripe::StripeObject
+ class CreditedItems < Stripe::StripeObject
+ # Invoice containing the credited invoice line items
+ attr_reader :invoice
+ # Credited invoice line items
+ attr_reader :invoice_line_items
+ end
+ # For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
+ attr_reader :credited_items
+ end
+ # Attribute for field invoice_item
+ attr_reader :invoice_item
+ # Whether this is a proration.
+ attr_reader :proration
+ # Additional details for proration line items
+ attr_reader :proration_details
+ # Attribute for field subscription
+ attr_reader :subscription
+ end
+
+ class SubscriptionItemDetails < Stripe::StripeObject
+ class ProrationDetails < Stripe::StripeObject
+ class CreditedItems < Stripe::StripeObject
+ # Invoice containing the credited invoice line items
+ attr_reader :invoice
+ # Credited invoice line items
+ attr_reader :invoice_line_items
+ end
+ # For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
+ attr_reader :credited_items
+ end
+ # Attribute for field invoice_item
+ attr_reader :invoice_item
+ # Whether this is a proration.
+ attr_reader :proration
+ # Additional details for proration line items
+ attr_reader :proration_details
+ # Attribute for field subscription
+ attr_reader :subscription
+ # Attribute for field subscription_item
+ attr_reader :subscription_item
+ end
+ # Attribute for field invoice_item_details
+ attr_reader :invoice_item_details
+ # Attribute for field subscription_item_details
+ attr_reader :subscription_item_details
+ # Attribute for field type
+ attr_reader :type
+ end
+
+ class Period < Stripe::StripeObject
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_reader :end
+ # The start of the period. This value is inclusive.
+ attr_reader :start
+ end
+
+ class PretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ attr_reader :type
+ end
+
+ class Pricing < Stripe::StripeObject
+ class PriceDetails < Stripe::StripeObject
+ # The ID of the price this item is associated with.
+ attr_reader :price
+ # The ID of the product this item is associated with.
+ attr_reader :product
+ end
+ # Attribute for field price_details
+ attr_reader :price_details
+ # The type of the pricing details.
+ attr_reader :type
+ # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.
+ attr_reader :unit_amount_decimal
+ end
+
+ class Tax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ # The type of tax information.
+ attr_reader :type
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @country = country
+ @description = description
+ @display_name = display_name
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @jurisdiction_level = jurisdiction_level
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate_data: nil, taxability_reason: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate_data = tax_rate_data
+ @taxability_reason = taxability_reason
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ end
+ end
+ # The amount, in cents (or local equivalent).
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # The amount of discount calculated per discount for this line item.
+ attr_reader :discount_amounts
+ # If true, discounts will apply to this line item. Always false for prorations.
+ attr_reader :discountable
+ # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
+ attr_reader :discounts
+ # Unique identifier for the object.
+ attr_reader :id
+ # The ID of the invoice that contains this line item.
+ attr_reader :invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field parent
+ attr_reader :parent
+ # Attribute for field period
+ attr_reader :period
+ # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
+ attr_reader :pretax_credit_amounts
+ # The pricing information of the line item.
+ attr_reader :pricing
+ # The quantity of the subscription, if the line item is a subscription or a proration.
+ attr_reader :quantity
+ # Attribute for field subscription
+ attr_reader :subscription
+ # The tax information of the line item.
+ attr_reader :taxes
+
# Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
# so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
# item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
diff --git a/lib/stripe/resources/invoice_payment.rb b/lib/stripe/resources/invoice_payment.rb
index 6fc0a4c9..5f036b1b 100644
--- a/lib/stripe/resources/invoice_payment.rb
+++ b/lib/stripe/resources/invoice_payment.rb
@@ -11,6 +11,92 @@ module Stripe
"invoice_payment"
end
+ class Payment < Stripe::StripeObject
+ # ID of the successful charge for this payment when `type` is `charge`.
+ attr_reader :charge
+ # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.
+ attr_reader :payment_intent
+ # Type of payment object associated with this invoice payment.
+ attr_reader :type
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # The time that the payment was canceled.
+ attr_reader :canceled_at
+ # The time that the payment succeeded.
+ attr_reader :paid_at
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Payment < Stripe::RequestParams
+ # Attribute for param field payment_intent
+ attr_accessor :payment_intent
+ # Attribute for param field type
+ attr_accessor :type
+
+ def initialize(payment_intent: nil, type: nil)
+ @payment_intent = payment_intent
+ @type = type
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field invoice
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Attribute for param field payment
+ attr_accessor :payment
+ # 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.
+ attr_accessor :starting_after
+ # Attribute for param field status
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ payment: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @payment = payment
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+ # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.
+ attr_reader :amount_paid
+ # Amount intended to be paid toward this invoice, in cents (or local equivalent)
+ attr_reader :amount_requested
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Unique identifier for the object.
+ attr_reader :id
+ # The invoice that was paid.
+ attr_reader :invoice
+ # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.
+ attr_reader :is_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field payment
+ attr_reader :payment
+ # The status of the payment, one of `open`, `paid`, or `canceled`.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+
# When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/invoice_payments", params: params, opts: opts)
diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb
index 9eca1af9..4f0adafa 100644
--- a/lib/stripe/resources/invoice_rendering_template.rb
+++ b/lib/stripe/resources/invoice_rendering_template.rb
@@ -12,6 +12,61 @@ module Stripe
"invoice_rendering_template"
end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Attribute for param field status
+ attr_accessor :status
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil, status: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UnarchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # A brief description of the template, hidden from customers
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The status of the template, one of `active` or `archived`.
+ attr_reader :status
+ # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
+ attr_reader :version
+
# Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
def archive(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb
index ec1053a0..dd3cce9e 100644
--- a/lib/stripe/resources/issuing/authorization.rb
+++ b/lib/stripe/resources/issuing/authorization.rb
@@ -18,6 +18,1110 @@ module Stripe
"issuing.authorization"
end
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ attr_reader :cashback_amount
+ end
+
+ class Fleet < Stripe::StripeObject
+ class CardholderPromptData < Stripe::StripeObject
+ # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID.
+ attr_reader :alphanumeric_id
+ # Driver ID.
+ attr_reader :driver_id
+ # Odometer reading.
+ attr_reader :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_reader :unspecified_id
+ # User ID.
+ attr_reader :user_id
+ # Vehicle number.
+ attr_reader :vehicle_number
+ end
+
+ class ReportedBreakdown < Stripe::StripeObject
+ class Fuel < Stripe::StripeObject
+ # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes.
+ attr_reader :gross_amount_decimal
+ end
+
+ class NonFuel < Stripe::StripeObject
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_reader :gross_amount_decimal
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax.
+ attr_reader :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax.
+ attr_reader :national_amount_decimal
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_reader :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_reader :non_fuel
+ # Information about tax included in this transaction.
+ attr_reader :tax
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_reader :cardholder_prompt_data
+ # The type of purchase.
+ attr_reader :purchase_type
+ # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_reader :reported_breakdown
+ # The type of fuel service.
+ attr_reader :service_type
+ end
+
+ class FraudChallenge < Stripe::StripeObject
+ # The method by which the fraud challenge was delivered to the cardholder.
+ attr_reader :channel
+ # The status of the fraud challenge.
+ attr_reader :status
+ # If the challenge is not deliverable, the reason why.
+ attr_reader :undeliverable_reason
+ end
+
+ class Fuel < Stripe::StripeObject
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_reader :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_reader :quantity_decimal
+ # The type of fuel that was purchased.
+ attr_reader :type
+ # The units for `quantity_decimal`.
+ attr_reader :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_reader :unit_cost_decimal
+ end
+
+ class MerchantData < Stripe::StripeObject
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_reader :category
+ # The merchant category code for the seller’s business
+ attr_reader :category_code
+ # City where the seller is located
+ attr_reader :city
+ # Country where the seller is located
+ attr_reader :country
+ # Name of the seller
+ attr_reader :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_reader :network_id
+ # Postal code where the seller is located
+ attr_reader :postal_code
+ # State where the seller is located
+ attr_reader :state
+ # The seller's tax identification number. Currently populated for French merchants only.
+ attr_reader :tax_id
+ # An ID assigned by the seller to the location of the sale.
+ attr_reader :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_reader :url
+ end
+
+ class NetworkData < Stripe::StripeObject
+ # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`.
+ attr_reader :acquiring_institution_id
+ # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements.
+ attr_reader :system_trace_audit_number
+ # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
+ attr_reader :transaction_id
+ end
+
+ class PendingRequest < Stripe::StripeObject
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ attr_reader :cashback_amount
+ end
+ # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_details
+ # 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).
+ attr_reader :currency
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ attr_reader :is_amount_controllable
+ # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :merchant_amount
+ # The local currency the merchant is requesting to authorize.
+ attr_reader :merchant_currency
+ # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
+ attr_reader :network_risk_score
+ end
+
+ class RequestHistory < Stripe::StripeObject
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ attr_reader :cashback_amount
+ end
+ # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_details
+ # Whether this request was approved.
+ attr_reader :approved
+ # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
+ attr_reader :authorization_code
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :merchant_amount
+ # The currency that was collected by the merchant and presented to the cardholder for the authorization. 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).
+ attr_reader :merchant_currency
+ # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
+ attr_reader :network_risk_score
+ # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.
+ attr_reader :reason
+ # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field.
+ attr_reader :reason_message
+ # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time.
+ attr_reader :requested_at
+ end
+
+ class Treasury < Stripe::StripeObject
+ # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization
+ attr_reader :received_credits
+ # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization
+ attr_reader :received_debits
+ # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization
+ attr_reader :transaction
+ end
+
+ class VerificationData < Stripe::StripeObject
+ class AuthenticationExemption < Stripe::StripeObject
+ # The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ attr_reader :claimed_by
+ # The specific exemption claimed for this authorization.
+ attr_reader :type
+ end
+
+ class ThreeDSecure < Stripe::StripeObject
+ # The outcome of the 3D Secure authentication request.
+ attr_reader :result
+ end
+ # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.
+ attr_reader :address_line1_check
+ # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.
+ attr_reader :address_postal_code_check
+ # The exemption applied to this authorization.
+ attr_reader :authentication_exemption
+ # Whether the cardholder provided a CVC and if it matched Stripe’s record.
+ attr_reader :cvc_check
+ # Whether the cardholder provided an expiry date and if it matched Stripe’s record.
+ attr_reader :expiry_check
+ # The postal code submitted as part of the authorization used for postal code verification.
+ attr_reader :postal_code
+ # 3D Secure details.
+ attr_reader :three_d_secure
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return authorizations that belong to the given card.
+ attr_accessor :card
+ # Only return authorizations that belong to the given cardholder.
+ attr_accessor :cardholder
+ # Only return authorizations that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.
+ attr_accessor :status
+
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @card = card
+ @cardholder = cardholder
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class ApproveParams < Stripe::RequestParams
+ # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(amount: nil, expand: nil, metadata: nil)
+ @amount = amount
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class DeclineParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AmountDetails < Stripe::RequestParams
+ # The ATM withdrawal fee.
+ attr_accessor :atm_fee
+ # The amount of cash requested by the cardholder.
+ attr_accessor :cashback_amount
+
+ def initialize(atm_fee: nil, cashback_amount: nil)
+ @atm_fee = atm_fee
+ @cashback_amount = cashback_amount
+ end
+ end
+
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_accessor :category
+ # City where the seller is located
+ attr_accessor :city
+ # Country where the seller is located
+ attr_accessor :country
+ # Name of the seller
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ attr_accessor :postal_code
+ # State where the seller is located
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_accessor :url
+
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ )
+ @category = category
+ @city = city
+ @country = country
+ @name = name
+ @network_id = network_id
+ @postal_code = postal_code
+ @state = state
+ @terminal_id = terminal_id
+ @url = url
+ end
+ end
+
+ class NetworkData < Stripe::RequestParams
+ # Identifier assigned to the acquirer by the card network.
+ attr_accessor :acquiring_institution_id
+
+ def initialize(acquiring_institution_id: nil)
+ @acquiring_institution_id = acquiring_institution_id
+ end
+ end
+
+ class VerificationData < Stripe::RequestParams
+ class AuthenticationExemption < Stripe::RequestParams
+ # The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ attr_accessor :claimed_by
+ # The specific exemption claimed for this authorization.
+ attr_accessor :type
+
+ def initialize(claimed_by: nil, type: nil)
+ @claimed_by = claimed_by
+ @type = type
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ # The outcome of the 3D Secure authentication request.
+ attr_accessor :result
+
+ def initialize(result: nil)
+ @result = result
+ end
+ end
+ # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.
+ attr_accessor :address_line1_check
+ # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.
+ attr_accessor :address_postal_code_check
+ # The exemption applied to this authorization.
+ attr_accessor :authentication_exemption
+ # Whether the cardholder provided a CVC and if it matched Stripe’s record.
+ attr_accessor :cvc_check
+ # Whether the cardholder provided an expiry date and if it matched Stripe’s record.
+ attr_accessor :expiry_check
+ # 3D Secure details.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ address_line1_check: nil,
+ address_postal_code_check: nil,
+ authentication_exemption: nil,
+ cvc_check: nil,
+ expiry_check: nil,
+ three_d_secure: nil
+ )
+ @address_line1_check = address_line1_check
+ @address_postal_code_check = address_postal_code_check
+ @authentication_exemption = authentication_exemption
+ @cvc_check = cvc_check
+ @expiry_check = expiry_check
+ @three_d_secure = three_d_secure
+ end
+ end
+ # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount_details
+ # How the card details were provided. Defaults to online.
+ attr_accessor :authorization_method
+ # Card associated with this authorization.
+ attr_accessor :card
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Fleet-specific information for authorizations using Fleet cards.
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ attr_accessor :is_amount_controllable
+ # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :merchant_amount
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :merchant_currency
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ attr_accessor :merchant_data
+ # Details about the authorization, such as identifiers, set by the card network.
+ attr_accessor :network_data
+ # Verifications that Stripe performed on information that the cardholder provided to the merchant.
+ attr_accessor :verification_data
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ attr_accessor :wallet
+
+ def initialize(
+ amount: nil,
+ amount_details: nil,
+ authorization_method: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ fleet: nil,
+ fuel: nil,
+ is_amount_controllable: nil,
+ merchant_amount: nil,
+ merchant_currency: nil,
+ merchant_data: nil,
+ network_data: nil,
+ verification_data: nil,
+ wallet: nil
+ )
+ @amount = amount
+ @amount_details = amount_details
+ @authorization_method = authorization_method
+ @card = card
+ @currency = currency
+ @expand = expand
+ @fleet = fleet
+ @fuel = fuel
+ @is_amount_controllable = is_amount_controllable
+ @merchant_amount = merchant_amount
+ @merchant_currency = merchant_currency
+ @merchant_data = merchant_data
+ @network_data = network_data
+ @verification_data = verification_data
+ @wallet = wallet
+ end
+ end
+
+ class CaptureParams < Stripe::RequestParams
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_accessor :departure_airport_code
+ # The flight number.
+ attr_accessor :flight_number
+ # The flight's service class.
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_accessor :stopover_allowed
+
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ )
+ @arrival_airport_code = arrival_airport_code
+ @carrier = carrier
+ @departure_airport_code = departure_airport_code
+ @flight_number = flight_number
+ @service_class = service_class
+ @stopover_allowed = stopover_allowed
+ end
+ end
+ # The time that the flight departed.
+ attr_accessor :departure_at
+ # The name of the passenger.
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ attr_accessor :refundable
+ # The legs of the trip.
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ attr_accessor :travel_agency
+
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ )
+ @departure_at = departure_at
+ @passenger_name = passenger_name
+ @refundable = refundable
+ @segments = segments
+ @travel_agency = travel_agency
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_accessor :nights
+
+ def initialize(check_in_at: nil, nights: nil)
+ @check_in_at = check_in_at
+ @nights = nights
+ end
+ end
+
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ attr_accessor :description
+ # Attribute for param field quantity
+ attr_accessor :quantity
+ # Attribute for param field total
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ attr_accessor :unit_cost
+
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
+ @description = description
+ @quantity = quantity
+ @total = total
+ @unit_cost = unit_cost
+ end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_accessor :lodging
+ # The line items in the purchase.
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ attr_accessor :reference
+
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ )
+ @fleet = fleet
+ @flight = flight
+ @fuel = fuel
+ @lodging = lodging
+ @receipt = receipt
+ @reference = reference
+ end
+ end
+ # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :capture_amount
+ # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.
+ attr_accessor :close_authorization
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_accessor :purchase_details
+
+ def initialize(
+ capture_amount: nil,
+ close_authorization: nil,
+ expand: nil,
+ purchase_details: nil
+ )
+ @capture_amount = capture_amount
+ @close_authorization = close_authorization
+ @expand = expand
+ @purchase_details = purchase_details
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FinalizeAmountParams < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :final_amount
+ # Fleet-specific information for authorizations using Fleet cards.
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+
+ def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil)
+ @expand = expand
+ @final_amount = final_amount
+ @fleet = fleet
+ @fuel = fuel
+ end
+ end
+
+ class RespondParams < Stripe::RequestParams
+ # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).
+ attr_accessor :confirmed
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(confirmed: nil, expand: nil)
+ @confirmed = confirmed
+ @expand = expand
+ end
+ end
+
+ class IncrementParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :increment_amount
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ attr_accessor :is_amount_controllable
+
+ def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil)
+ @expand = expand
+ @increment_amount = increment_amount
+ @is_amount_controllable = is_amount_controllable
+ end
+ end
+
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :reverse_amount
+
+ def initialize(expand: nil, reverse_amount: nil)
+ @expand = expand
+ @reverse_amount = reverse_amount
+ end
+ end
+ # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different.
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_details
+ # Whether the authorization has been approved.
+ attr_reader :approved
+ # How the card details were provided.
+ attr_reader :authorization_method
+ # List of balance transactions associated with this authorization.
+ attr_reader :balance_transactions
+ # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.
+ attr_reader :card
+ # The cardholder to whom this authorization belongs.
+ attr_reader :cardholder
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. 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).
+ attr_reader :currency
+ # Fleet-specific information for authorizations using Fleet cards.
+ attr_reader :fleet
+ # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
+ attr_reader :fraud_challenges
+ # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
+ attr_reader :fuel
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different.
+ attr_reader :merchant_amount
+ # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. 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).
+ attr_reader :merchant_currency
+ # Attribute for field merchant_data
+ attr_reader :merchant_data
+ # 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.
+ attr_reader :metadata
+ # Details about the authorization, such as identifiers, set by the card network.
+ attr_reader :network_data
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
+ attr_reader :pending_request
+ # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
+ attr_reader :request_history
+ # The current status of the authorization in its lifecycle.
+ attr_reader :status
+ # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null.
+ attr_reader :token
+ # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.
+ attr_reader :transactions
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).
+ attr_reader :treasury
+ # Attribute for field verification_data
+ attr_reader :verification_data
+ # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
+ attr_reader :verified_by_fraud_challenge
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ attr_reader :wallet
+
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
def approve(params = {}, opts = {})
diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb
index 71564e88..a5f9a1a0 100644
--- a/lib/stripe/resources/issuing/card.rb
+++ b/lib/stripe/resources/issuing/card.rb
@@ -14,6 +14,663 @@ module Stripe
"issuing.card"
end
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class AddressValidation < Stripe::StripeObject
+ class NormalizedAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # The address validation capabilities to use.
+ attr_reader :mode
+ # The normalized shipping address.
+ attr_reader :normalized_address
+ # The validation result for the shipping address.
+ attr_reader :result
+ end
+
+ class Customs < Stripe::StripeObject
+ # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU.
+ attr_reader :eori_number
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Address validation details for the shipment.
+ attr_reader :address_validation
+ # The delivery company that shipped a card.
+ attr_reader :carrier
+ # Additional information that may be required for clearing customs.
+ attr_reader :customs
+ # A unix timestamp representing a best estimate of when the card will be delivered.
+ attr_reader :eta
+ # Recipient name.
+ attr_reader :name
+ # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created.
+ attr_reader :phone_number
+ # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true.
+ attr_reader :require_signature
+ # Shipment service, such as `standard` or `express`.
+ attr_reader :service
+ # The delivery status of the card.
+ attr_reader :status
+ # A tracking number for a card shipment.
+ attr_reader :tracking_number
+ # A link to the shipping carrier's site where you can view detailed information about a card shipment.
+ attr_reader :tracking_url
+ # Packaging options.
+ attr_reader :type
+ end
+
+ class SpendingControls < Stripe::StripeObject
+ class SpendingLimit < Stripe::StripeObject
+ # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_reader :categories
+ # Interval (or event) to which the amount applies.
+ attr_reader :interval
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_reader :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_reader :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_reader :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_reader :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ attr_reader :spending_limits
+ # Currency of the amounts within `spending_limits`. Always the same as the currency of the card.
+ attr_reader :spending_limits_currency
+ end
+
+ class Wallets < Stripe::StripeObject
+ class ApplePay < Stripe::StripeObject
+ # Apple Pay Eligibility
+ attr_reader :eligible
+ # Reason the card is ineligible for Apple Pay
+ attr_reader :ineligible_reason
+ end
+
+ class GooglePay < Stripe::StripeObject
+ # Google Pay Eligibility
+ attr_reader :eligible
+ # Reason the card is ineligible for Google Pay
+ attr_reader :ineligible_reason
+ end
+ # Attribute for field apple_pay
+ attr_reader :apple_pay
+ # Attribute for field google_pay
+ attr_reader :google_pay
+ # Unique identifier for a card used with digital wallets
+ attr_reader :primary_account_identifier
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return cards belonging to the Cardholder with the provided ID.
+ attr_accessor :cardholder
+ # Only return cards that were issued during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Only return cards that have the given expiration month.
+ attr_accessor :exp_month
+ # Only return cards that have the given expiration year.
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return cards that have the given last four digits.
+ attr_accessor :last4
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Attribute for param field personalization_design
+ attr_accessor :personalization_design
+ # 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.
+ attr_accessor :starting_after
+ # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
+ attr_accessor :status
+ # Only return cards that have the given type. One of `virtual` or `physical`.
+ attr_accessor :type
+
+ def initialize(
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ last4: nil,
+ limit: nil,
+ personalization_design: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ )
+ @cardholder = cardholder
+ @created = created
+ @ending_before = ending_before
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @expand = expand
+ @last4 = last4
+ @limit = limit
+ @personalization_design = personalization_design
+ @starting_after = starting_after
+ @status = status
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ attr_accessor :encrypted_number
+
+ def initialize(encrypted_number: nil)
+ @encrypted_number = encrypted_number
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ attr_accessor :mode
+
+ def initialize(mode: nil)
+ @mode = mode
+ end
+ end
+
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ attr_accessor :eori_number
+
+ def initialize(eori_number: nil)
+ @eori_number = eori_number
+ end
+ end
+ # The address that the card is shipped to.
+ attr_accessor :address
+ # Address validation settings.
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ attr_accessor :require_signature
+ # Shipment service.
+ attr_accessor :service
+ # Packaging options.
+ attr_accessor :type
+
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ )
+ @address = address
+ @address_validation = address_validation
+ @customs = customs
+ @name = name
+ @phone_number = phone_number
+ @require_signature = require_signature
+ @service = service
+ @type = type
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ attr_accessor :spending_limits
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ end
+ end
+ # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
+ attr_accessor :cardholder
+ # The currency for the card.
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field financial_account
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The personalization design object belonging to this card.
+ attr_accessor :personalization_design
+ # The desired PIN for this card.
+ attr_accessor :pin
+ # The card this is meant to be a replacement for (if any).
+ attr_accessor :replacement_for
+ # If `replacement_for` is specified, this should indicate why that card is being replaced.
+ attr_accessor :replacement_reason
+ # The second line to print on the card. Max length: 24 characters.
+ attr_accessor :second_line
+ # The address where the card will be shipped.
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ attr_accessor :status
+ # The type of card to issue. Possible values are `physical` or `virtual`.
+ attr_accessor :type
+
+ def initialize(
+ cardholder: nil,
+ currency: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ replacement_for: nil,
+ replacement_reason: nil,
+ second_line: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ )
+ @cardholder = cardholder
+ @currency = currency
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @personalization_design = personalization_design
+ @pin = pin
+ @replacement_for = replacement_for
+ @replacement_reason = replacement_reason
+ @second_line = second_line
+ @shipping = shipping
+ @spending_controls = spending_controls
+ @status = status
+ @type = type
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ attr_accessor :encrypted_number
+
+ def initialize(encrypted_number: nil)
+ @encrypted_number = encrypted_number
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ attr_accessor :mode
+
+ def initialize(mode: nil)
+ @mode = mode
+ end
+ end
+
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ attr_accessor :eori_number
+
+ def initialize(eori_number: nil)
+ @eori_number = eori_number
+ end
+ end
+ # The address that the card is shipped to.
+ attr_accessor :address
+ # Address validation settings.
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ attr_accessor :require_signature
+ # Shipment service.
+ attr_accessor :service
+ # Packaging options.
+ attr_accessor :type
+
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ )
+ @address = address
+ @address_validation = address_validation
+ @customs = customs
+ @name = name
+ @phone_number = phone_number
+ @require_signature = require_signature
+ @service = service
+ @type = type
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ attr_accessor :spending_limits
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ end
+ end
+ # Reason why the `status` of this card is `canceled`.
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Attribute for param field personalization_design
+ attr_accessor :personalization_design
+ # The desired new PIN for this card.
+ attr_accessor :pin
+ # Updated shipping information for the card.
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
+ attr_accessor :status
+
+ def initialize(
+ cancellation_reason: nil,
+ expand: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil
+ )
+ @cancellation_reason = cancellation_reason
+ @expand = expand
+ @metadata = metadata
+ @personalization_design = personalization_design
+ @pin = pin
+ @shipping = shipping
+ @spending_controls = spending_controls
+ @status = status
+ end
+ end
+
+ class DeliverCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FailCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReturnCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ShipCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class SubmitCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # The brand of the card.
+ attr_reader :brand
+ # The reason why the card was canceled.
+ attr_reader :cancellation_reason
+ # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
+ #
+ # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
+ attr_reader :cardholder
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
+ attr_reader :currency
+ # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
+ attr_reader :cvc
+ # The expiration month of the card.
+ attr_reader :exp_month
+ # The expiration year of the card.
+ attr_reader :exp_year
+ # The financial account this card is attached to.
+ attr_reader :financial_account
+ # Unique identifier for the object.
+ attr_reader :id
+ # The last 4 digits of the card number.
+ attr_reader :last4
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The personalization design object belonging to this card.
+ attr_reader :personalization_design
+ # The latest card that replaces this card, if any.
+ attr_reader :replaced_by
+ # The card this card replaces, if any.
+ attr_reader :replacement_for
+ # The reason why the previous card needed to be replaced.
+ attr_reader :replacement_reason
+ # Where and how the card will be shipped.
+ attr_reader :shipping
+ # Attribute for field spending_controls
+ attr_reader :spending_controls
+ # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ attr_reader :status
+ # The type of the card.
+ attr_reader :type
+ # Information relating to digital wallets (like Apple Pay and Google Pay).
+ attr_reader :wallets
+
# Creates an Issuing Card object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts)
diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb
index 7b23ebb6..cdcdda01 100644
--- a/lib/stripe/resources/issuing/cardholder.rb
+++ b/lib/stripe/resources/issuing/cardholder.rb
@@ -16,6 +16,654 @@ module Stripe
"issuing.cardholder"
end
+ class Billing < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ end
+
+ class Company < Stripe::StripeObject
+ # Whether the company's business ID number was provided.
+ attr_reader :tax_id_provided
+ end
+
+ class Individual < Stripe::StripeObject
+ class CardIssuing < Stripe::StripeObject
+ class UserTermsAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms.
+ attr_reader :date
+ # The IP address from which the cardholder accepted the Authorized User Terms.
+ attr_reader :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ attr_reader :user_agent
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ attr_reader :user_terms_acceptance
+ end
+
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ attr_reader :month
+ # The four-digit year of birth.
+ attr_reader :year
+ end
+
+ class Verification < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_reader :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_reader :front
+ end
+ # An identifying document, either a passport or local ID card.
+ attr_reader :document
+ end
+ # Information related to the card_issuing program for this cardholder.
+ attr_reader :card_issuing
+ # The date of birth of this cardholder.
+ attr_reader :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_reader :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_reader :last_name
+ # Government-issued ID document for this cardholder.
+ attr_reader :verification
+ end
+
+ class Requirements < Stripe::StripeObject
+ # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.
+ attr_reader :disabled_reason
+ # Array of fields that need to be collected in order to verify and re-enable the cardholder.
+ attr_reader :past_due
+ end
+
+ class SpendingControls < Stripe::StripeObject
+ class SpendingLimit < Stripe::StripeObject
+ # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_reader :categories
+ # Interval (or event) to which the amount applies.
+ attr_reader :interval
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_reader :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_reader :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_reader :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_reader :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ attr_reader :spending_limits
+ # Currency of the amounts within `spending_limits`.
+ attr_reader :spending_limits_currency
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return cardholders that were created during the given date interval.
+ attr_accessor :created
+ # Only return cardholders that have the given email address.
+ attr_accessor :email
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return cardholders that have the given phone number.
+ attr_accessor :phone_number
+ # 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.
+ attr_accessor :starting_after
+ # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.
+ attr_accessor :status
+ # Only return cardholders that have the given type. One of `individual` or `company`.
+ attr_accessor :type
+
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ phone_number: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ )
+ @created = created
+ @email = email
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @phone_number = phone_number
+ @starting_after = starting_after
+ @status = status
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The cardholder’s billing address.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ attr_accessor :user_terms_acceptance
+
+ def initialize(user_terms_acceptance: nil)
+ @user_terms_acceptance = user_terms_acceptance
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ attr_accessor :verification
+
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ )
+ @card_issuing = card_issuing
+ @dob = dob
+ @first_name = first_name
+ @last_name = last_name
+ @verification = verification
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ attr_accessor :spending_limits_currency
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ @spending_limits_currency = spending_limits_currency
+ end
+ end
+ # The cardholder's billing address.
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ attr_accessor :company
+ # The cardholder's email address.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
+ attr_accessor :name
+ # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.
+ attr_accessor :status
+ # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ attr_accessor :type
+
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ name: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ )
+ @billing = billing
+ @company = company
+ @email = email
+ @expand = expand
+ @individual = individual
+ @metadata = metadata
+ @name = name
+ @phone_number = phone_number
+ @preferred_locales = preferred_locales
+ @spending_controls = spending_controls
+ @status = status
+ @type = type
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The cardholder’s billing address.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ attr_accessor :user_terms_acceptance
+
+ def initialize(user_terms_acceptance: nil)
+ @user_terms_acceptance = user_terms_acceptance
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ attr_accessor :verification
+
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ )
+ @card_issuing = card_issuing
+ @dob = dob
+ @first_name = first_name
+ @last_name = last_name
+ @verification = verification
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ attr_accessor :spending_limits_currency
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ @spending_limits_currency = spending_limits_currency
+ end
+ end
+ # The cardholder's billing address.
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ attr_accessor :company
+ # The cardholder's email address.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards.
+ attr_accessor :status
+
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil
+ )
+ @billing = billing
+ @company = company
+ @email = email
+ @expand = expand
+ @individual = individual
+ @metadata = metadata
+ @phone_number = phone_number
+ @preferred_locales = preferred_locales
+ @spending_controls = spending_controls
+ @status = status
+ end
+ end
+ # Attribute for field billing
+ attr_reader :billing
+ # Additional information about a `company` cardholder.
+ attr_reader :company
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The cardholder's email address.
+ attr_reader :email
+ # Unique identifier for the object.
+ attr_reader :id
+ # Additional information about an `individual` cardholder.
+ attr_reader :individual
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The cardholder's name. This will be printed on cards issued to them.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ attr_reader :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ attr_reader :preferred_locales
+ # Attribute for field requirements
+ attr_reader :requirements
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_reader :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards.
+ attr_reader :status
+ # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ attr_reader :type
+
# Creates a new Issuing Cardholder object that can be issued cards.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb
index bc0ee2d4..62aae499 100644
--- a/lib/stripe/resources/issuing/dispute.rb
+++ b/lib/stripe/resources/issuing/dispute.rb
@@ -16,6 +16,787 @@ module Stripe
"issuing.dispute"
end
+ class Evidence < Stripe::StripeObject
+ class Canceled < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Date when order was canceled.
+ attr_reader :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ attr_reader :cancellation_policy_provided
+ # Reason for canceling the order.
+ attr_reader :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ attr_reader :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_reader :product_description
+ # Whether the product was a merchandise or service.
+ attr_reader :product_type
+ # Result of cardholder's attempt to return the product.
+ attr_reader :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_reader :returned_at
+ end
+
+ class Duplicate < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ attr_reader :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ attr_reader :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ attr_reader :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ attr_reader :original_transaction
+ end
+
+ class Fraudulent < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ end
+
+ class MerchandiseNotAsDescribed < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ # Date when the product was received.
+ attr_reader :received_at
+ # Description of the cardholder's attempt to return the product.
+ attr_reader :return_description
+ # Result of cardholder's attempt to return the product.
+ attr_reader :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_reader :returned_at
+ end
+
+ class NoValidAuthorization < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ end
+
+ class NotReceived < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ attr_reader :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_reader :product_description
+ # Whether the product was a merchandise or service.
+ attr_reader :product_type
+ end
+
+ class Other < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_reader :product_description
+ # Whether the product was a merchandise or service.
+ attr_reader :product_type
+ end
+
+ class ServiceNotAsDescribed < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_reader :additional_documentation
+ # Date when order was canceled.
+ attr_reader :canceled_at
+ # Reason for canceling the order.
+ attr_reader :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_reader :explanation
+ # Date when the product was received.
+ attr_reader :received_at
+ end
+ # Attribute for field canceled
+ attr_reader :canceled
+ # Attribute for field duplicate
+ attr_reader :duplicate
+ # Attribute for field fraudulent
+ attr_reader :fraudulent
+ # Attribute for field merchandise_not_as_described
+ attr_reader :merchandise_not_as_described
+ # Attribute for field no_valid_authorization
+ attr_reader :no_valid_authorization
+ # Attribute for field not_received
+ attr_reader :not_received
+ # Attribute for field other
+ attr_reader :other
+ # The reason for filing the dispute. Its value will match the field containing the evidence.
+ attr_reader :reason
+ # Attribute for field service_not_as_described
+ attr_reader :service_not_as_described
+ end
+
+ class Treasury < Stripe::StripeObject
+ # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute
+ attr_reader :debit_reversal
+ # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.
+ attr_reader :received_debit
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return Issuing disputes that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Select Issuing disputes with the given status.
+ attr_accessor :status
+ # Select the Issuing dispute for the given transaction.
+ attr_accessor :transaction
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ transaction: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @transaction = transaction
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_policy_provided = cancellation_policy_provided
+ @cancellation_reason = cancellation_reason
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ attr_accessor :original_transaction
+
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ )
+ @additional_documentation = additional_documentation
+ @card_statement = card_statement
+ @cash_receipt = cash_receipt
+ @check_image = check_image
+ @explanation = explanation
+ @original_transaction = original_transaction
+ end
+ end
+
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @received_at = received_at
+ @return_description = return_description
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_reason = cancellation_reason
+ @explanation = explanation
+ @received_at = received_at
+ end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ attr_accessor :service_not_as_described
+
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ )
+ @canceled = canceled
+ @duplicate = duplicate
+ @fraudulent = fraudulent
+ @merchandise_not_as_described = merchandise_not_as_described
+ @no_valid_authorization = no_valid_authorization
+ @not_received = not_received
+ @other = other
+ @reason = reason
+ @service_not_as_described = service_not_as_described
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ # The ID of the ReceivedDebit to initiate an Issuings dispute for.
+ attr_accessor :received_debit
+
+ def initialize(received_debit: nil)
+ @received_debit = received_debit
+ end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
+ attr_accessor :transaction
+ # Params for disputes related to Treasury FinancialAccounts
+ attr_accessor :treasury
+
+ def initialize(
+ amount: nil,
+ evidence: nil,
+ expand: nil,
+ metadata: nil,
+ transaction: nil,
+ treasury: nil
+ )
+ @amount = amount
+ @evidence = evidence
+ @expand = expand
+ @metadata = metadata
+ @transaction = transaction
+ @treasury = treasury
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_policy_provided = cancellation_policy_provided
+ @cancellation_reason = cancellation_reason
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ attr_accessor :original_transaction
+
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ )
+ @additional_documentation = additional_documentation
+ @card_statement = card_statement
+ @cash_receipt = cash_receipt
+ @check_image = check_image
+ @explanation = explanation
+ @original_transaction = original_transaction
+ end
+ end
+
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @received_at = received_at
+ @return_description = return_description
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_reason = cancellation_reason
+ @explanation = explanation
+ @received_at = received_at
+ end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ attr_accessor :service_not_as_described
+
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ )
+ @canceled = canceled
+ @duplicate = duplicate
+ @fraudulent = fraudulent
+ @merchandise_not_as_described = merchandise_not_as_described
+ @no_valid_authorization = no_valid_authorization
+ @not_received = not_received
+ @other = other
+ @reason = reason
+ @service_not_as_described = service_not_as_described
+ end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil)
+ @amount = amount
+ @evidence = evidence
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class SubmitParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+ # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
+ attr_reader :amount
+ # List of balance transactions associated with the dispute.
+ attr_reader :balance_transactions
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The currency the `transaction` was made in.
+ attr_reader :currency
+ # Attribute for field evidence
+ attr_reader :evidence
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
+ attr_reader :loss_reason
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Current status of the dispute.
+ attr_reader :status
+ # The transaction being disputed.
+ attr_reader :transaction
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
+ attr_reader :treasury
+
# Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/issuing/personalization_design.rb b/lib/stripe/resources/issuing/personalization_design.rb
index 34c07d53..3b166f5a 100644
--- a/lib/stripe/resources/issuing/personalization_design.rb
+++ b/lib/stripe/resources/issuing/personalization_design.rb
@@ -14,6 +14,282 @@ module Stripe
"issuing.personalization_design"
end
+ class CarrierText < Stripe::StripeObject
+ # The footer body text of the carrier letter.
+ attr_reader :footer_body
+ # The footer title text of the carrier letter.
+ attr_reader :footer_title
+ # The header body text of the carrier letter.
+ attr_reader :header_body
+ # The header title text of the carrier letter.
+ attr_reader :header_title
+ end
+
+ class Preferences < Stripe::StripeObject
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ attr_reader :is_default
+ # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.
+ attr_reader :is_platform_default
+ end
+
+ class RejectionReasons < Stripe::StripeObject
+ # The reason(s) the card logo was rejected.
+ attr_reader :card_logo
+ # The reason(s) the carrier text was rejected.
+ attr_reader :carrier_text
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Preferences < Stripe::RequestParams
+ # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default.
+ attr_accessor :is_default
+ # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts.
+ attr_accessor :is_platform_default
+
+ def initialize(is_default: nil, is_platform_default: nil)
+ @is_default = is_default
+ @is_platform_default = is_platform_default
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return personalization designs with the given lookup keys.
+ attr_accessor :lookup_keys
+ # Only return personalization designs with the given preferences.
+ attr_accessor :preferences
+ # 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.
+ attr_accessor :starting_after
+ # Only return personalization designs with the given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ preferences: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @lookup_keys = lookup_keys
+ @preferences = preferences
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ attr_accessor :header_title
+
+ def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil)
+ @footer_body = footer_body
+ @footer_title = footer_title
+ @header_body = header_body
+ @header_title = header_title
+ end
+ end
+
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ attr_accessor :is_default
+
+ def initialize(is_default: nil)
+ @is_default = is_default
+ end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # Friendly display name.
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ attr_accessor :transfer_lookup_key
+
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ )
+ @card_logo = card_logo
+ @carrier_text = carrier_text
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @name = name
+ @physical_bundle = physical_bundle
+ @preferences = preferences
+ @transfer_lookup_key = transfer_lookup_key
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ attr_accessor :header_title
+
+ def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil)
+ @footer_body = footer_body
+ @footer_title = footer_title
+ @header_body = header_body
+ @header_title = header_title
+ end
+ end
+
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ attr_accessor :is_default
+
+ def initialize(is_default: nil)
+ @is_default = is_default
+ end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # Friendly display name. Providing an empty string will set the field to null.
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ attr_accessor :transfer_lookup_key
+
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ )
+ @card_logo = card_logo
+ @carrier_text = carrier_text
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @name = name
+ @physical_bundle = physical_bundle
+ @preferences = preferences
+ @transfer_lookup_key = transfer_lookup_key
+ end
+ end
+
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RejectParams < Stripe::RequestParams
+ class RejectionReasons < Stripe::RequestParams
+ # The reason(s) the card logo was rejected.
+ attr_accessor :card_logo
+ # The reason(s) the carrier text was rejected.
+ attr_accessor :carrier_text
+
+ def initialize(card_logo: nil, carrier_text: nil)
+ @card_logo = card_logo
+ @carrier_text = carrier_text
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The reason(s) the personalization design was rejected.
+ attr_accessor :rejection_reasons
+
+ def initialize(expand: nil, rejection_reasons: nil)
+ @expand = expand
+ @rejection_reasons = rejection_reasons
+ end
+ end
+ # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ attr_reader :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ attr_reader :carrier_text
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ attr_reader :lookup_key
+ # 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.
+ attr_reader :metadata
+ # Friendly display name.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The physical bundle object belonging to this personalization design.
+ attr_reader :physical_bundle
+ # Attribute for field preferences
+ attr_reader :preferences
+ # Attribute for field rejection_reasons
+ attr_reader :rejection_reasons
+ # Whether this personalization design can be used to create cards.
+ attr_reader :status
+
# Creates a personalization design object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/issuing/physical_bundle.rb b/lib/stripe/resources/issuing/physical_bundle.rb
index 405bccdc..2a31fe3f 100644
--- a/lib/stripe/resources/issuing/physical_bundle.rb
+++ b/lib/stripe/resources/issuing/physical_bundle.rb
@@ -12,6 +12,60 @@ module Stripe
"issuing.physical_bundle"
end
+ class Features < Stripe::StripeObject
+ # The policy for how to use card logo images in a card design with this physical bundle.
+ attr_reader :card_logo
+ # The policy for how to use carrier letter text in a card design with this physical bundle.
+ attr_reader :carrier_text
+ # The policy for how to use a second line on a card with this physical bundle.
+ attr_reader :second_line
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return physical bundles with the given status.
+ attr_accessor :status
+ # Only return physical bundles with the given type.
+ attr_accessor :type
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @type = type
+ end
+ end
+ # Attribute for field features
+ attr_reader :features
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Friendly display name.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Whether this physical bundle can be used to create cards.
+ attr_reader :status
+ # Whether this physical bundle is a standard Stripe offering or custom-made for you.
+ attr_reader :type
+
# Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/issuing/token.rb b/lib/stripe/resources/issuing/token.rb
index 6c1ba098..bb6f2306 100644
--- a/lib/stripe/resources/issuing/token.rb
+++ b/lib/stripe/resources/issuing/token.rb
@@ -13,6 +13,172 @@ module Stripe
"issuing.token"
end
+ class NetworkData < Stripe::StripeObject
+ class Device < Stripe::StripeObject
+ # An obfuscated ID derived from the device ID.
+ attr_reader :device_fingerprint
+ # The IP address of the device at provisioning time.
+ attr_reader :ip_address
+ # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal.
+ attr_reader :location
+ # The name of the device used for tokenization.
+ attr_reader :name
+ # The phone number of the device used for tokenization.
+ attr_reader :phone_number
+ # The type of device used for tokenization.
+ attr_reader :type
+ end
+
+ class Mastercard < Stripe::StripeObject
+ # A unique reference ID from MasterCard to represent the card account number.
+ attr_reader :card_reference_id
+ # The network-unique identifier for the token.
+ attr_reader :token_reference_id
+ # The ID of the entity requesting tokenization, specific to MasterCard.
+ attr_reader :token_requestor_id
+ # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard.
+ attr_reader :token_requestor_name
+ end
+
+ class Visa < Stripe::StripeObject
+ # A unique reference ID from Visa to represent the card account number.
+ attr_reader :card_reference_id
+ # The network-unique identifier for the token.
+ attr_reader :token_reference_id
+ # The ID of the entity requesting tokenization, specific to Visa.
+ attr_reader :token_requestor_id
+ # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa.
+ attr_reader :token_risk_score
+ end
+
+ class WalletProvider < Stripe::StripeObject
+ class CardholderAddress < Stripe::StripeObject
+ # The street address of the cardholder tokenizing the card.
+ attr_reader :line1
+ # The postal code of the cardholder tokenizing the card.
+ attr_reader :postal_code
+ end
+ # The wallet provider-given account ID of the digital wallet the token belongs to.
+ attr_reader :account_id
+ # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy.
+ attr_reader :account_trust_score
+ # The method used for tokenizing a card.
+ attr_reader :card_number_source
+ # Attribute for field cardholder_address
+ attr_reader :cardholder_address
+ # The name of the cardholder tokenizing the card.
+ attr_reader :cardholder_name
+ # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy.
+ attr_reader :device_trust_score
+ # The hashed email address of the cardholder's account with the wallet provider.
+ attr_reader :hashed_account_email_address
+ # The reasons for suggested tokenization given by the card network.
+ attr_reader :reason_codes
+ # The recommendation on responding to the tokenization request.
+ attr_reader :suggested_decision
+ # The version of the standard for mapping reason codes followed by the wallet provider.
+ attr_reader :suggested_decision_version
+ end
+ # Attribute for field device
+ attr_reader :device
+ # Attribute for field mastercard
+ attr_reader :mastercard
+ # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network.
+ attr_reader :type
+ # Attribute for field visa
+ attr_reader :visa
+ # Attribute for field wallet_provider
+ attr_reader :wallet_provider
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # The Issuing card identifier to list tokens for.
+ attr_accessor :card
+ # Only return Issuing tokens that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Select Issuing tokens with the given status.
+ attr_accessor :status
+
+ def initialize(
+ card: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @card = card
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Specifies which status the token should be updated to.
+ attr_accessor :status
+
+ def initialize(expand: nil, status: nil)
+ @expand = expand
+ @status = status
+ end
+ end
+ # Card associated with this token.
+ attr_reader :card
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The hashed ID derived from the device ID from the card network associated with the token.
+ attr_reader :device_fingerprint
+ # Unique identifier for the object.
+ attr_reader :id
+ # The last four digits of the token.
+ attr_reader :last4
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The token service provider / card network associated with the token.
+ attr_reader :network
+ # Attribute for field network_data
+ attr_reader :network_data
+ # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
+ attr_reader :network_updated_at
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The usage state of the token.
+ attr_reader :status
+ # The digital wallet for this token, if one was used.
+ attr_reader :wallet_provider
+
# Lists all Issuing Token objects for a given card.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: params, opts: opts)
diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb
index 781457c8..1a607294 100644
--- a/lib/stripe/resources/issuing/transaction.rb
+++ b/lib/stripe/resources/issuing/transaction.rb
@@ -17,6 +17,918 @@ module Stripe
"issuing.transaction"
end
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ attr_reader :cashback_amount
+ end
+
+ class MerchantData < Stripe::StripeObject
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_reader :category
+ # The merchant category code for the seller’s business
+ attr_reader :category_code
+ # City where the seller is located
+ attr_reader :city
+ # Country where the seller is located
+ attr_reader :country
+ # Name of the seller
+ attr_reader :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_reader :network_id
+ # Postal code where the seller is located
+ attr_reader :postal_code
+ # State where the seller is located
+ attr_reader :state
+ # The seller's tax identification number. Currently populated for French merchants only.
+ attr_reader :tax_id
+ # An ID assigned by the seller to the location of the sale.
+ attr_reader :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_reader :url
+ end
+
+ class NetworkData < Stripe::StripeObject
+ # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
+ attr_reader :authorization_code
+ # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.
+ attr_reader :processing_date
+ # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
+ attr_reader :transaction_id
+ end
+
+ class PurchaseDetails < Stripe::StripeObject
+ class Fleet < Stripe::StripeObject
+ class CardholderPromptData < Stripe::StripeObject
+ # Driver ID.
+ attr_reader :driver_id
+ # Odometer reading.
+ attr_reader :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_reader :unspecified_id
+ # User ID.
+ attr_reader :user_id
+ # Vehicle number.
+ attr_reader :vehicle_number
+ end
+
+ class ReportedBreakdown < Stripe::StripeObject
+ class Fuel < Stripe::StripeObject
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_reader :gross_amount_decimal
+ end
+
+ class NonFuel < Stripe::StripeObject
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_reader :gross_amount_decimal
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_reader :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_reader :national_amount_decimal
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_reader :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_reader :non_fuel
+ # Information about tax included in this transaction.
+ attr_reader :tax
+ end
+ # Answers to prompts presented to cardholder at point of sale.
+ attr_reader :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_reader :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_reader :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_reader :service_type
+ end
+
+ class Flight < Stripe::StripeObject
+ class Segment < Stripe::StripeObject
+ # The three-letter IATA airport code of the flight's destination.
+ attr_reader :arrival_airport_code
+ # The airline carrier code.
+ attr_reader :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_reader :departure_airport_code
+ # The flight number.
+ attr_reader :flight_number
+ # The flight's service class.
+ attr_reader :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_reader :stopover_allowed
+ end
+ # The time that the flight departed.
+ attr_reader :departure_at
+ # The name of the passenger.
+ attr_reader :passenger_name
+ # Whether the ticket is refundable.
+ attr_reader :refundable
+ # The legs of the trip.
+ attr_reader :segments
+ # The travel agency that issued the ticket.
+ attr_reader :travel_agency
+ end
+
+ class Fuel < Stripe::StripeObject
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_reader :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_reader :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_reader :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_reader :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_reader :unit_cost_decimal
+ end
+
+ class Lodging < Stripe::StripeObject
+ # The time of checking into the lodging.
+ attr_reader :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_reader :nights
+ end
+
+ class Receipt < Stripe::StripeObject
+ # The description of the item. The maximum length of this field is 26 characters.
+ attr_reader :description
+ # The quantity of the item.
+ attr_reader :quantity
+ # The total for this line item in cents.
+ attr_reader :total
+ # The unit cost of the item in cents.
+ attr_reader :unit_cost
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_reader :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_reader :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_reader :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_reader :lodging
+ # The line items in the purchase.
+ attr_reader :receipt
+ # A merchant-specific order number.
+ attr_reader :reference
+ end
+
+ class Treasury < Stripe::StripeObject
+ # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund
+ attr_reader :received_credit
+ # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture
+ attr_reader :received_debit
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return transactions that belong to the given card.
+ attr_accessor :card
+ # Only return transactions that belong to the given cardholder.
+ attr_accessor :cardholder
+ # Only return transactions that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return transactions that have the given type. One of `capture` or `refund`.
+ attr_accessor :type
+
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @card = card
+ @cardholder = cardholder
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class RefundParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :refund_amount
+
+ def initialize(expand: nil, refund_amount: nil)
+ @expand = expand
+ @refund_amount = refund_amount
+ end
+ end
+
+ class CreateForceCaptureParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_accessor :category
+ # City where the seller is located
+ attr_accessor :city
+ # Country where the seller is located
+ attr_accessor :country
+ # Name of the seller
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ attr_accessor :postal_code
+ # State where the seller is located
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_accessor :url
+
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ )
+ @category = category
+ @city = city
+ @country = country
+ @name = name
+ @network_id = network_id
+ @postal_code = postal_code
+ @state = state
+ @terminal_id = terminal_id
+ @url = url
+ end
+ end
+
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_accessor :departure_airport_code
+ # The flight number.
+ attr_accessor :flight_number
+ # The flight's service class.
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_accessor :stopover_allowed
+
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ )
+ @arrival_airport_code = arrival_airport_code
+ @carrier = carrier
+ @departure_airport_code = departure_airport_code
+ @flight_number = flight_number
+ @service_class = service_class
+ @stopover_allowed = stopover_allowed
+ end
+ end
+ # The time that the flight departed.
+ attr_accessor :departure_at
+ # The name of the passenger.
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ attr_accessor :refundable
+ # The legs of the trip.
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ attr_accessor :travel_agency
+
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ )
+ @departure_at = departure_at
+ @passenger_name = passenger_name
+ @refundable = refundable
+ @segments = segments
+ @travel_agency = travel_agency
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_accessor :nights
+
+ def initialize(check_in_at: nil, nights: nil)
+ @check_in_at = check_in_at
+ @nights = nights
+ end
+ end
+
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ attr_accessor :description
+ # Attribute for param field quantity
+ attr_accessor :quantity
+ # Attribute for param field total
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ attr_accessor :unit_cost
+
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
+ @description = description
+ @quantity = quantity
+ @total = total
+ @unit_cost = unit_cost
+ end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_accessor :lodging
+ # The line items in the purchase.
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ attr_accessor :reference
+
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ )
+ @fleet = fleet
+ @flight = flight
+ @fuel = fuel
+ @lodging = lodging
+ @receipt = receipt
+ @reference = reference
+ end
+ end
+ # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Card associated with this transaction.
+ attr_accessor :card
+ # The currency of the capture. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_accessor :purchase_details
+
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ )
+ @amount = amount
+ @card = card
+ @currency = currency
+ @expand = expand
+ @merchant_data = merchant_data
+ @purchase_details = purchase_details
+ end
+ end
+
+ class CreateUnlinkedRefundParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_accessor :category
+ # City where the seller is located
+ attr_accessor :city
+ # Country where the seller is located
+ attr_accessor :country
+ # Name of the seller
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ attr_accessor :postal_code
+ # State where the seller is located
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_accessor :url
+
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ )
+ @category = category
+ @city = city
+ @country = country
+ @name = name
+ @network_id = network_id
+ @postal_code = postal_code
+ @state = state
+ @terminal_id = terminal_id
+ @url = url
+ end
+ end
+
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_accessor :departure_airport_code
+ # The flight number.
+ attr_accessor :flight_number
+ # The flight's service class.
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_accessor :stopover_allowed
+
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ )
+ @arrival_airport_code = arrival_airport_code
+ @carrier = carrier
+ @departure_airport_code = departure_airport_code
+ @flight_number = flight_number
+ @service_class = service_class
+ @stopover_allowed = stopover_allowed
+ end
+ end
+ # The time that the flight departed.
+ attr_accessor :departure_at
+ # The name of the passenger.
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ attr_accessor :refundable
+ # The legs of the trip.
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ attr_accessor :travel_agency
+
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ )
+ @departure_at = departure_at
+ @passenger_name = passenger_name
+ @refundable = refundable
+ @segments = segments
+ @travel_agency = travel_agency
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_accessor :nights
+
+ def initialize(check_in_at: nil, nights: nil)
+ @check_in_at = check_in_at
+ @nights = nights
+ end
+ end
+
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ attr_accessor :description
+ # Attribute for param field quantity
+ attr_accessor :quantity
+ # Attribute for param field total
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ attr_accessor :unit_cost
+
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
+ @description = description
+ @quantity = quantity
+ @total = total
+ @unit_cost = unit_cost
+ end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_accessor :lodging
+ # The line items in the purchase.
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ attr_accessor :reference
+
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ )
+ @fleet = fleet
+ @flight = flight
+ @fuel = fuel
+ @lodging = lodging
+ @receipt = receipt
+ @reference = reference
+ end
+ end
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Card associated with this unlinked refund transaction.
+ attr_accessor :card
+ # The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_accessor :purchase_details
+
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ )
+ @amount = amount
+ @card = card
+ @currency = currency
+ @expand = expand
+ @merchant_data = merchant_data
+ @purchase_details = purchase_details
+ end
+ end
+ # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_details
+ # The `Authorization` object that led to this transaction.
+ attr_reader :authorization
+ # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.
+ attr_reader :balance_transaction
+ # The card used to make this transaction.
+ attr_reader :card
+ # The cardholder to whom this transaction belongs.
+ attr_reader :cardholder
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # If you've disputed the transaction, the ID of the dispute.
+ attr_reader :dispute
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
+ attr_reader :merchant_amount
+ # The currency with which the merchant is taking payment.
+ attr_reader :merchant_currency
+ # Attribute for field merchant_data
+ attr_reader :merchant_data
+ # 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.
+ attr_reader :metadata
+ # Details about the transaction, such as processing dates, set by the card network.
+ attr_reader :network_data
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_reader :purchase_details
+ # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
+ attr_reader :token
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
+ attr_reader :treasury
+ # The nature of the transaction.
+ attr_reader :type
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
+ attr_reader :wallet
+
# Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/line_item.rb b/lib/stripe/resources/line_item.rb
index 80d71f2a..23a84dc7 100644
--- a/lib/stripe/resources/line_item.rb
+++ b/lib/stripe/resources/line_item.rb
@@ -8,5 +8,52 @@ module Stripe
def self.object_name
"item"
end
+
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ attr_reader :discount
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # Total discount amount applied. If no discounts were applied, defaults to 0.
+ attr_reader :amount_discount
+ # Total before any discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total tax amount applied. If no tax was applied, defaults to 0.
+ attr_reader :amount_tax
+ # Total after discounts and taxes.
+ attr_reader :amount_total
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
+ attr_reader :description
+ # The discounts applied to the line item.
+ attr_reader :discounts
+ # Unique identifier for the object.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The price used to generate the line item.
+ attr_reader :price
+ # The quantity of products being purchased.
+ attr_reader :quantity
+ # The taxes applied to the line item.
+ attr_reader :taxes
end
end
diff --git a/lib/stripe/resources/login_link.rb b/lib/stripe/resources/login_link.rb
index 81322512..ec3d624e 100644
--- a/lib/stripe/resources/login_link.rb
+++ b/lib/stripe/resources/login_link.rb
@@ -9,6 +9,13 @@ module Stripe
"login_link"
end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The URL for the login link.
+ attr_reader :url
+
def self.retrieve(_id, _opts = nil)
raise NotImplementedError,
"Login links do not have IDs and cannot be retrieved. They can " \
diff --git a/lib/stripe/resources/mandate.rb b/lib/stripe/resources/mandate.rb
index 5a3df47f..880e4401 100644
--- a/lib/stripe/resources/mandate.rb
+++ b/lib/stripe/resources/mandate.rb
@@ -8,5 +8,147 @@ module Stripe
def self.object_name
"mandate"
end
+
+ class CustomerAcceptance < Stripe::StripeObject
+ class Offline < Stripe::StripeObject; end
+
+ class Online < Stripe::StripeObject
+ # The customer accepts the mandate from this IP address.
+ attr_reader :ip_address
+ # The customer accepts the mandate using the user agent of the browser.
+ attr_reader :user_agent
+ end
+ # The time that the customer accepts the mandate.
+ attr_reader :accepted_at
+ # Attribute for field offline
+ attr_reader :offline
+ # Attribute for field online
+ attr_reader :online
+ # The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
+ attr_reader :type
+ end
+
+ class MultiUse < Stripe::StripeObject; end
+
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_reader :default_for
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ attr_reader :transaction_type
+ end
+
+ class AmazonPay < Stripe::StripeObject; end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
+ attr_reader :url
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.
+ attr_reader :network_status
+ # The unique reference identifying the mandate on the Bacs network.
+ attr_reader :reference
+ # When the mandate is revoked on the Bacs network this field displays the reason for the revocation.
+ attr_reader :revocation_reason
+ # The URL that will contain the mandate that the customer has signed.
+ attr_reader :url
+ end
+
+ class Card < Stripe::StripeObject; end
+ class Cashapp < Stripe::StripeObject; end
+ class KakaoPay < Stripe::StripeObject; end
+ class KrCard < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+ class NaverPay < Stripe::StripeObject; end
+ class NzBankAccount < Stripe::StripeObject; end
+
+ class Paypal < Stripe::StripeObject
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_reader :billing_agreement_id
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ attr_reader :payer_id
+ end
+
+ class RevolutPay < Stripe::StripeObject; end
+
+ class SepaDebit < Stripe::StripeObject
+ # The unique reference of the mandate.
+ attr_reader :reference
+ # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
+ attr_reader :url
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Mandate collection method
+ attr_reader :collection_method
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class SingleUse < Stripe::StripeObject
+ # The amount of the payment on a single use mandate.
+ attr_reader :amount
+ # The currency of the payment on a single use mandate.
+ attr_reader :currency
+ end
+ # Attribute for field customer_acceptance
+ attr_reader :customer_acceptance
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Attribute for field multi_use
+ attr_reader :multi_use
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account (if any) that the mandate is intended for.
+ attr_reader :on_behalf_of
+ # ID of the payment method associated with this mandate.
+ attr_reader :payment_method
+ # Attribute for field payment_method_details
+ attr_reader :payment_method_details
+ # Attribute for field single_use
+ attr_reader :single_use
+ # The mandate status indicates whether or not you can use it to initiate a payment.
+ attr_reader :status
+ # The type of the mandate.
+ attr_reader :type
end
end
diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb
index 1d991549..1b6ca274 100644
--- a/lib/stripe/resources/payment_intent.rb
+++ b/lib/stripe/resources/payment_intent.rb
@@ -24,6 +24,8656 @@ module Stripe
"payment_intent"
end
+ class AmountDetails < Stripe::StripeObject
+ class Tip < Stripe::StripeObject
+ # Portion of the amount that corresponds to a tip.
+ attr_reader :amount
+ end
+ # Attribute for field tip
+ attr_reader :tip
+ end
+
+ class AutomaticPaymentMethods < Stripe::StripeObject
+ # Controls whether this PaymentIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ attr_reader :allow_redirects
+ # Automatically calculates compatible payment methods
+ attr_reader :enabled
+ end
+
+ class LastPaymentError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ attr_reader :setup_intent
+ # Attribute for field source
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ attr_reader :type
+ end
+
+ class NextAction < Stripe::StripeObject
+ class AlipayHandleRedirect < Stripe::StripeObject
+ # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App.
+ attr_reader :native_data
+ # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.
+ attr_reader :native_url
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
+ attr_reader :return_url
+ # The URL you must redirect your customer to in order to authenticate the payment.
+ attr_reader :url
+ end
+
+ class BoletoDisplayDetails < Stripe::StripeObject
+ # The timestamp after which the boleto expires.
+ attr_reader :expires_at
+ # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.
+ attr_reader :hosted_voucher_url
+ # The boleto number.
+ attr_reader :number
+ # The URL to the downloadable boleto voucher PDF.
+ attr_reader :pdf
+ end
+
+ class CardAwaitNotification < Stripe::StripeObject
+ # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.
+ attr_reader :charge_attempt_at
+ # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required.
+ attr_reader :customer_approval_required
+ end
+
+ class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject
+ class QrCode < Stripe::StripeObject
+ # The date (unix timestamp) when the QR code expires.
+ attr_reader :expires_at
+ # The image_url_png string used to render QR code
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ attr_reader :image_url_svg
+ end
+ # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration.
+ attr_reader :hosted_instructions_url
+ # The url for mobile redirect based auth
+ attr_reader :mobile_auth_url
+ # Attribute for field qr_code
+ attr_reader :qr_code
+ end
+
+ class DisplayBankTransferInstructions < Stripe::StripeObject
+ class FinancialAddress < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # The ABA account number
+ attr_reader :account_number
+ # The account type
+ attr_reader :account_type
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The bank name
+ attr_reader :bank_name
+ # The ABA routing number
+ attr_reader :routing_number
+ end
+
+ class Iban < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The BIC/SWIFT code of the account.
+ attr_reader :bic
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # The IBAN of the account.
+ attr_reader :iban
+ end
+
+ class SortCode < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ attr_reader :account_holder_name
+ # The account number
+ attr_reader :account_number
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The six-digit sort code
+ attr_reader :sort_code
+ end
+
+ class Spei < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The three-digit bank code
+ attr_reader :bank_code
+ # The short banking institution name
+ attr_reader :bank_name
+ # The CLABE number
+ attr_reader :clabe
+ end
+
+ class Swift < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # The account number
+ attr_reader :account_number
+ # The account type
+ attr_reader :account_type
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The bank name
+ attr_reader :bank_name
+ # The SWIFT code
+ attr_reader :swift_code
+ end
+
+ class Zengin < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ attr_reader :account_holder_address
+ # The account holder name
+ attr_reader :account_holder_name
+ # The account number
+ attr_reader :account_number
+ # The bank account type. In Japan, this can only be `futsu` or `toza`.
+ attr_reader :account_type
+ # Attribute for field bank_address
+ attr_reader :bank_address
+ # The bank code of the account
+ attr_reader :bank_code
+ # The bank name of the account
+ attr_reader :bank_name
+ # The branch code of the account
+ attr_reader :branch_code
+ # The branch name of the account
+ attr_reader :branch_name
+ end
+ # ABA Records contain U.S. bank account details per the ABA format.
+ attr_reader :aba
+ # Iban Records contain E.U. bank account details per the SEPA format.
+ attr_reader :iban
+ # Sort Code Records contain U.K. bank account details per the sort code format.
+ attr_reader :sort_code
+ # SPEI Records contain Mexico bank account details per the SPEI format.
+ attr_reader :spei
+ # The payment networks supported by this FinancialAddress
+ attr_reader :supported_networks
+ # SWIFT Records contain U.S. bank account details per the SWIFT format.
+ attr_reader :swift
+ # The type of financial address
+ attr_reader :type
+ # Zengin Records contain Japan bank account details per the Zengin format.
+ attr_reader :zengin
+ end
+ # The remaining amount that needs to be transferred to complete the payment.
+ attr_reader :amount_remaining
+ # 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).
+ attr_reader :currency
+ # A list of financial addresses that can be used to fund the customer balance
+ attr_reader :financial_addresses
+ # A link to a hosted page that guides your customer through completing the transfer.
+ attr_reader :hosted_instructions_url
+ # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer.
+ attr_reader :reference
+ # Type of bank transfer
+ attr_reader :type
+ end
+
+ class KonbiniDisplayDetails < Stripe::StripeObject
+ class Stores < Stripe::StripeObject
+ class Familymart < Stripe::StripeObject
+ # The confirmation number.
+ attr_reader :confirmation_number
+ # The payment code.
+ attr_reader :payment_code
+ end
+
+ class Lawson < Stripe::StripeObject
+ # The confirmation number.
+ attr_reader :confirmation_number
+ # The payment code.
+ attr_reader :payment_code
+ end
+
+ class Ministop < Stripe::StripeObject
+ # The confirmation number.
+ attr_reader :confirmation_number
+ # The payment code.
+ attr_reader :payment_code
+ end
+
+ class Seicomart < Stripe::StripeObject
+ # The confirmation number.
+ attr_reader :confirmation_number
+ # The payment code.
+ attr_reader :payment_code
+ end
+ # FamilyMart instruction details.
+ attr_reader :familymart
+ # Lawson instruction details.
+ attr_reader :lawson
+ # Ministop instruction details.
+ attr_reader :ministop
+ # Seicomart instruction details.
+ attr_reader :seicomart
+ end
+ # The timestamp at which the pending Konbini payment expires.
+ attr_reader :expires_at
+ # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.
+ attr_reader :hosted_voucher_url
+ # Attribute for field stores
+ attr_reader :stores
+ end
+
+ class MultibancoDisplayDetails < Stripe::StripeObject
+ # Entity number associated with this Multibanco payment.
+ attr_reader :entity
+ # The timestamp at which the Multibanco voucher expires.
+ attr_reader :expires_at
+ # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher.
+ attr_reader :hosted_voucher_url
+ # Reference number associated with this Multibanco payment.
+ attr_reader :reference
+ end
+
+ class OxxoDisplayDetails < Stripe::StripeObject
+ # The timestamp after which the OXXO voucher expires.
+ attr_reader :expires_after
+ # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.
+ attr_reader :hosted_voucher_url
+ # OXXO reference number.
+ attr_reader :number
+ end
+
+ class PaynowDisplayQrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ attr_reader :data
+ # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.
+ attr_reader :hosted_instructions_url
+ # The image_url_png string used to render QR code
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ attr_reader :image_url_svg
+ end
+
+ class PixDisplayQrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ attr_reader :data
+ # The date (unix timestamp) when the PIX expires.
+ attr_reader :expires_at
+ # The URL to the hosted pix instructions page, which allows customers to view the pix QR code.
+ attr_reader :hosted_instructions_url
+ # The image_url_png string used to render png QR code
+ attr_reader :image_url_png
+ # The image_url_svg string used to render svg QR code
+ attr_reader :image_url_svg
+ end
+
+ class PromptpayDisplayQrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ attr_reader :data
+ # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.
+ attr_reader :hosted_instructions_url
+ # The PNG path used to render the QR code, can be used as the source in an HTML img tag
+ attr_reader :image_url_png
+ # The SVG path used to render the QR code, can be used as the source in an HTML img tag
+ attr_reader :image_url_svg
+ end
+
+ class RedirectToUrl < Stripe::StripeObject
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
+ attr_reader :return_url
+ # The URL you must redirect your customer to in order to authenticate the payment.
+ attr_reader :url
+ end
+
+ class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject
+ class QrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ attr_reader :data
+ # The image_url_png string used to render QR code
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ attr_reader :image_url_svg
+ end
+ # The URL to the hosted Swish instructions page, which allows customers to view the QR code.
+ attr_reader :hosted_instructions_url
+ # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests).
+ attr_reader :mobile_auth_url
+ # Attribute for field qr_code
+ attr_reader :qr_code
+ end
+
+ class VerifyWithMicrodeposits < Stripe::StripeObject
+ # The timestamp when the microdeposits are expected to land.
+ attr_reader :arrival_date
+ # The URL for the hosted verification page, which allows customers to verify their bank account.
+ attr_reader :hosted_verification_url
+ # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
+ attr_reader :microdeposit_type
+ end
+
+ class WechatPayDisplayQrCode < Stripe::StripeObject
+ # The data being used to generate QR code
+ attr_reader :data
+ # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.
+ attr_reader :hosted_instructions_url
+ # The base64 image data for a pre-generated QR code
+ attr_reader :image_data_url
+ # The image_url_png string used to render QR code
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ attr_reader :image_url_svg
+ end
+
+ class WechatPayRedirectToAndroidApp < Stripe::StripeObject
+ # app_id is the APP ID registered on WeChat open platform
+ attr_reader :app_id
+ # nonce_str is a random string
+ attr_reader :nonce_str
+ # package is static value
+ attr_reader :package
+ # an unique merchant ID assigned by WeChat Pay
+ attr_reader :partner_id
+ # an unique trading ID assigned by WeChat Pay
+ attr_reader :prepay_id
+ # A signature
+ attr_reader :sign
+ # Specifies the current time in epoch format
+ attr_reader :timestamp
+ end
+
+ class WechatPayRedirectToIosApp < Stripe::StripeObject
+ # An universal link that redirect to WeChat Pay app
+ attr_reader :native_url
+ end
+ # Attribute for field alipay_handle_redirect
+ attr_reader :alipay_handle_redirect
+ # Attribute for field boleto_display_details
+ attr_reader :boleto_display_details
+ # Attribute for field card_await_notification
+ attr_reader :card_await_notification
+ # Attribute for field cashapp_handle_redirect_or_display_qr_code
+ attr_reader :cashapp_handle_redirect_or_display_qr_code
+ # Attribute for field display_bank_transfer_instructions
+ attr_reader :display_bank_transfer_instructions
+ # Attribute for field konbini_display_details
+ attr_reader :konbini_display_details
+ # Attribute for field multibanco_display_details
+ attr_reader :multibanco_display_details
+ # Attribute for field oxxo_display_details
+ attr_reader :oxxo_display_details
+ # Attribute for field paynow_display_qr_code
+ attr_reader :paynow_display_qr_code
+ # Attribute for field pix_display_qr_code
+ attr_reader :pix_display_qr_code
+ # Attribute for field promptpay_display_qr_code
+ attr_reader :promptpay_display_qr_code
+ # Attribute for field redirect_to_url
+ attr_reader :redirect_to_url
+ # Attribute for field swish_handle_redirect_or_display_qr_code
+ attr_reader :swish_handle_redirect_or_display_qr_code
+ # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
+ attr_reader :type
+ # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
+ attr_reader :use_stripe_sdk
+ # Attribute for field verify_with_microdeposits
+ attr_reader :verify_with_microdeposits
+ # Attribute for field wechat_pay_display_qr_code
+ attr_reader :wechat_pay_display_qr_code
+ # Attribute for field wechat_pay_redirect_to_android_app
+ attr_reader :wechat_pay_redirect_to_android_app
+ # Attribute for field wechat_pay_redirect_to_ios_app
+ attr_reader :wechat_pay_redirect_to_ios_app
+ end
+
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
+ # ID of the payment method configuration used.
+ attr_reader :id
+ # ID of the parent payment method configuration used.
+ attr_reader :parent
+ end
+
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # A URL for custom mandate text
+ attr_reader :custom_mandate_url
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ attr_reader :transaction_type
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+
+ class Affirm < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_reader :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class AfterpayClearpay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Alipay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Alma < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ end
+
+ class AmazonPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class Bancontact < Stripe::StripeObject
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_reader :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Blik < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Boleto < Stripe::StripeObject
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Card < Stripe::StripeObject
+ class Installments < Stripe::StripeObject
+ class AvailablePlan < Stripe::StripeObject
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
+ attr_reader :count
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_reader :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_reader :type
+ end
+
+ class Plan < Stripe::StripeObject
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
+ attr_reader :count
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_reader :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_reader :type
+ end
+ # Installment plans that may be selected for this PaymentIntent.
+ attr_reader :available_plans
+ # Whether Installments are enabled for this PaymentIntent.
+ attr_reader :enabled
+ # Installment plan selected for this PaymentIntent.
+ attr_reader :plan
+ end
+
+ class MandateOptions < Stripe::StripeObject
+ # Amount to be charged for future payments.
+ attr_reader :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_reader :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_reader :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_reader :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_reader :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_reader :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_reader :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_reader :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_reader :supported_types
+ end
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Installment details for this payment (Mexico only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_reader :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_reader :mandate_options
+ # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.
+ attr_reader :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_reader :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_reader :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_reader :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_reader :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_reader :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_reader :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_reader :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_reader :statement_descriptor_suffix_kanji
+ end
+
+ class CardPresent < Stripe::StripeObject
+ class Routing < Stripe::StripeObject
+ # Requested routing priority
+ attr_reader :requested_priority
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_reader :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_reader :request_incremental_authorization_support
+ # Attribute for field routing
+ attr_reader :routing
+ end
+
+ class Cashapp < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ attr_reader :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_reader :requested_address_types
+ # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_reader :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Eps < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Fpx < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Giropay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Grabpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Ideal < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class InteracPresent < Stripe::StripeObject; end
+
+ class KakaoPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Klarna < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Preferred locale of the Klarna checkout page that the customer is redirected to.
+ attr_reader :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Konbini < Stripe::StripeObject
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.
+ attr_reader :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
+ attr_reader :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_reader :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_reader :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class KrCard < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Link < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_reader :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Mobilepay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Multibanco < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class NaverPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class NzBankAccount < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class Oxxo < Stripe::StripeObject
+ # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class P24 < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class PayByBank < Stripe::StripeObject; end
+
+ class Payco < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ end
+
+ class Paynow < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Paypal < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Preferred locale of the PayPal checkout page that the customer is redirected to.
+ attr_reader :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Pix < Stripe::StripeObject
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ attr_reader :expires_after_seconds
+ # The timestamp at which the Pix expires.
+ attr_reader :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Promptpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class RevolutPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class SamsungPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ end
+
+ class Sofort < Stripe::StripeObject
+ # Preferred language of the SOFORT authorization page that the customer is redirected to.
+ attr_reader :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Swish < Stripe::StripeObject
+ # A reference for this payment to be displayed in the Swish app.
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Twint < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_reader :return_url
+ end
+
+ class MandateOptions < Stripe::StripeObject
+ # Mandate collection method
+ attr_reader :collection_method
+ end
+ # Attribute for field financial_connections
+ attr_reader :financial_connections
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Preferred transaction settlement speed
+ attr_reader :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_reader :target_date
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+
+ class WechatPay < Stripe::StripeObject
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_reader :app_id
+ # The client type that the end customer will pay from
+ attr_reader :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+
+ class Zip < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # Attribute for field alma
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field blik
+ attr_reader :blik
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ attr_reader :customer_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field fpx
+ attr_reader :fpx
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field interac_present
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field konbini
+ attr_reader :konbini
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field mobilepay
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # Attribute for field oxxo
+ attr_reader :oxxo
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ attr_reader :payco
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field pix
+ attr_reader :pix
+ # Attribute for field promptpay
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field twint
+ attr_reader :twint
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ attr_reader :zip
+ end
+
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ attr_reader :presentment_currency
+ end
+
+ class Processing < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ class CustomerNotification < Stripe::StripeObject
+ # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.
+ attr_reader :approval_requested
+ # If customer approval is required, they need to provide approval before this time.
+ attr_reader :completes_at
+ end
+ # Attribute for field customer_notification
+ attr_reader :customer_notification
+ end
+ # Attribute for field card
+ attr_reader :card
+ # Type of the payment method for which payment is in `processing` state, one of `card`.
+ attr_reader :type
+ end
+
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_reader :carrier
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :tracking_number
+ end
+
+ class TransferData < Stripe::StripeObject
+ # The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account.
+ # The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer
+ # representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00).
+ attr_reader :amount
+ # The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success.
+ attr_reader :destination
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return PaymentIntents for the customer that this customer ID specifies.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this PaymentIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allow_redirects: nil, enabled: nil)
+ @allow_redirects = allow_redirects
+ @enabled = enabled
+ end
+ end
+
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(code: nil, setup_future_usage: nil)
+ @code = code
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @exemption_indicator = exemption_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ )
+ @capture_method = capture_method
+ @cvc_token = cvc_token
+ @installments = installments
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @require_cvc_recollection = require_cvc_recollection
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ attr_accessor :requested_priority
+
+ def initialize(requested_priority: nil)
+ @requested_priority = requested_priority
+ end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ attr_accessor :routing
+
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ )
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization_support = request_incremental_authorization_support
+ @routing = routing
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ )
+ @confirmation_number = confirmation_number
+ @expires_after_days = expires_after_days
+ @expires_at = expires_at
+ @product_description = product_description
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @persistent_token = persistent_token
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
+ @expires_after_seconds = expires_after_seconds
+ @expires_at = expires_at
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(reference: nil, setup_future_usage: nil)
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @preferred_settlement_speed = preferred_settlement_speed
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @card_present = card_present
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ # The amount is capped at the total transaction amount and if no amount is set,
+ # the full amount is transferred.
+ #
+ # If you intend to collect a fee and you need a more robust reporting experience, using
+ # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount)
+ # might be a better fit for your integration.
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
+ attr_accessor :automatic_payment_methods
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
+ attr_accessor :confirm
+ # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ attr_accessor :confirmation_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # 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).
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :mandate
+ # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :mandate_data
+ # 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`.
+ attr_accessor :metadata
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :off_session
+ # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent.
+ #
+ # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ attr_accessor :radar_options
+ # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # 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. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a Transfer.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ attr_accessor :transfer_group
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ automatic_payment_methods: nil,
+ capture_method: nil,
+ confirm: nil,
+ confirmation_method: nil,
+ confirmation_token: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil,
+ use_stripe_sdk: nil
+ )
+ @amount = amount
+ @application_fee_amount = application_fee_amount
+ @automatic_payment_methods = automatic_payment_methods
+ @capture_method = capture_method
+ @confirm = confirm
+ @confirmation_method = confirmation_method
+ @confirmation_token = confirmation_token
+ @currency = currency
+ @customer = customer
+ @description = description
+ @error_on_requires_action = error_on_requires_action
+ @expand = expand
+ @mandate = mandate
+ @mandate_data = mandate_data
+ @metadata = metadata
+ @off_session = off_session
+ @on_behalf_of = on_behalf_of
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @radar_options = radar_options
+ @receipt_email = receipt_email
+ @return_url = return_url
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(code: nil, setup_future_usage: nil)
+ @code = code
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @exemption_indicator = exemption_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ )
+ @capture_method = capture_method
+ @cvc_token = cvc_token
+ @installments = installments
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @require_cvc_recollection = require_cvc_recollection
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ attr_accessor :requested_priority
+
+ def initialize(requested_priority: nil)
+ @requested_priority = requested_priority
+ end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ attr_accessor :routing
+
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ )
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization_support = request_incremental_authorization_support
+ @routing = routing
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ )
+ @confirmation_number = confirmation_number
+ @expires_after_days = expires_after_days
+ @expires_at = expires_at
+ @product_description = product_description
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @persistent_token = persistent_token
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
+ @expires_after_seconds = expires_after_seconds
+ @expires_at = expires_at
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(reference: nil, setup_future_usage: nil)
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @preferred_settlement_speed = preferred_settlement_speed
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @card_present = card_present
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # 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).
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration for this PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ capture_method: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @application_fee_amount = application_fee_amount
+ @capture_method = capture_method
+ @currency = currency
+ @customer = customer
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @receipt_email = receipt_email
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class ApplyCustomerBalanceParams < Stripe::RequestParams
+ # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter.
+ #
+ # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent.
+ #
+ # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amount: nil, currency: nil, expand: nil)
+ @amount = amount
+ @currency = currency
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(cancellation_reason: nil, expand: nil)
+ @cancellation_reason = cancellation_reason
+ @expand = expand
+ end
+ end
+
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided.
+ attr_accessor :amount_to_capture
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents.
+ attr_accessor :final_capture
+ # 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`.
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a transfer after the payment
+ # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+
+ def initialize(
+ amount_to_capture: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ final_capture: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil
+ )
+ @amount_to_capture = amount_to_capture
+ @application_fee_amount = application_fee_amount
+ @expand = expand
+ @final_capture = final_capture
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ end
+ end
+
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(code: nil, setup_future_usage: nil)
+ @code = code
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @exemption_indicator = exemption_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ )
+ @capture_method = capture_method
+ @cvc_token = cvc_token
+ @installments = installments
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @require_cvc_recollection = require_cvc_recollection
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ attr_accessor :requested_priority
+
+ def initialize(requested_priority: nil)
+ @requested_priority = requested_priority
+ end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ attr_accessor :routing
+
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ )
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization_support = request_incremental_authorization_support
+ @routing = routing
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ )
+ @confirmation_number = confirmation_number
+ @expires_after_days = expires_after_days
+ @expires_at = expires_at
+ @product_description = product_description
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @persistent_token = persistent_token
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
+ @expires_after_seconds = expires_after_seconds
+ @expires_at = expires_at
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(reference: nil, setup_future_usage: nil)
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @preferred_settlement_speed = preferred_settlement_speed
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @card_present = card_present
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment.
+ attr_accessor :mandate
+ # Attribute for param field mandate_data
+ attr_accessor :mandate_data
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
+ attr_accessor :off_session
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ attr_accessor :radar_options
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_accessor :shipping
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ capture_method: nil,
+ confirmation_token: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ off_session: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ use_stripe_sdk: nil
+ )
+ @capture_method = capture_method
+ @confirmation_token = confirmation_token
+ @error_on_requires_action = error_on_requires_action
+ @expand = expand
+ @mandate = mandate
+ @mandate_data = mandate_data
+ @off_session = off_session
+ @payment_method = payment_method
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @radar_options = radar_options
+ @receipt_email = receipt_email
+ @return_url = return_url
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class IncrementAuthorizationParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Text that appears on the customer's statement as the statement descriptor for a non-card or 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).
+ attr_accessor :statement_descriptor
+ # The parameters used to automatically create a transfer after the payment is captured.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ )
+ @amount = amount
+ @application_fee_amount = application_fee_amount
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ @transfer_data = transfer_data
+ end
+ end
+
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil)
+ @amounts = amounts
+ @descriptor_code = descriptor_code
+ @expand = expand
+ end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_reader :amount
+ # Amount that can be captured from this PaymentIntent.
+ attr_reader :amount_capturable
+ # Attribute for field amount_details
+ attr_reader :amount_details
+ # Amount that this PaymentIntent collects.
+ attr_reader :amount_received
+ # ID of the Connect application that created the PaymentIntent.
+ attr_reader :application
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_reader :application_fee_amount
+ # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)
+ attr_reader :automatic_payment_methods
+ # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
+ attr_reader :canceled_at
+ # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`).
+ attr_reader :cancellation_reason
+ # Controls when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
+ #
+ # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ #
+ # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
+ attr_reader :client_secret
+ # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ attr_reader :confirmation_method
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Unique identifier for the object.
+ attr_reader :id
+ # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
+ attr_reader :last_payment_error
+ # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted.
+ attr_reader :latest_charge
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
+ attr_reader :metadata
+ # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
+ attr_reader :next_action
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
+ attr_reader :on_behalf_of
+ # ID of the payment method used in this PaymentIntent.
+ attr_reader :payment_method
+ # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent.
+ attr_reader :payment_method_configuration_details
+ # Payment-method-specific configuration for this PaymentIntent.
+ attr_reader :payment_method_options
+ # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
+ attr_reader :payment_method_types
+ # Attribute for field presentment_details
+ attr_reader :presentment_details
+ # If present, this property tells you about the processing state of the payment.
+ attr_reader :processing
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_reader :receipt_email
+ # ID of the review associated with this PaymentIntent, if any.
+ attr_reader :review
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_reader :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_reader :shipping
+ # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
+ attr_reader :source
+ # 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).
+ #
+ # 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.
+ attr_reader :statement_descriptor
+ # 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.
+ attr_reader :statement_descriptor_suffix
+ # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
+ attr_reader :status
+ # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_reader :transfer_data
+ # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ attr_reader :transfer_group
+
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
def apply_customer_balance(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/payment_link.rb b/lib/stripe/resources/payment_link.rb
index bf4c9fe1..050b257d 100644
--- a/lib/stripe/resources/payment_link.rb
+++ b/lib/stripe/resources/payment_link.rb
@@ -17,6 +17,1638 @@ module Stripe
"payment_link"
end
+ class AfterCompletion < Stripe::StripeObject
+ class HostedConfirmation < Stripe::StripeObject
+ # The custom message that is displayed to the customer after the purchase is complete.
+ attr_reader :custom_message
+ end
+
+ class Redirect < Stripe::StripeObject
+ # The URL the customer will be redirected to after the purchase is complete.
+ attr_reader :url
+ end
+ # Attribute for field hosted_confirmation
+ attr_reader :hosted_confirmation
+ # Attribute for field redirect
+ attr_reader :redirect
+ # The specified behavior after the purchase is complete.
+ attr_reader :type
+ end
+
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # If `true`, tax will be calculated automatically using the customer's location.
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ end
+
+ class ConsentCollection < Stripe::StripeObject
+ class PaymentMethodReuseAgreement < Stripe::StripeObject
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
+ #
+ # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ attr_reader :position
+ end
+ # Settings related to the payment method reuse text shown in the Checkout UI.
+ attr_reader :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications.
+ attr_reader :promotions
+ # 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.
+ attr_reader :terms_of_service
+ end
+
+ class CustomField < Stripe::StripeObject
+ class Dropdown < Stripe::StripeObject
+ class Option < Stripe::StripeObject
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_reader :label
+ # 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.
+ attr_reader :value
+ end
+ # The value that will pre-fill on the payment page.
+ attr_reader :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_reader :options
+ end
+
+ class Label < Stripe::StripeObject
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_reader :custom
+ # The type of the label.
+ attr_reader :type
+ end
+
+ class Numeric < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_reader :minimum_length
+ end
+
+ class Text < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_reader :minimum_length
+ end
+ # Attribute for field dropdown
+ attr_reader :dropdown
+ # 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.
+ attr_reader :key
+ # Attribute for field label
+ attr_reader :label
+ # Attribute for field numeric
+ attr_reader :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_reader :optional
+ # Attribute for field text
+ attr_reader :text
+ # The type of the field.
+ attr_reader :type
+ end
+
+ class CustomText < Stripe::StripeObject
+ class AfterSubmit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+
+ class Submit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+
+ class TermsOfServiceAcceptance < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ attr_reader :message
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_reader :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_reader :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_reader :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_reader :terms_of_service_acceptance
+ end
+
+ class InvoiceCreation < Stripe::StripeObject
+ class InvoiceData < Stripe::StripeObject
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ attr_reader :name
+ # The value of the custom field.
+ attr_reader :value
+ end
+
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+
+ class RenderingOptions < Stripe::StripeObject
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ attr_reader :amount_tax_display
+ end
+ # The account tax IDs associated with the invoice.
+ attr_reader :account_tax_ids
+ # A list of up to 4 custom fields to be displayed on the invoice.
+ attr_reader :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Footer to be displayed on the invoice.
+ attr_reader :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_reader :issuer
+ # 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.
+ attr_reader :metadata
+ # Options for invoice PDF rendering.
+ attr_reader :rendering_options
+ end
+ # Enable creating an invoice on successful payment.
+ attr_reader :enabled
+ # Configuration for the invoice. Default invoice values will be used if unspecified.
+ attr_reader :invoice_data
+ end
+
+ class OptionalItem < Stripe::StripeObject
+ class AdjustableQuantity < Stripe::StripeObject
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_reader :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
+ attr_reader :maximum
+ # 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.
+ attr_reader :minimum
+ end
+ # Attribute for field adjustable_quantity
+ attr_reader :adjustable_quantity
+ # Attribute for field price
+ attr_reader :price
+ # Attribute for field quantity
+ attr_reader :quantity
+ end
+
+ class PaymentIntentData < Stripe::StripeObject
+ # Indicates when the funds will be captured from the customer's account.
+ attr_reader :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # 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.
+ attr_reader :metadata
+ # Indicates that you intend to make future payments with the payment method collected during checkout.
+ attr_reader :setup_future_usage
+ # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge.
+ attr_reader :statement_descriptor
+ # 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.
+ attr_reader :statement_descriptor_suffix
+ # 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.
+ attr_reader :transfer_group
+ end
+
+ class PhoneNumberCollection < Stripe::StripeObject
+ # If `true`, a phone number will be collected during checkout.
+ attr_reader :enabled
+ end
+
+ class Restrictions < Stripe::StripeObject
+ class CompletedSessions < Stripe::StripeObject
+ # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met.
+ attr_reader :count
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ attr_reader :limit
+ end
+ # Attribute for field completed_sessions
+ attr_reader :completed_sessions
+ end
+
+ class ShippingAddressCollection < Stripe::StripeObject
+ # 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`.
+ attr_reader :allowed_countries
+ end
+
+ class ShippingOption < Stripe::StripeObject
+ # A non-negative integer in cents representing how much to charge.
+ attr_reader :shipping_amount
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_reader :shipping_rate
+ end
+
+ class SubscriptionData < Stripe::StripeObject
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # Attribute for field issuer
+ attr_reader :issuer
+ end
+
+ class TrialSettings < Stripe::StripeObject
+ class EndBehavior < Stripe::StripeObject
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_reader :missing_payment_method
+ end
+ # Defines how a subscription behaves when a free trial ends.
+ attr_reader :end_behavior
+ end
+ # 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.
+ attr_reader :description
+ # Attribute for field invoice_settings
+ attr_reader :invoice_settings
+ # 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.
+ attr_reader :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ attr_reader :trial_period_days
+ # Settings related to subscription trials.
+ attr_reader :trial_settings
+ end
+
+ class TaxIdCollection < Stripe::StripeObject
+ # Indicates whether tax ID collection is enabled for the session.
+ attr_reader :enabled
+ # Attribute for field required
+ attr_reader :required
+ end
+
+ class TransferData < Stripe::StripeObject
+ # 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.
+ attr_reader :amount
+ # The connected account receiving the transfer.
+ attr_reader :destination
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
+ attr_accessor :active
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(active: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @active = active
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ attr_accessor :custom_message
+
+ def initialize(custom_message: nil)
+ @custom_message = custom_message
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # 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.
+ attr_accessor :url
+
+ def initialize(url: nil)
+ @url = url
+ end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ attr_accessor :type
+
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
+ @hosted_confirmation = hosted_confirmation
+ @redirect = redirect
+ @type = type
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ attr_accessor :position
+
+ def initialize(position: nil)
+ @position = position
+ end
+ end
+ # 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.
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ attr_accessor :terms_of_service
+
+ def initialize(payment_method_reuse_agreement: nil, promotions: nil, terms_of_service: nil)
+ @payment_method_reuse_agreement = payment_method_reuse_agreement
+ @promotions = promotions
+ @terms_of_service = terms_of_service
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_accessor :label
+ # 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.
+ attr_accessor :value
+
+ def initialize(label: nil, value: nil)
+ @label = label
+ @value = value
+ end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_accessor :options
+
+ def initialize(default_value: nil, options: nil)
+ @default_value = default_value
+ @options = options
+ end
+ end
+
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_accessor :custom
+ # The type of the label.
+ attr_accessor :type
+
+ def initialize(custom: nil, type: nil)
+ @custom = custom
+ @type = type
+ end
+ end
+
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+ # Configuration for `type=dropdown` fields.
+ attr_accessor :dropdown
+ # 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.
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ attr_accessor :text
+ # The type of the field.
+ attr_accessor :type
+
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ )
+ @dropdown = dropdown
+ @key = key
+ @label = label
+ @numeric = numeric
+ @optional = optional
+ @text = text
+ @type = type
+ end
+ end
+
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_accessor :terms_of_service_acceptance
+
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ )
+ @after_submit = after_submit
+ @shipping_address = shipping_address
+ @submit = submit
+ @terms_of_service_acceptance = terms_of_service_acceptance
+ end
+ end
+
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+
+ def initialize(amount_tax_display: nil)
+ @amount_tax_display = amount_tax_display
+ end
+ end
+ # The account tax IDs associated with the invoice.
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @custom_fields = custom_fields
+ @description = description
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @rendering_options = rendering_options
+ end
+ end
+ # Whether the feature is enabled
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ attr_accessor :invoice_data
+
+ def initialize(enabled: nil, invoice_data: nil)
+ @enabled = enabled
+ @invoice_data = invoice_data
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ attr_accessor :price
+ # The quantity of the line item being purchased.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @price = price
+ @quantity = quantity
+ end
+ end
+
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # 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.
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @price = price
+ @quantity = quantity
+ end
+ end
+
+ class PaymentIntentData < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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.
+ attr_accessor :metadata
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ attr_accessor :setup_future_usage
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ attr_accessor :transfer_group
+
+ def initialize(
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ setup_future_usage: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ )
+ @capture_method = capture_method
+ @description = description
+ @metadata = metadata
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_group = transfer_group
+ end
+ end
+
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ attr_accessor :limit
+
+ def initialize(limit: nil)
+ @limit = limit
+ end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ attr_accessor :completed_sessions
+
+ def initialize(completed_sessions: nil)
+ @completed_sessions = completed_sessions
+ end
+ end
+
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ attr_accessor :allowed_countries
+
+ def initialize(allowed_countries: nil)
+ @allowed_countries = allowed_countries
+ end
+ end
+
+ class ShippingOption < Stripe::RequestParams
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(issuer: nil)
+ @issuer = issuer
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # 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.
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # 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.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @description = description
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ attr_accessor :required
+
+ def initialize(enabled: nil, required: nil)
+ @enabled = enabled
+ @required = required
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # Behavior after the purchase is complete.
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ attr_accessor :allow_promotion_codes
+ # 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.
+ attr_accessor :application_fee_amount
+ # 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.
+ attr_accessor :application_fee_percent
+ # Configuration for automatic tax collection.
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ attr_accessor :billing_address_collection
+ # Configure fields to gather active consent from customers.
+ attr_accessor :consent_collection
+ # 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.
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ attr_accessor :custom_text
+ # 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).
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ attr_accessor :line_items
+ # 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.
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ attr_accessor :on_behalf_of
+ # 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).
+ # 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.
+ # There is a maximum of 20 combined line items and optional items.
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ attr_accessor :payment_method_collection
+ # 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)).
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ attr_accessor :shipping_options
+ # 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`).
+ attr_accessor :submit_type
+ # 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`.
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ attr_accessor :tax_id_collection
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ attr_accessor :transfer_data
+
+ def initialize(
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil,
+ transfer_data: nil
+ )
+ @after_completion = after_completion
+ @allow_promotion_codes = allow_promotion_codes
+ @application_fee_amount = application_fee_amount
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_address_collection = billing_address_collection
+ @consent_collection = consent_collection
+ @currency = currency
+ @custom_fields = custom_fields
+ @custom_text = custom_text
+ @customer_creation = customer_creation
+ @expand = expand
+ @inactive_message = inactive_message
+ @invoice_creation = invoice_creation
+ @line_items = line_items
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @optional_items = optional_items
+ @payment_intent_data = payment_intent_data
+ @payment_method_collection = payment_method_collection
+ @payment_method_types = payment_method_types
+ @phone_number_collection = phone_number_collection
+ @restrictions = restrictions
+ @shipping_address_collection = shipping_address_collection
+ @shipping_options = shipping_options
+ @submit_type = submit_type
+ @subscription_data = subscription_data
+ @tax_id_collection = tax_id_collection
+ @transfer_data = transfer_data
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ attr_accessor :custom_message
+
+ def initialize(custom_message: nil)
+ @custom_message = custom_message
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # 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.
+ attr_accessor :url
+
+ def initialize(url: nil)
+ @url = url
+ end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ attr_accessor :type
+
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
+ @hosted_confirmation = hosted_confirmation
+ @redirect = redirect
+ @type = type
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_accessor :label
+ # 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.
+ attr_accessor :value
+
+ def initialize(label: nil, value: nil)
+ @label = label
+ @value = value
+ end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_accessor :options
+
+ def initialize(default_value: nil, options: nil)
+ @default_value = default_value
+ @options = options
+ end
+ end
+
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_accessor :custom
+ # The type of the label.
+ attr_accessor :type
+
+ def initialize(custom: nil, type: nil)
+ @custom = custom
+ @type = type
+ end
+ end
+
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+ # Configuration for `type=dropdown` fields.
+ attr_accessor :dropdown
+ # 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.
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ attr_accessor :text
+ # The type of the field.
+ attr_accessor :type
+
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ )
+ @dropdown = dropdown
+ @key = key
+ @label = label
+ @numeric = numeric
+ @optional = optional
+ @text = text
+ @type = type
+ end
+ end
+
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_accessor :terms_of_service_acceptance
+
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ )
+ @after_submit = after_submit
+ @shipping_address = shipping_address
+ @submit = submit
+ @terms_of_service_acceptance = terms_of_service_acceptance
+ end
+ end
+
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+
+ def initialize(amount_tax_display: nil)
+ @amount_tax_display = amount_tax_display
+ end
+ end
+ # The account tax IDs associated with the invoice.
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @custom_fields = custom_fields
+ @description = description
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @rendering_options = rendering_options
+ end
+ end
+ # Whether the feature is enabled
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ attr_accessor :invoice_data
+
+ def initialize(enabled: nil, invoice_data: nil)
+ @enabled = enabled
+ @invoice_data = invoice_data
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ attr_accessor :adjustable_quantity
+ # The ID of an existing line item on the payment link.
+ attr_accessor :id
+ # The quantity of the line item being purchased.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, id: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @id = id
+ @quantity = quantity
+ end
+ end
+
+ class PaymentIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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.
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ attr_accessor :transfer_group
+
+ def initialize(
+ description: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ )
+ @description = description
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_group = transfer_group
+ end
+ end
+
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ attr_accessor :limit
+
+ def initialize(limit: nil)
+ @limit = limit
+ end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ attr_accessor :completed_sessions
+
+ def initialize(completed_sessions: nil)
+ @completed_sessions = completed_sessions
+ end
+ end
+
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ attr_accessor :allowed_countries
+
+ def initialize(allowed_countries: nil)
+ @allowed_countries = allowed_countries
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(issuer: nil)
+ @issuer = issuer
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # 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.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ attr_accessor :required
+
+ def initialize(enabled: nil, required: nil)
+ @enabled = enabled
+ @required = required
+ end
+ end
+ # 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.
+ attr_accessor :active
+ # Behavior after the purchase is complete.
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ attr_accessor :allow_promotion_codes
+ # Configuration for automatic tax collection.
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ attr_accessor :billing_address_collection
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ attr_accessor :custom_text
+ # 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).
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ attr_accessor :line_items
+ # 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.
+ attr_accessor :metadata
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ attr_accessor :payment_method_collection
+ # 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).
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ attr_accessor :shipping_address_collection
+ # 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`).
+ attr_accessor :submit_type
+ # 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`.
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ attr_accessor :tax_id_collection
+
+ def initialize(
+ active: nil,
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil
+ )
+ @active = active
+ @after_completion = after_completion
+ @allow_promotion_codes = allow_promotion_codes
+ @automatic_tax = automatic_tax
+ @billing_address_collection = billing_address_collection
+ @custom_fields = custom_fields
+ @custom_text = custom_text
+ @customer_creation = customer_creation
+ @expand = expand
+ @inactive_message = inactive_message
+ @invoice_creation = invoice_creation
+ @line_items = line_items
+ @metadata = metadata
+ @payment_intent_data = payment_intent_data
+ @payment_method_collection = payment_method_collection
+ @payment_method_types = payment_method_types
+ @phone_number_collection = phone_number_collection
+ @restrictions = restrictions
+ @shipping_address_collection = shipping_address_collection
+ @submit_type = submit_type
+ @subscription_data = subscription_data
+ @tax_id_collection = tax_id_collection
+ end
+ end
+
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # 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.
+ attr_reader :active
+ # Attribute for field after_completion
+ attr_reader :after_completion
+ # Whether user redeemable promotion codes are enabled.
+ attr_reader :allow_promotion_codes
+ # The ID of the Connect application that created the Payment Link.
+ attr_reader :application
+ # 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.
+ attr_reader :application_fee_amount
+ # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ attr_reader :billing_address_collection
+ # When set, provides configuration to gather active consent from customers.
+ attr_reader :consent_collection
+ # 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).
+ attr_reader :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_reader :custom_fields
+ # Attribute for field custom_text
+ attr_reader :custom_text
+ # Configuration for Customer creation during checkout.
+ attr_reader :customer_creation
+ # Unique identifier for the object.
+ attr_reader :id
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ attr_reader :inactive_message
+ # Configuration for creating invoice for payment mode payment links.
+ attr_reader :invoice_creation
+ # The line items representing what is being sold.
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # 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.
+ attr_reader :on_behalf_of
+ # The optional items presented to the customer at checkout.
+ attr_reader :optional_items
+ # Indicates the parameters to be passed to PaymentIntent creation during checkout.
+ attr_reader :payment_intent_data
+ # Configuration for collecting a payment method during checkout. Defaults to `always`.
+ attr_reader :payment_method_collection
+ # 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).
+ attr_reader :payment_method_types
+ # Attribute for field phone_number_collection
+ attr_reader :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ attr_reader :restrictions
+ # Configuration for collecting the customer's shipping address.
+ attr_reader :shipping_address_collection
+ # The shipping rate options applied to the session.
+ attr_reader :shipping_options
+ # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
+ attr_reader :submit_type
+ # 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`.
+ attr_reader :subscription_data
+ # Attribute for field tax_id_collection
+ attr_reader :tax_id_collection
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ attr_reader :transfer_data
+ # The public URL that can be shared with customers.
+ attr_reader :url
+
# Creates a payment link.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/payment_links", params: params, opts: opts)
diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb
index 1f523ba8..d048d91b 100644
--- a/lib/stripe/resources/payment_method.rb
+++ b/lib/stripe/resources/payment_method.rb
@@ -17,6 +17,1548 @@ module Stripe
"payment_method"
end
+ class AcssDebit < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Institution number of the bank account.
+ attr_reader :institution_number
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Transit number of the bank account.
+ attr_reader :transit_number
+ end
+
+ class Affirm < Stripe::StripeObject; end
+ class AfterpayClearpay < Stripe::StripeObject; end
+ class Alipay < Stripe::StripeObject; end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # Six-digit number identifying bank and branch associated with this bank account.
+ attr_reader :bsb_number
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_reader :sort_code
+ end
+
+ class Bancontact < Stripe::StripeObject; end
+ class Billie < Stripe::StripeObject; end
+
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Billing address.
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ # Billing phone number (including extension).
+ attr_reader :phone
+ end
+
+ class Blik < Stripe::StripeObject; end
+
+ class Boleto < Stripe::StripeObject
+ # Uniquely identifies the customer tax id (CNPJ or CPF)
+ attr_reader :tax_id
+ end
+
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :cvc_check
+ end
+
+ class GeneratedFrom < Stripe::StripeObject
+ class PaymentMethodDetails < Stripe::StripeObject
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ attr_reader :type
+ end
+
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ attr_reader :transaction_status_information
+ end
+
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ attr_reader :type
+ end
+ # The authorized amount
+ attr_reader :amount_authorized
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ attr_reader :brand_product
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
+ attr_reader :capture_before
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Authorization response cryptogram.
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # 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.
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
+ attr_reader :incremental_authorization_supported
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ attr_reader :network_transaction_id
+ # Details about payments collected offline.
+ attr_reader :offline
+ # Defines whether the authorized amount can be over-captured or not
+ attr_reader :overcapture_supported
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ attr_reader :receipt
+ # Attribute for field wallet
+ attr_reader :wallet
+ end
+ # Attribute for field card_present
+ attr_reader :card_present
+ # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.
+ attr_reader :type
+ end
+ # The charge that created this object.
+ attr_reader :charge
+ # Transaction-specific details of the payment method used in the payment.
+ attr_reader :payment_method_details
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ attr_reader :setup_attempt
+ end
+
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ attr_reader :available
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
+ attr_reader :preferred
+ end
+
+ class ThreeDSecureUsage < Stripe::StripeObject
+ # Whether 3D Secure is supported on this card.
+ attr_reader :supported
+ end
+
+ class Wallet < Stripe::StripeObject
+ class AmexExpressCheckout < Stripe::StripeObject; end
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+
+ class Masterpass < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :shipping_address
+ end
+
+ class SamsungPay < Stripe::StripeObject; end
+
+ class VisaCheckout < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :shipping_address
+ end
+ # Attribute for field amex_express_checkout
+ attr_reader :amex_express_checkout
+ # Attribute for field apple_pay
+ attr_reader :apple_pay
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ attr_reader :dynamic_last4
+ # Attribute for field google_pay
+ attr_reader :google_pay
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field masterpass
+ attr_reader :masterpass
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ attr_reader :type
+ # Attribute for field visa_checkout
+ attr_reader :visa_checkout
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # Checks on Card address and CVC if provided.
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future.
+ attr_reader :display_brand
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Details of the original PaymentMethod that created this object.
+ attr_reader :generated_from
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ attr_reader :networks
+ # Status of a card based on the card issuer.
+ attr_reader :regulated_status
+ # Contains details on how this Card may be used for 3D Secure authentication.
+ attr_reader :three_d_secure_usage
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ attr_reader :wallet
+ end
+
+ class CardPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ attr_reader :available
+ # The preferred network for the card.
+ attr_reader :preferred
+ end
+
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ attr_reader :type
+ end
+
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ attr_reader :type
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ attr_reader :brand_product
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ attr_reader :networks
+ # Details about payment methods collected offline.
+ attr_reader :offline
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ # Attribute for field wallet
+ attr_reader :wallet
+ end
+
+ class Cashapp < Stripe::StripeObject
+ # A unique and immutable identifier assigned by Cash App to every buyer.
+ attr_reader :buyer_id
+ # A public identifier for buyers using Cash App.
+ attr_reader :cashtag
+ end
+
+ class CustomerBalance < Stripe::StripeObject; end
+
+ class Eps < Stripe::StripeObject
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
+ attr_reader :bank
+ end
+
+ class Fpx < Stripe::StripeObject
+ # Account holder type, if provided. Can be one of `individual` or `company`.
+ attr_reader :account_holder_type
+ # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
+ attr_reader :bank
+ end
+
+ class Giropay < Stripe::StripeObject; end
+ class Grabpay < Stripe::StripeObject; end
+
+ class Ideal < Stripe::StripeObject
+ # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank, if the bank was provided.
+ attr_reader :bic
+ end
+
+ class InteracPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ attr_reader :available
+ # The preferred network for the card.
+ attr_reader :preferred
+ end
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
+ attr_reader :brand
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ attr_reader :networks
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ attr_reader :read_method
+ end
+
+ class KakaoPay < Stripe::StripeObject; end
+
+ class Klarna < Stripe::StripeObject
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ attr_reader :month
+ # The four-digit year of birth.
+ attr_reader :year
+ end
+ # The customer's date of birth, if provided.
+ attr_reader :dob
+ end
+
+ class Konbini < Stripe::StripeObject; end
+
+ class KrCard < Stripe::StripeObject
+ # The local credit or debit card brand.
+ attr_reader :brand
+ # The last four digits of the card. This may not be present for American Express cards.
+ attr_reader :last4
+ end
+
+ class Link < Stripe::StripeObject
+ # Account owner's email address.
+ attr_reader :email
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_reader :persistent_token
+ end
+
+ class Mobilepay < Stripe::StripeObject; end
+ class Multibanco < Stripe::StripeObject; end
+
+ class NaverPay < Stripe::StripeObject
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
+ attr_reader :buyer_id
+ # Whether to fund this transaction with Naver Pay points or a card.
+ attr_reader :funding
+ end
+
+ class NzBankAccount < Stripe::StripeObject
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_reader :account_holder_name
+ # The numeric code for the bank account's bank.
+ attr_reader :bank_code
+ # The name of the bank.
+ attr_reader :bank_name
+ # The numeric code for the bank account's bank branch.
+ attr_reader :branch_code
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # The suffix of the bank account number.
+ attr_reader :suffix
+ end
+
+ class Oxxo < Stripe::StripeObject; end
+
+ class P24 < Stripe::StripeObject
+ # The customer's bank, if provided.
+ attr_reader :bank
+ end
+
+ class PayByBank < Stripe::StripeObject; end
+ class Payco < Stripe::StripeObject; end
+ class Paynow < Stripe::StripeObject; end
+
+ class Paypal < Stripe::StripeObject
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :country
+ # Owner's email. Values are provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :payer_email
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ attr_reader :payer_id
+ end
+
+ class Pix < Stripe::StripeObject; end
+ class Promptpay < Stripe::StripeObject; end
+
+ class RadarOptions < Stripe::StripeObject
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_reader :session
+ end
+
+ class RevolutPay < Stripe::StripeObject; end
+ class SamsungPay < Stripe::StripeObject; end
+ class Satispay < Stripe::StripeObject; end
+
+ class SepaDebit < Stripe::StripeObject
+ class GeneratedFrom < Stripe::StripeObject
+ # The ID of the Charge that generated this PaymentMethod, if any.
+ attr_reader :charge
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ attr_reader :setup_attempt
+ end
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Branch code of bank associated with the bank account.
+ attr_reader :branch_code
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Information about the object that generated this PaymentMethod.
+ attr_reader :generated_from
+ # Last four characters of the IBAN.
+ attr_reader :last4
+ end
+
+ class Sofort < Stripe::StripeObject
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_reader :country
+ end
+
+ class Swish < Stripe::StripeObject; end
+ class Twint < Stripe::StripeObject; end
+
+ class UsBankAccount < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # The preferred network.
+ attr_reader :preferred
+ # All supported networks.
+ attr_reader :supported
+ end
+
+ class StatusDetails < Stripe::StripeObject
+ class Blocked < Stripe::StripeObject
+ # The ACH network code that resulted in this block.
+ attr_reader :network_code
+ # The reason why this PaymentMethod's fingerprint has been blocked
+ attr_reader :reason
+ end
+ # Attribute for field blocked
+ attr_reader :blocked
+ end
+ # Account holder type: individual or company.
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_reader :account_type
+ # The name of the bank.
+ attr_reader :bank_name
+ # The ID of the Financial Connections Account used to create the payment method.
+ attr_reader :financial_connections_account
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # Contains information about US bank account networks that can be used.
+ attr_reader :networks
+ # Routing number of the bank account.
+ attr_reader :routing_number
+ # Contains information about the future reusability of this PaymentMethod.
+ attr_reader :status_details
+ end
+
+ class WechatPay < Stripe::StripeObject; end
+ class Zip < Stripe::StripeObject; end
+
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose PaymentMethods will be retrieved.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ attr_accessor :type
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ attr_accessor :preferred
+
+ def initialize(preferred: nil)
+ @preferred = preferred
+ end
+ end
+ # The card's CVC. It is highly recommended to always include this value.
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ attr_accessor :number
+ # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
+ attr_accessor :token
+
+ def initialize(
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ networks: nil,
+ number: nil,
+ token: nil
+ )
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @networks = networks
+ @number = number
+ @token = token
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
+ attr_accessor :card
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # The `Customer` to whom the original PaymentMethod is attached.
+ attr_accessor :customer
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # The PaymentMethod to share.
+ attr_accessor :payment_method
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ payment_method: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @cashapp = cashapp
+ @customer = customer
+ @customer_balance = customer_balance
+ @eps = eps
+ @expand = expand
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @payment_method = payment_method
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ attr_accessor :preferred
+
+ def initialize(preferred: nil)
+ @preferred = preferred
+ end
+ end
+ # Two-digit number representing the card's expiration month.
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ attr_accessor :networks
+
+ def initialize(exp_month: nil, exp_year: nil, networks: nil)
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @networks = networks
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Bank account holder type.
+ attr_accessor :account_holder_type
+ # Bank account type.
+ attr_accessor :account_type
+
+ def initialize(account_holder_type: nil, account_type: nil)
+ @account_holder_type = account_holder_type
+ @account_type = account_type
+ end
+ end
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `card` PaymentMethod, this hash contains the user's card details.
+ attr_accessor :card
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ allow_redisplay: nil,
+ billing_details: nil,
+ card: nil,
+ expand: nil,
+ link: nil,
+ metadata: nil,
+ pay_by_bank: nil,
+ us_bank_account: nil
+ )
+ @allow_redisplay = allow_redisplay
+ @billing_details = billing_details
+ @card = card
+ @expand = expand
+ @link = link
+ @metadata = metadata
+ @pay_by_bank = pay_by_bank
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class AttachParams < Stripe::RequestParams
+ # The ID of the customer to which to attach the PaymentMethod.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(customer: nil, expand: nil)
+ @customer = customer
+ @expand = expand
+ end
+ end
+
+ class DetachParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # 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. The field defaults to “unspecified”.
+ attr_reader :allow_redisplay
+ # Attribute for field alma
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field billie
+ attr_reader :billie
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # Attribute for field blik
+ attr_reader :blik
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
+ attr_reader :customer
+ # Attribute for field customer_balance
+ attr_reader :customer_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field fpx
+ attr_reader :fpx
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field interac_present
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field konbini
+ attr_reader :konbini
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # Attribute for field mobilepay
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field oxxo
+ attr_reader :oxxo
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ attr_reader :payco
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field pix
+ attr_reader :pix
+ # Attribute for field promptpay
+ attr_reader :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_reader :radar_options
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ attr_reader :samsung_pay
+ # Attribute for field satispay
+ attr_reader :satispay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field twint
+ attr_reader :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ attr_reader :zip
+
# Attaches a PaymentMethod object to a Customer.
#
# To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb
index 4acec1a8..7a6668e9 100644
--- a/lib/stripe/resources/payment_method_configuration.rb
+++ b/lib/stripe/resources/payment_method_configuration.rb
@@ -26,6 +26,2782 @@ module Stripe
"payment_method_configuration"
end
+ class AcssDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Affirm < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class AfterpayClearpay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Alipay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Alma < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class AmazonPay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class ApplePay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class AuBecsDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Bancontact < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Billie < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Blik < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Boleto < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Card < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class CartesBancaires < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Cashapp < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class CustomerBalance < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Eps < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Fpx < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Giropay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class GooglePay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Grabpay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Ideal < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Jcb < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Klarna < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Konbini < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Link < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Mobilepay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Multibanco < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class NzBankAccount < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Oxxo < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class P24 < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class PayByBank < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Paynow < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Paypal < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Promptpay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class RevolutPay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Satispay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Sofort < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Swish < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Twint < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class WechatPay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class Zip < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ attr_reader :overridable
+ # The account's display preference.
+ attr_reader :preference
+ # The effective display preference value.
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ attr_reader :available
+ # Attribute for field display_preference
+ attr_reader :display_preference
+ end
+
+ class ListParams < Stripe::RequestParams
+ # The Connect application to filter by.
+ attr_accessor :application
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ application: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @application = application
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ attr_accessor :acss_debit
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ attr_accessor :multibanco
+ # Configuration name.
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ attr_accessor :p24
+ # Configuration's parent configuration. Specify to create a child configuration.
+ attr_accessor :parent
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ parent: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @apple_pay = apple_pay
+ @apple_pay_later = apple_pay_later
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @cartes_bancaires = cartes_bancaires
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @expand = expand
+ @fpx = fpx
+ @giropay = giropay
+ @google_pay = google_pay
+ @grabpay = grabpay
+ @ideal = ideal
+ @jcb = jcb
+ @klarna = klarna
+ @konbini = konbini
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @name = name
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @parent = parent
+ @pay_by_bank = pay_by_bank
+ @paynow = paynow
+ @paypal = paypal
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ attr_accessor :acss_debit
+ # Whether the configuration can be used for new payments.
+ attr_accessor :active
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ attr_accessor :multibanco
+ # Configuration name.
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ attr_accessor :p24
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ active: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @active = active
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @apple_pay = apple_pay
+ @apple_pay_later = apple_pay_later
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @cartes_bancaires = cartes_bancaires
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @expand = expand
+ @fpx = fpx
+ @giropay = giropay
+ @google_pay = google_pay
+ @grabpay = grabpay
+ @ideal = ideal
+ @jcb = jcb
+ @klarna = klarna
+ @konbini = konbini
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @name = name
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @paynow = paynow
+ @paypal = paypal
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Whether the configuration can be used for new payments.
+ attr_reader :active
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # Attribute for field alma
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field apple_pay
+ attr_reader :apple_pay
+ # For child configs, the Connect application associated with the configuration.
+ attr_reader :application
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field billie
+ attr_reader :billie
+ # Attribute for field blik
+ attr_reader :blik
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field cartes_bancaires
+ attr_reader :cartes_bancaires
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ attr_reader :customer_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field fpx
+ attr_reader :fpx
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field google_pay
+ attr_reader :google_pay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field ideal
+ attr_reader :ideal
+ # The default configuration is used whenever a payment method configuration is not specified.
+ attr_reader :is_default
+ # Attribute for field jcb
+ attr_reader :jcb
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field konbini
+ attr_reader :konbini
+ # Attribute for field link
+ attr_reader :link
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Attribute for field mobilepay
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # The configuration's name.
+ attr_reader :name
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field oxxo
+ attr_reader :oxxo
+ # Attribute for field p24
+ attr_reader :p24
+ # For child configs, the configuration's parent configuration.
+ attr_reader :parent
+ # Attribute for field pay_by_bank
+ attr_reader :pay_by_bank
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field promptpay
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field satispay
+ attr_reader :satispay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field twint
+ attr_reader :twint
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ attr_reader :zip
+
# Creates a payment method configuration
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb
index 762fb209..4dcf9aae 100644
--- a/lib/stripe/resources/payment_method_domain.rb
+++ b/lib/stripe/resources/payment_method_domain.rb
@@ -16,6 +16,150 @@ module Stripe
"payment_method_domain"
end
+ class AmazonPay < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ attr_reader :status_details
+ end
+
+ class ApplePay < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ attr_reader :status_details
+ end
+
+ class GooglePay < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ attr_reader :status_details
+ end
+
+ class Link < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ attr_reader :status_details
+ end
+
+ class Paypal < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ attr_reader :status_details
+ end
+
+ class ListParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ domain_name: nil,
+ enabled: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @domain_name = domain_name
+ @enabled = enabled
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(domain_name: nil, enabled: nil, expand: nil)
+ @domain_name = domain_name
+ @enabled = enabled
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(enabled: nil, expand: nil)
+ @enabled = enabled
+ @expand = expand
+ end
+ end
+
+ class ValidateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Indicates the status of a specific payment method on a payment method domain.
+ attr_reader :amazon_pay
+ # Indicates the status of a specific payment method on a payment method domain.
+ attr_reader :apple_pay
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The domain name that this payment method domain object represents.
+ attr_reader :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
+ attr_reader :enabled
+ # Indicates the status of a specific payment method on a payment method domain.
+ attr_reader :google_pay
+ # Unique identifier for the object.
+ attr_reader :id
+ # Indicates the status of a specific payment method on a payment method domain.
+ attr_reader :link
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Indicates the status of a specific payment method on a payment method domain.
+ attr_reader :paypal
+
# Creates a payment method domain.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb
index 4b49fe92..af995cf4 100644
--- a/lib/stripe/resources/payout.rb
+++ b/lib/stripe/resources/payout.rb
@@ -20,6 +20,215 @@ module Stripe
"payout"
end
+ class TraceId < Stripe::StripeObject
+ # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`.
+ attr_reader :status
+ # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`.
+ attr_reader :value
+ end
+
+ class ListParams < Stripe::RequestParams
+ class ArrivalDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return payouts that are expected to arrive during the given date interval.
+ attr_accessor :arrival_date
+ # Only return payouts that were created during the given date interval.
+ attr_accessor :created
+ # The ID of an external account - only return payouts sent to this external account.
+ attr_accessor :destination
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.
+ attr_accessor :status
+
+ def initialize(
+ arrival_date: nil,
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @arrival_date = arrival_date
+ @created = created
+ @destination = destination
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents representing how much to payout.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency.
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ attr_accessor :method
+ # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
+ attr_accessor :source_type
+ # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ method: nil,
+ source_type: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @destination = destination
+ @expand = expand
+ @metadata = metadata
+ @method = method
+ @source_type = source_type
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+ # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.
+ attr_reader :amount
+ # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
+ attr_reader :application_fee
+ # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
+ attr_reader :application_fee_amount
+ # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.
+ attr_reader :arrival_date
+ # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts).
+ attr_reader :automatic
+ # ID of the balance transaction that describes the impact of this payout on your account balance.
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # ID of the bank account or card the payout is sent to.
+ attr_reader :destination
+ # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance.
+ attr_reader :failure_balance_transaction
+ # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures).
+ attr_reader :failure_code
+ # Message that provides the reason for a payout failure, if available.
+ attr_reader :failure_message
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ attr_reader :method
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # If the payout reverses another, this is the ID of the original payout.
+ attr_reader :original_payout
+ # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout.
+ attr_reader :reconciliation_status
+ # If the payout reverses, this is the ID of the payout that reverses this payout.
+ attr_reader :reversed_by
+ # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`.
+ attr_reader :source_type
+ # Extra information about a payout that displays on the user's bank statement.
+ attr_reader :statement_descriptor
+ # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`.
+ attr_reader :status
+ # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar.
+ attr_reader :trace_id
+ # Can be `bank_account` or `card`.
+ attr_reader :type
+
# You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
def cancel(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb
index 79fa0399..6793082b 100644
--- a/lib/stripe/resources/person.rb
+++ b/lib/stripe/resources/person.rb
@@ -15,6 +15,269 @@ module Stripe
"person"
end
+ class AdditionalTosAcceptances < Stripe::StripeObject
+ class Account < Stripe::StripeObject
+ # The Unix timestamp marking when the legal guardian accepted the service agreement.
+ attr_reader :date
+ # The IP address from which the legal guardian accepted the service agreement.
+ attr_reader :ip
+ # The user agent of the browser from which the legal guardian accepted the service agreement.
+ attr_reader :user_agent
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ attr_reader :account
+ end
+
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class AddressKana < Stripe::StripeObject
+ # City/Ward.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Block/Building number.
+ attr_reader :line1
+ # Building details.
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # Prefecture.
+ attr_reader :state
+ # Town/cho-me.
+ attr_reader :town
+ end
+
+ class AddressKanji < Stripe::StripeObject
+ # City/Ward.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Block/Building number.
+ attr_reader :line1
+ # Building details.
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # Prefecture.
+ attr_reader :state
+ # Town/cho-me.
+ attr_reader :town
+ end
+
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ attr_reader :month
+ # The four-digit year of birth.
+ attr_reader :year
+ end
+
+ class FutureRequirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ attr_reader :original_fields_due
+ end
+
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ attr_reader :alternatives
+ # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.
+ attr_reader :eventually_due
+ # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+
+ class RegisteredAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class Relationship < Stripe::StripeObject
+ # Whether the person is the authorizer of the account's representative.
+ attr_reader :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_reader :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_reader :executive
+ # Whether the person is the legal guardian of the account's representative.
+ attr_reader :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ attr_reader :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_reader :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ attr_reader :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_reader :title
+ end
+
+ class Requirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ attr_reader :original_fields_due
+ end
+
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ attr_reader :alternatives
+ # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.
+ attr_reader :eventually_due
+ # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ attr_reader :pending_verification
+ end
+
+ class Verification < Stripe::StripeObject
+ class AdditionalDocument < Stripe::StripeObject
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_reader :back
+ # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read".
+ attr_reader :details
+ # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.
+ attr_reader :details_code
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_reader :front
+ end
+
+ class Document < Stripe::StripeObject
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_reader :back
+ # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read".
+ attr_reader :details
+ # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.
+ attr_reader :details_code
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_reader :front
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_reader :additional_document
+ # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified".
+ attr_reader :details
+ # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.
+ attr_reader :details_code
+ # Attribute for field document
+ attr_reader :document
+ # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.
+ attr_reader :status
+ end
+ # The account the person is associated with.
+ attr_reader :account
+ # Attribute for field additional_tos_acceptances
+ attr_reader :additional_tos_acceptances
+ # Attribute for field address
+ attr_reader :address
+ # The Kana variation of the person's address (Japan only).
+ attr_reader :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ attr_reader :address_kanji
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Attribute for field dob
+ attr_reader :dob
+ # The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :email
+ # The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :first_name
+ # The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :first_name_kana
+ # The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :first_name_kanji
+ # A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :full_name_aliases
+ # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
+ attr_reader :future_requirements
+ # The person's gender.
+ attr_reader :gender
+ # Unique identifier for the object.
+ attr_reader :id
+ # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`).
+ attr_reader :id_number_provided
+ # Whether the person's `id_number_secondary` was provided.
+ attr_reader :id_number_secondary_provided
+ # The person's last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :last_name
+ # The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :last_name_kana
+ # The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ attr_reader :last_name_kanji
+ # The person's maiden name.
+ attr_reader :maiden_name
+ # 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.
+ attr_reader :metadata
+ # The country where the person is a national.
+ attr_reader :nationality
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The person's phone number.
+ attr_reader :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_reader :political_exposure
+ # Attribute for field registered_address
+ attr_reader :registered_address
+ # Attribute for field relationship
+ attr_reader :relationship
+ # Information about the requirements for this person, including what information needs to be collected, and by when.
+ attr_reader :requirements
+ # Whether the last four digits of the person's Social Security number have been provided (U.S. only).
+ attr_reader :ssn_last_4_provided
+ # Attribute for field verification
+ attr_reader :verification
+ # Always true for a deleted object
+ attr_reader :deleted
+
def resource_url
if !respond_to?(:account) || account.nil?
raise NotImplementedError,
diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb
index 2a6381f8..2d3d87bd 100644
--- a/lib/stripe/resources/plan.rb
+++ b/lib/stripe/resources/plan.rb
@@ -21,6 +21,308 @@ module Stripe
"plan"
end
+ class Tier < Stripe::StripeObject
+ # Price for the entire tier.
+ attr_reader :flat_amount
+ # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :flat_amount_decimal
+ # Per unit price for units relevant to the tier.
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :unit_amount_decimal
+ # Up to and including to this quantity will be contained in the tier.
+ attr_reader :up_to
+ end
+
+ class TransformUsage < Stripe::StripeObject
+ # Divide usage by this number.
+ attr_reader :divide_by
+ # After division, either round the result `up` or `down`.
+ attr_reader :round
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Whether the plan is currently available for new subscriptions.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # A brief description of the plan, hidden from customers.
+ attr_accessor :nickname
+ # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
+ attr_accessor :product
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_accessor :trial_period_days
+
+ def initialize(
+ active: nil,
+ expand: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ trial_period_days: nil
+ )
+ @active = active
+ @expand = expand
+ @metadata = metadata
+ @nickname = nickname
+ @product = product
+ @trial_period_days = trial_period_days
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return plans for the given product.
+ attr_accessor :product
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ product: nil,
+ starting_after: nil
+ )
+ @active = active
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @product = product
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_accessor :unit_label
+
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ )
+ @active = active
+ @id = id
+ @metadata = metadata
+ @name = name
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @unit_label = unit_label
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+
+ class TransformUsage < Stripe::RequestParams
+ # Divide usage by this number.
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ attr_accessor :round
+
+ def initialize(divide_by: nil, round: nil)
+ @divide_by = divide_by
+ @round = round
+ end
+ end
+ # Whether the plan is currently available for new subscriptions. Defaults to `true`.
+ attr_accessor :active
+ # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
+ attr_accessor :amount
+ # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.
+ attr_accessor :amount_decimal
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ attr_accessor :billing_scheme
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
+ attr_accessor :id
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+ # 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`.
+ attr_accessor :metadata
+ # The meter tracking the usage of a metered price
+ attr_accessor :meter
+ # A brief description of the plan, hidden from customers.
+ attr_accessor :nickname
+ # Attribute for param field product
+ attr_accessor :product
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ attr_accessor :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ attr_accessor :transform_usage
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ attr_accessor :usage_type
+
+ def initialize(
+ active: nil,
+ amount: nil,
+ amount_decimal: nil,
+ billing_scheme: nil,
+ currency: nil,
+ expand: nil,
+ id: nil,
+ interval: nil,
+ interval_count: nil,
+ metadata: nil,
+ meter: nil,
+ nickname: nil,
+ product: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transform_usage: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ )
+ @active = active
+ @amount = amount
+ @amount_decimal = amount_decimal
+ @billing_scheme = billing_scheme
+ @currency = currency
+ @expand = expand
+ @id = id
+ @interval = interval
+ @interval_count = interval_count
+ @metadata = metadata
+ @meter = meter
+ @nickname = nickname
+ @product = product
+ @tiers = tiers
+ @tiers_mode = tiers_mode
+ @transform_usage = transform_usage
+ @trial_period_days = trial_period_days
+ @usage_type = usage_type
+ end
+ end
+ # Whether the plan can be used for new purchases.
+ attr_reader :active
+ # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
+ attr_reader :amount
+ # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
+ attr_reader :amount_decimal
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ attr_reader :billing_scheme
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Unique identifier for the object.
+ attr_reader :id
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
+ attr_reader :interval
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
+ attr_reader :interval_count
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The meter tracking the usage of a metered price
+ attr_reader :meter
+ # A brief description of the plan, hidden from customers.
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The product whose pricing this plan determines.
+ attr_reader :product
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_reader :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
+ attr_reader :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
+ attr_reader :transform_usage
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_reader :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ attr_reader :usage_type
+ # Always true for a deleted object
+ attr_reader :deleted
+
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/plans", params: params, opts: opts)
diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb
index 8440ced4..3ced5100 100644
--- a/lib/stripe/resources/price.rb
+++ b/lib/stripe/resources/price.rb
@@ -19,6 +19,610 @@ module Stripe
"price"
end
+ class CurrencyOptions < Stripe::StripeObject
+ class CustomUnitAmount < Stripe::StripeObject
+ # The maximum unit amount the customer can specify for this item.
+ attr_reader :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_reader :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_reader :preset
+ end
+
+ class Tier < Stripe::StripeObject
+ # Price for the entire tier.
+ attr_reader :flat_amount
+ # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :flat_amount_decimal
+ # Per unit price for units relevant to the tier.
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :unit_amount_decimal
+ # Up to and including to this quantity will be contained in the tier.
+ attr_reader :up_to
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_reader :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_reader :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_reader :tiers
+ # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
+ attr_reader :unit_amount
+ # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
+ attr_reader :unit_amount_decimal
+ end
+
+ class CustomUnitAmount < Stripe::StripeObject
+ # The maximum unit amount the customer can specify for this item.
+ attr_reader :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_reader :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_reader :preset
+ end
+
+ class Recurring < Stripe::StripeObject
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
+ attr_reader :interval
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
+ attr_reader :interval_count
+ # The meter tracking the usage of a metered price
+ attr_reader :meter
+ # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_reader :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ attr_reader :usage_type
+ end
+
+ class Tier < Stripe::StripeObject
+ # Price for the entire tier.
+ attr_reader :flat_amount
+ # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :flat_amount_decimal
+ # Per unit price for units relevant to the tier.
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ attr_reader :unit_amount_decimal
+ # Up to and including to this quantity will be contained in the tier.
+ attr_reader :up_to
+ end
+
+ class TransformQuantity < Stripe::StripeObject
+ # Divide usage by this number.
+ attr_reader :divide_by
+ # After division, either round the result `up` or `down`.
+ attr_reader :round
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Filter by billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # Filter by the price's meter.
+ attr_accessor :meter
+ # Filter by the usage type for this price. Can be either `metered` or `licensed`.
+ attr_accessor :usage_type
+
+ def initialize(interval: nil, meter: nil, usage_type: nil)
+ @interval = interval
+ @meter = meter
+ @usage_type = usage_type
+ end
+ end
+ # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return prices for the given currency.
+ attr_accessor :currency
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
+ attr_accessor :lookup_keys
+ # Only return prices for the given product.
+ attr_accessor :product
+ # Only return prices with these recurring fields.
+ attr_accessor :recurring
+ # 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.
+ attr_accessor :starting_after
+ # Only return prices of type `recurring` or `one_time`.
+ attr_accessor :type
+
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ product: nil,
+ recurring: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @active = active
+ @created = created
+ @currency = currency
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @lookup_keys = lookup_keys
+ @product = product
+ @recurring = recurring
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @custom_unit_amount = custom_unit_amount
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class ProductData < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_accessor :unit_label
+
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ )
+ @active = active
+ @id = id
+ @metadata = metadata
+ @name = name
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @unit_label = unit_label
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+ # The meter tracking the usage of a metered price
+ attr_accessor :meter
+ # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ attr_accessor :usage_type
+
+ def initialize(
+ interval: nil,
+ interval_count: nil,
+ meter: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ )
+ @interval = interval
+ @interval_count = interval_count
+ @meter = meter
+ @trial_period_days = trial_period_days
+ @usage_type = usage_type
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+
+ class TransformQuantity < Stripe::RequestParams
+ # Divide usage by this number.
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ attr_accessor :round
+
+ def initialize(divide_by: nil, round: nil)
+ @divide_by = divide_by
+ @round = round
+ end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ attr_accessor :active
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ attr_accessor :billing_scheme
+ # 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).
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ attr_accessor :nickname
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # These fields can be used to create a new product that this price will belong to.
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `usage_type`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ attr_accessor :tiers_mode
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ attr_accessor :transfer_lookup_key
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ attr_accessor :transform_quantity
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ active: nil,
+ billing_scheme: nil,
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transfer_lookup_key: nil,
+ transform_quantity: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @active = active
+ @billing_scheme = billing_scheme
+ @currency = currency
+ @currency_options = currency_options
+ @custom_unit_amount = custom_unit_amount
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @nickname = nickname
+ @product = product
+ @product_data = product_data
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @tiers_mode = tiers_mode
+ @transfer_lookup_key = transfer_lookup_key
+ @transform_quantity = transform_quantity
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @custom_unit_amount = custom_unit_amount
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ attr_accessor :active
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ attr_accessor :nickname
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ attr_accessor :transfer_lookup_key
+
+ def initialize(
+ active: nil,
+ currency_options: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ tax_behavior: nil,
+ transfer_lookup_key: nil
+ )
+ @active = active
+ @currency_options = currency_options
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @nickname = nickname
+ @tax_behavior = tax_behavior
+ @transfer_lookup_key = transfer_lookup_key
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+ # Whether the price can be used for new purchases.
+ attr_reader :active
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ attr_reader :billing_scheme
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_reader :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_reader :custom_unit_amount
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ attr_reader :lookup_key
+ # 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.
+ attr_reader :metadata
+ # A brief description of the price, hidden from customers.
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The ID of the product this price is associated with.
+ attr_reader :product
+ # The recurring components of a price such as `interval` and `usage_type`.
+ attr_reader :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_reader :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_reader :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
+ attr_reader :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
+ attr_reader :transform_quantity
+ # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
+ attr_reader :type
+ # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
+ attr_reader :unit_amount
+ # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
+ attr_reader :unit_amount_decimal
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/prices", params: params, opts: opts)
diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb
index 6af8023a..1e636fb8 100644
--- a/lib/stripe/resources/product.rb
+++ b/lib/stripe/resources/product.rb
@@ -25,6 +25,478 @@ module Stripe
nested_resource_class_methods :feature, operations: %i[create retrieve delete list]
+ class MarketingFeature < Stripe::StripeObject
+ # The marketing feature name. Up to 80 characters long.
+ attr_reader :name
+ end
+
+ class PackageDimensions < Stripe::StripeObject
+ # Height, in inches.
+ attr_reader :height
+ # Length, in inches.
+ attr_reader :length
+ # Weight, in ounces.
+ attr_reader :weight
+ # Width, in inches.
+ attr_reader :width
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ attr_accessor :name
+
+ def initialize(name: nil)
+ @name = name
+ end
+ end
+
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :width
+
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
+ @height = height
+ @length = length
+ @weight = weight
+ @width = width
+ end
+ end
+ # Whether the product is available for purchase.
+ attr_accessor :active
+ # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ attr_accessor :default_price
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ attr_accessor :marketing_features
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ attr_accessor :url
+
+ def initialize(
+ active: nil,
+ default_price: nil,
+ description: nil,
+ expand: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil,
+ url: nil
+ )
+ @active = active
+ @default_price = default_price
+ @description = description
+ @expand = expand
+ @images = images
+ @marketing_features = marketing_features
+ @metadata = metadata
+ @name = name
+ @package_dimensions = package_dimensions
+ @shippable = shippable
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @unit_label = unit_label
+ @url = url
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return products that are active or inactive (e.g., pass `false` to list all inactive products).
+ attr_accessor :active
+ # Only return products that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).
+ attr_accessor :ids
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return products that can be shipped (i.e., physical, not digital products).
+ attr_accessor :shippable
+ # 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.
+ attr_accessor :starting_after
+ # Only return products of this type.
+ attr_accessor :type
+ # Only return products with the given url.
+ attr_accessor :url
+
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ ids: nil,
+ limit: nil,
+ shippable: nil,
+ starting_after: nil,
+ type: nil,
+ url: nil
+ )
+ @active = active
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @ids = ids
+ @limit = limit
+ @shippable = shippable
+ @starting_after = starting_after
+ @type = type
+ @url = url
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DefaultPriceData < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @custom_unit_amount = custom_unit_amount
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # 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`.
+ attr_accessor :metadata
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ metadata: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @currency_options = currency_options
+ @custom_unit_amount = custom_unit_amount
+ @metadata = metadata
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ attr_accessor :name
+
+ def initialize(name: nil)
+ @name = name
+ end
+ end
+
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :width
+
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
+ @height = height
+ @length = length
+ @weight = weight
+ @width = width
+ end
+ end
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ attr_accessor :active
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
+ attr_accessor :default_price_data
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
+ attr_accessor :id
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ attr_accessor :marketing_features
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. Only used for subscription payments.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
+ attr_accessor :type
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ attr_accessor :url
+
+ def initialize(
+ active: nil,
+ default_price_data: nil,
+ description: nil,
+ expand: nil,
+ id: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ type: nil,
+ unit_label: nil,
+ url: nil
+ )
+ @active = active
+ @default_price_data = default_price_data
+ @description = description
+ @expand = expand
+ @id = id
+ @images = images
+ @marketing_features = marketing_features
+ @metadata = metadata
+ @name = name
+ @package_dimensions = package_dimensions
+ @shippable = shippable
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @type = type
+ @unit_label = unit_label
+ @url = url
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+ # Whether the product is currently available for purchase.
+ attr_reader :active
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ attr_reader :default_price
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_reader :description
+ # Unique identifier for the object.
+ attr_reader :id
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_reader :images
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ attr_reader :marketing_features
+ # 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.
+ attr_reader :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The dimensions of this product for shipping purposes.
+ attr_reader :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ attr_reader :shippable
+ # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.
+ attr_reader :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_reader :tax_code
+ # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.
+ attr_reader :type
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_reader :unit_label
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ attr_reader :updated
+ # A URL of a publicly-accessible webpage for this product.
+ attr_reader :url
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new product object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/products", params: params, opts: opts)
diff --git a/lib/stripe/resources/product_feature.rb b/lib/stripe/resources/product_feature.rb
index 5a36e564..ebf0ba3e 100644
--- a/lib/stripe/resources/product_feature.rb
+++ b/lib/stripe/resources/product_feature.rb
@@ -9,5 +9,17 @@ module Stripe
def self.object_name
"product_feature"
end
+
+ # A feature represents a monetizable ability or functionality in your system.
+ # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
+ attr_reader :entitlement_feature
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Always true for a deleted object
+ attr_reader :deleted
end
end
diff --git a/lib/stripe/resources/promotion_code.rb b/lib/stripe/resources/promotion_code.rb
index 70a562a2..3d6c0c9e 100644
--- a/lib/stripe/resources/promotion_code.rb
+++ b/lib/stripe/resources/promotion_code.rb
@@ -14,6 +14,218 @@ module Stripe
"promotion_code"
end
+ class Restrictions < Stripe::StripeObject
+ class CurrencyOptions < Stripe::StripeObject
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_reader :minimum_amount
+ end
+ # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_reader :currency_options
+ # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ attr_reader :first_time_transaction
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_reader :minimum_amount
+ # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ attr_reader :minimum_amount_currency
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Filter promotion codes by whether they are active.
+ attr_accessor :active
+ # Only return promotion codes that have this case-insensitive code.
+ attr_accessor :code
+ # Only return promotion codes for this coupon.
+ attr_accessor :coupon
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return promotion codes that are restricted to this customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @code = code
+ @coupon = coupon
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_accessor :minimum_amount
+
+ def initialize(minimum_amount: nil)
+ @minimum_amount = minimum_amount
+ end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ attr_accessor :first_time_transaction
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_accessor :minimum_amount
+ # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ attr_accessor :minimum_amount_currency
+
+ def initialize(
+ currency_options: nil,
+ first_time_transaction: nil,
+ minimum_amount: nil,
+ minimum_amount_currency: nil
+ )
+ @currency_options = currency_options
+ @first_time_transaction = first_time_transaction
+ @minimum_amount = minimum_amount
+ @minimum_amount_currency = minimum_amount_currency
+ end
+ end
+ # Whether the promotion code is currently active.
+ attr_accessor :active
+ # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ #
+ # If left blank, we will generate one automatically.
+ attr_accessor :code
+ # The coupon for this promotion code.
+ attr_accessor :coupon
+ # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
+ attr_accessor :expires_at
+ # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.
+ attr_accessor :max_redemptions
+ # 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`.
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ attr_accessor :restrictions
+
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ customer: nil,
+ expand: nil,
+ expires_at: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ restrictions: nil
+ )
+ @active = active
+ @code = code
+ @coupon = coupon
+ @customer = customer
+ @expand = expand
+ @expires_at = expires_at
+ @max_redemptions = max_redemptions
+ @metadata = metadata
+ @restrictions = restrictions
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_accessor :minimum_amount
+
+ def initialize(minimum_amount: nil)
+ @minimum_amount = minimum_amount
+ end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(currency_options: nil)
+ @currency_options = currency_options
+ end
+ end
+ # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ attr_accessor :restrictions
+
+ def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil)
+ @active = active
+ @expand = expand
+ @metadata = metadata
+ @restrictions = restrictions
+ end
+ end
+ # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
+ attr_reader :active
+ # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ attr_reader :code
+ # A coupon contains information about a percent-off or amount-off discount you
+ # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
+ # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
+ attr_reader :coupon
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The customer that this promotion code can be used by.
+ attr_reader :customer
+ # Date at which the promotion code can no longer be redeemed.
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Maximum number of times this promotion code can be redeemed.
+ attr_reader :max_redemptions
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field restrictions
+ attr_reader :restrictions
+ # Number of times this promotion code has been used.
+ attr_reader :times_redeemed
+
# A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/promotion_codes", params: params, opts: opts)
diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb
index d8c2b54e..b6bf6afc 100644
--- a/lib/stripe/resources/quote.rb
+++ b/lib/stripe/resources/quote.rb
@@ -14,6 +14,923 @@ module Stripe
"quote"
end
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # Automatically calculate taxes
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ # The status of the most recent automated tax calculation for this quote.
+ attr_reader :status
+ end
+
+ class Computed < Stripe::StripeObject
+ class Recurring < Stripe::StripeObject
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ attr_reader :discount
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ attr_reader :breakdown
+ end
+ # Total before any discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total after discounts and taxes are applied.
+ attr_reader :amount_total
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
+ attr_reader :interval
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
+ attr_reader :interval_count
+ # Attribute for field total_details
+ attr_reader :total_details
+ end
+
+ class Upfront < Stripe::StripeObject
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ attr_reader :discount
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ attr_reader :breakdown
+ end
+ # Total before any discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total after discounts and taxes are applied.
+ attr_reader :amount_total
+ # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
+ attr_reader :line_items
+ # Attribute for field total_details
+ attr_reader :total_details
+ end
+ # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
+ attr_reader :recurring
+ # Attribute for field upfront
+ attr_reader :upfront
+ end
+
+ class FromQuote < Stripe::StripeObject
+ # Whether this quote is a revision of a different quote.
+ attr_reader :is_revision
+ # The quote that was cloned.
+ attr_reader :quote
+ end
+
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ attr_reader :days_until_due
+ # Attribute for field issuer
+ attr_reader :issuer
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # The time that the quote was accepted. Measured in seconds since Unix epoch.
+ attr_reader :accepted_at
+ # The time that the quote was canceled. Measured in seconds since Unix epoch.
+ attr_reader :canceled_at
+ # The time that the quote was finalized. Measured in seconds since Unix epoch.
+ attr_reader :finalized_at
+ end
+
+ class SubscriptionData < Stripe::StripeObject
+ # 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.
+ attr_reader :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
+ attr_reader :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ attr_reader :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ attr_reader :trial_period_days
+ end
+
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ attr_reader :discount
+ end
+
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ attr_reader :breakdown
+ end
+
+ class TransferData < Stripe::StripeObject
+ # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
+ attr_reader :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ attr_reader :destination
+ end
+
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose quotes will be retrieved.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The status of the quote.
+ attr_accessor :status
+ # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
+ attr_accessor :test_clock
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @test_clock = test_clock
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class FromQuote < Stripe::RequestParams
+ # Whether this quote is a revision of the previous quote.
+ attr_accessor :is_revision
+ # The `id` of the quote that will be cloned.
+ attr_accessor :quote
+
+ def initialize(is_revision: nil, quote: nil)
+ @is_revision = is_revision
+ @quote = quote
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(days_until_due: nil, issuer: nil)
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The discounts applied to this line item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # The quantity of the line item.
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ attr_accessor :trial_period_days
+
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
+ @description = description
+ @effective_date = effective_date
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, amount_percent: nil, destination: nil)
+ @amount = amount
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :application_fee_amount
+ # 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.
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :description
+ # The discounts applied to the quote.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :footer
+ # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
+ attr_accessor :from_quote
+ # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ attr_accessor :line_items
+ # 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`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ attr_accessor :subscription_data
+ # ID of the test clock to attach to the quote.
+ attr_accessor :test_clock
+ # The data with which to automatically create a Transfer for each of the invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ from_quote: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ test_clock: nil,
+ transfer_data: nil
+ )
+ @application_fee_amount = application_fee_amount
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @collection_method = collection_method
+ @customer = customer
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @expires_at = expires_at
+ @footer = footer
+ @from_quote = from_quote
+ @header = header
+ @invoice_settings = invoice_settings
+ @line_items = line_items
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @subscription_data = subscription_data
+ @test_clock = test_clock
+ @transfer_data = transfer_data
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(days_until_due: nil, issuer: nil)
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The discounts applied to this line item.
+ attr_accessor :discounts
+ # The ID of an existing line item on the quote.
+ attr_accessor :id
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # The quantity of the line item.
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ id: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @id = id
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ attr_accessor :trial_period_days
+
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
+ @description = description
+ @effective_date = effective_date
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, amount_percent: nil, destination: nil)
+ @amount = amount
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :application_fee_amount
+ # 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.
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF.
+ attr_accessor :description
+ # The discounts applied to the quote.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF.
+ attr_accessor :footer
+ # A header that will be displayed on the quote PDF.
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ attr_accessor :line_items
+ # 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`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ attr_accessor :subscription_data
+ # The data with which to automatically create a Transfer for each of the invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ transfer_data: nil
+ )
+ @application_fee_amount = application_fee_amount
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @collection_method = collection_method
+ @customer = customer
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @expires_at = expires_at
+ @footer = footer
+ @header = header
+ @invoice_settings = invoice_settings
+ @line_items = line_items
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @subscription_data = subscription_data
+ @transfer_data = transfer_data
+ end
+ end
+
+ class ListComputedUpfrontLineItemsParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class AcceptParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FinalizeQuoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+
+ def initialize(expand: nil, expires_at: nil)
+ @expand = expand
+ @expires_at = expires_at
+ end
+ end
+
+ class PdfParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Total before any discounts or taxes are applied.
+ attr_reader :amount_subtotal
+ # Total after discounts and taxes are applied.
+ attr_reader :amount_total
+ # ID of the Connect Application that created the quote.
+ attr_reader :application
+ # 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. Only applicable if there are no line items with recurring prices on the quote.
+ attr_reader :application_fee_amount
+ # 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. Only applicable if there are line items with recurring prices on the quote.
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_reader :collection_method
+ # Attribute for field computed
+ attr_reader :computed
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ attr_reader :customer
+ # The tax rates applied to this quote.
+ attr_reader :default_tax_rates
+ # A description that will be displayed on the quote PDF.
+ attr_reader :description
+ # The discounts applied to this quote.
+ attr_reader :discounts
+ # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ attr_reader :expires_at
+ # A footer that will be displayed on the quote PDF.
+ attr_reader :footer
+ # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
+ attr_reader :from_quote
+ # A header that will be displayed on the quote PDF.
+ attr_reader :header
+ # Unique identifier for the object.
+ attr_reader :id
+ # The invoice that was created from this quote.
+ attr_reader :invoice
+ # Attribute for field invoice_settings
+ attr_reader :invoice_settings
+ # A list of items the customer is being quoted for.
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # 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.
+ attr_reader :on_behalf_of
+ # The status of the quote.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # The subscription that was created or updated from this quote.
+ attr_reader :subscription
+ # Attribute for field subscription_data
+ attr_reader :subscription_data
+ # The subscription schedule that was created or updated from this quote.
+ attr_reader :subscription_schedule
+ # ID of the test clock this quote belongs to.
+ attr_reader :test_clock
+ # Attribute for field total_details
+ attr_reader :total_details
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
+ attr_reader :transfer_data
+
# Accepts the specified quote.
def accept(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb
index bf0cc099..39d52e65 100644
--- a/lib/stripe/resources/radar/early_fraud_warning.rb
+++ b/lib/stripe/resources/radar/early_fraud_warning.rb
@@ -15,6 +15,74 @@ module Stripe
"radar.early_fraud_warning"
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return early fraud warnings for the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return early fraud warnings that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ end
+ end
+ # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.
+ attr_reader :actionable
+ # ID of the charge this early fraud warning is for, optionally expanded.
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.
+ attr_reader :fraud_type
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the Payment Intent this early fraud warning is for, optionally expanded.
+ attr_reader :payment_intent
+
# Returns a list of early fraud warnings.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb
index 7b48cf28..e54f313d 100644
--- a/lib/stripe/resources/radar/value_list.rb
+++ b/lib/stripe/resources/radar/value_list.rb
@@ -17,6 +17,122 @@ module Stripe
"radar.value_list"
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ attr_accessor :name
+
+ def initialize(alias_: nil, expand: nil, metadata: nil, name: nil)
+ @alias = alias_
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # The alias used to reference the value list when writing rules.
+ attr_accessor :alias
+ # A value contained within a value list - returns all value lists containing this value.
+ attr_accessor :contains
+ # Only return value lists that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ alias_: nil,
+ contains: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @alias = alias_
+ @contains = contains
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
+ attr_accessor :item_type
+ # 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`.
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ attr_accessor :name
+
+ def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil)
+ @alias = alias_
+ @expand = expand
+ @item_type = item_type
+ @metadata = metadata
+ @name = name
+ end
+ end
+ # The name of the value list for use in rules.
+ attr_reader :alias
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The name or email address of the user who created this value list.
+ attr_reader :created_by
+ # Unique identifier for the object.
+ attr_reader :id
+ # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
+ attr_reader :item_type
+ # List of items contained within this value list.
+ attr_reader :list_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The name of the value list.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new ValueList object, which can then be referenced in rules.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb
index 4bb3bace..510eea88 100644
--- a/lib/stripe/resources/radar/value_list_item.rb
+++ b/lib/stripe/resources/radar/value_list_item.rb
@@ -16,6 +16,92 @@ module Stripe
"radar.value_list_item"
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return items that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Return items belonging to the parent list whose value matches the specified value (using an "is like" match).
+ attr_accessor :value
+ # Identifier for the parent value list this item belongs to.
+ attr_accessor :value_list
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ value: nil,
+ value_list: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @value = value
+ @value_list = value_list
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The value of the item (whose type must match the type of the parent value list).
+ attr_accessor :value
+ # The identifier of the value list which the created item will be added to.
+ attr_accessor :value_list
+
+ def initialize(expand: nil, value: nil, value_list: nil)
+ @expand = expand
+ @value = value
+ @value_list = value_list
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The name or email address of the user who added this item to the value list.
+ attr_reader :created_by
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The value of the item.
+ attr_reader :value
+ # The identifier of the value list this item belongs to.
+ attr_reader :value_list
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new ValueListItem object, which is added to the specified parent value list.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb
index f66aa497..036c822c 100644
--- a/lib/stripe/resources/refund.rb
+++ b/lib/stripe/resources/refund.rb
@@ -17,6 +17,398 @@ module Stripe
"refund"
end
+ class DestinationDetails < Stripe::StripeObject
+ class Affirm < Stripe::StripeObject; end
+ class AfterpayClearpay < Stripe::StripeObject; end
+ class Alipay < Stripe::StripeObject; end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBankTransfer < Stripe::StripeObject; end
+
+ class Blik < Stripe::StripeObject
+ # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
+ attr_reader :network_decline_code
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class BrBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class Card < Stripe::StripeObject
+ # Value of the reference number assigned to the refund.
+ attr_reader :reference
+ # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ # Type of the reference number assigned to the refund.
+ attr_reader :reference_type
+ # The type of refund. This can be `refund`, `reversal`, or `pending`.
+ attr_reader :type
+ end
+
+ class Cashapp < Stripe::StripeObject; end
+ class CustomerCashBalance < Stripe::StripeObject; end
+ class Eps < Stripe::StripeObject; end
+
+ class EuBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class GbBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class Giropay < Stripe::StripeObject; end
+ class Grabpay < Stripe::StripeObject; end
+
+ class JpBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class Klarna < Stripe::StripeObject; end
+
+ class Multibanco < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class MxBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class NzBankTransfer < Stripe::StripeObject; end
+
+ class P24 < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class Paynow < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject; end
+ class Pix < Stripe::StripeObject; end
+ class Revolut < Stripe::StripeObject; end
+ class Sofort < Stripe::StripeObject; end
+
+ class Swish < Stripe::StripeObject
+ # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
+ attr_reader :network_decline_code
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class ThBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class UsBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ attr_reader :reference_status
+ end
+
+ class WechatPay < Stripe::StripeObject; end
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field affirm
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ attr_reader :alipay
+ # Attribute for field alma
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_bank_transfer
+ attr_reader :au_bank_transfer
+ # Attribute for field blik
+ attr_reader :blik
+ # Attribute for field br_bank_transfer
+ attr_reader :br_bank_transfer
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field customer_cash_balance
+ attr_reader :customer_cash_balance
+ # Attribute for field eps
+ attr_reader :eps
+ # Attribute for field eu_bank_transfer
+ attr_reader :eu_bank_transfer
+ # Attribute for field gb_bank_transfer
+ attr_reader :gb_bank_transfer
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Attribute for field grabpay
+ attr_reader :grabpay
+ # Attribute for field jp_bank_transfer
+ attr_reader :jp_bank_transfer
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # Attribute for field mx_bank_transfer
+ attr_reader :mx_bank_transfer
+ # Attribute for field nz_bank_transfer
+ attr_reader :nz_bank_transfer
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field paynow
+ attr_reader :paynow
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field pix
+ attr_reader :pix
+ # Attribute for field revolut
+ attr_reader :revolut
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field swish
+ attr_reader :swish
+ # Attribute for field th_bank_transfer
+ attr_reader :th_bank_transfer
+ # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.
+ attr_reader :type
+ # Attribute for field us_bank_transfer
+ attr_reader :us_bank_transfer
+ # Attribute for field wechat_pay
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ attr_reader :zip
+ end
+
+ class NextAction < Stripe::StripeObject
+ class DisplayDetails < Stripe::StripeObject
+ class EmailSent < Stripe::StripeObject
+ # The timestamp when the email was sent.
+ attr_reader :email_sent_at
+ # The recipient's email address.
+ attr_reader :email_sent_to
+ end
+ # Attribute for field email_sent
+ attr_reader :email_sent
+ # The expiry timestamp.
+ attr_reader :expires_at
+ end
+ # Attribute for field display_details
+ attr_reader :display_details
+ # Type of the next action to perform.
+ attr_reader :type
+ end
+
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ attr_reader :presentment_currency
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return refunds for the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return refunds that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return refunds for the PaymentIntent specified by this ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field amount
+ attr_accessor :amount
+ # The identifier of the charge to refund.
+ attr_accessor :charge
+ # 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).
+ attr_accessor :currency
+ # Customer whose customer balance to refund from.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
+ attr_accessor :instructions_email
+ # 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`.
+ attr_accessor :metadata
+ # Origin of the refund
+ attr_accessor :origin
+ # The identifier of the PaymentIntent to refund.
+ attr_accessor :payment_intent
+ # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.
+ attr_accessor :reason
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ attr_accessor :refund_application_fee
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
+ attr_accessor :reverse_transfer
+
+ def initialize(
+ amount: nil,
+ charge: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ instructions_email: nil,
+ metadata: nil,
+ origin: nil,
+ payment_intent: nil,
+ reason: nil,
+ refund_application_fee: nil,
+ reverse_transfer: nil
+ )
+ @amount = amount
+ @charge = charge
+ @currency = currency
+ @customer = customer
+ @expand = expand
+ @instructions_email = instructions_email
+ @metadata = metadata
+ @origin = origin
+ @payment_intent = payment_intent
+ @reason = reason
+ @refund_application_fee = refund_application_fee
+ @reverse_transfer = reverse_transfer
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Amount, in cents (or local equivalent).
+ attr_reader :amount
+ # Balance transaction that describes the impact on your account balance.
+ attr_reader :balance_transaction
+ # ID of the charge that's refunded.
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
+ attr_reader :description
+ # Attribute for field destination_details
+ attr_reader :destination_details
+ # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
+ attr_reader :failure_balance_transaction
+ # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.
+ attr_reader :failure_reason
+ # Unique identifier for the object.
+ attr_reader :id
+ # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
+ attr_reader :instructions_email
+ # 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.
+ attr_reader :metadata
+ # Attribute for field next_action
+ attr_reader :next_action
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the PaymentIntent that's refunded.
+ attr_reader :payment_intent
+ # Attribute for field presentment_details
+ attr_reader :presentment_details
+ # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).
+ attr_reader :reason
+ # This is the transaction number that appears on email receipts sent for this refund.
+ attr_reader :receipt_number
+ # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.
+ attr_reader :source_transfer_reversal
+ # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).
+ attr_reader :status
+ # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.
+ attr_reader :transfer_reversal
+
# Cancels a refund with a status of requires_action.
#
# You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
diff --git a/lib/stripe/resources/reporting/report_run.rb b/lib/stripe/resources/reporting/report_run.rb
index 932bcaf9..57256673 100644
--- a/lib/stripe/resources/reporting/report_run.rb
+++ b/lib/stripe/resources/reporting/report_run.rb
@@ -20,6 +20,147 @@ module Stripe
"reporting.report_run"
end
+ class Parameters < Stripe::StripeObject
+ # The set of output columns requested for inclusion in the report run.
+ attr_reader :columns
+ # Connected account ID by which to filter the report run.
+ attr_reader :connected_account
+ # Currency of objects to be included in the report run.
+ attr_reader :currency
+ # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value.
+ attr_reader :interval_end
+ # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value.
+ attr_reader :interval_start
+ # Payout ID by which to filter the report run.
+ attr_reader :payout
+ # Category of balance transactions to be included in the report run.
+ attr_reader :reporting_category
+ # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ attr_reader :timezone
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return Report Runs that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Parameters < Stripe::RequestParams
+ # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set.
+ attr_accessor :columns
+ # Connected account ID to filter for in the report run.
+ attr_accessor :connected_account
+ # Currency of objects to be included in the report run.
+ attr_accessor :currency
+ # Ending timestamp of data to be included in the report run (exclusive).
+ attr_accessor :interval_end
+ # Starting timestamp of data to be included in the report run.
+ attr_accessor :interval_start
+ # Payout ID by which to filter the report run.
+ attr_accessor :payout
+ # Category of balance transactions to be included in the report run.
+ attr_accessor :reporting_category
+ # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ attr_accessor :timezone
+
+ def initialize(
+ columns: nil,
+ connected_account: nil,
+ currency: nil,
+ interval_end: nil,
+ interval_start: nil,
+ payout: nil,
+ reporting_category: nil,
+ timezone: nil
+ )
+ @columns = columns
+ @connected_account = connected_account
+ @currency = currency
+ @interval_end = interval_end
+ @interval_start = interval_start
+ @payout = payout
+ @reporting_category = reporting_category
+ @timezone = timezone
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
+ attr_accessor :parameters
+ # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.
+ attr_accessor :report_type
+
+ def initialize(expand: nil, parameters: nil, report_type: nil)
+ @expand = expand
+ @parameters = parameters
+ @report_type = report_type
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # If something should go wrong during the run, a message about the failure (populated when
+ # `status=failed`).
+ attr_reader :error
+ # Unique identifier for the object.
+ attr_reader :id
+ # `true` if the report is run on live mode data and `false` if it is run on test mode data.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field parameters
+ attr_reader :parameters
+ # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`.
+ attr_reader :report_type
+ # The file object representing the result of the report run (populated when
+ # `status=succeeded`).
+ attr_reader :result
+ # Status of this report run. This will be `pending` when the run is initially created.
+ # When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
+ # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
+ attr_reader :status
+ # Timestamp at which this run successfully finished (populated when
+ # `status=succeeded`). Measured in seconds since the Unix epoch.
+ attr_reader :succeeded_at
+
# Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/reporting/report_type.rb b/lib/stripe/resources/reporting/report_type.rb
index a03a94c9..4642bd1f 100644
--- a/lib/stripe/resources/reporting/report_type.rb
+++ b/lib/stripe/resources/reporting/report_type.rb
@@ -19,6 +19,33 @@ module Stripe
"reporting.report_type"
end
+ class ListParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
+ attr_reader :data_available_end
+ # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
+ attr_reader :data_available_start
+ # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)
+ attr_reader :default_columns
+ # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Human-readable name of the Report Type
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # When this Report Type was latest updated. Measured in seconds since the Unix epoch.
+ attr_reader :updated
+ # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
+ attr_reader :version
+
# Returns a full list of Report Types.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/reserve_transaction.rb b/lib/stripe/resources/reserve_transaction.rb
new file mode 100644
index 00000000..f12d71ea
--- /dev/null
+++ b/lib/stripe/resources/reserve_transaction.rb
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ class ReserveTransaction < APIResource
+ OBJECT_NAME = "reserve_transaction"
+ def self.object_name
+ "reserve_transaction"
+ end
+
+ # Attribute for field amount
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Unique identifier for the object.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ end
+end
diff --git a/lib/stripe/resources/reversal.rb b/lib/stripe/resources/reversal.rb
index 5dd78311..9ae78179 100644
--- a/lib/stripe/resources/reversal.rb
+++ b/lib/stripe/resources/reversal.rb
@@ -23,6 +23,27 @@ module Stripe
"transfer_reversal"
end
+ # Amount, in cents (or local equivalent).
+ attr_reader :amount
+ # Balance transaction that describes the impact on your account balance.
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Linked payment refund for the transfer reversal.
+ attr_reader :destination_payment_refund
+ # Unique identifier for the object.
+ attr_reader :id
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # ID of the refund responsible for the transfer reversal.
+ attr_reader :source_refund
+ # ID of the transfer that was reversed.
+ attr_reader :transfer
+
def resource_url
"#{Transfer.resource_url}/#{CGI.escape(transfer)}/reversals" \
"/#{CGI.escape(id)}"
diff --git a/lib/stripe/resources/review.rb b/lib/stripe/resources/review.rb
index aa1e421e..c25c2c03 100644
--- a/lib/stripe/resources/review.rb
+++ b/lib/stripe/resources/review.rb
@@ -14,6 +14,105 @@ module Stripe
"review"
end
+ class IpAddressLocation < Stripe::StripeObject
+ # The city where the payment originated.
+ attr_reader :city
+ # Two-letter ISO code representing the country where the payment originated.
+ attr_reader :country
+ # The geographic latitude where the payment originated.
+ attr_reader :latitude
+ # The geographic longitude where the payment originated.
+ attr_reader :longitude
+ # The state/county/province/region where the payment originated.
+ attr_reader :region
+ end
+
+ class Session < Stripe::StripeObject
+ # The browser used in this browser session (e.g., `Chrome`).
+ attr_reader :browser
+ # Information about the device used for the browser session (e.g., `Samsung SM-G930T`).
+ attr_reader :device
+ # The platform for the browser session (e.g., `Macintosh`).
+ attr_reader :platform
+ # The version for the browser session (e.g., `61.0.3163.100`).
+ attr_reader :version
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return reviews that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class ApproveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # The ZIP or postal code of the card used, if applicable.
+ attr_reader :billing_zip
+ # The charge associated with this review.
+ attr_reader :charge
+ # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, or `canceled`.
+ attr_reader :closed_reason
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # The IP address where the payment originated.
+ attr_reader :ip_address
+ # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
+ attr_reader :ip_address_location
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # If `true`, the review needs action.
+ attr_reader :open
+ # The reason the review was opened. One of `rule` or `manual`.
+ attr_reader :opened_reason
+ # The PaymentIntent ID associated with this review, if one exists.
+ attr_reader :payment_intent
+ # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, or `canceled`.
+ attr_reader :reason
+ # Information related to the browsing session of the user who initiated the payment.
+ attr_reader :session
+
# Approves a Review object, closing it and removing it from the list of reviews.
def approve(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb
index b82ead41..e7884772 100644
--- a/lib/stripe/resources/setup_attempt.rb
+++ b/lib/stripe/resources/setup_attempt.rb
@@ -14,6 +14,374 @@ module Stripe
"setup_attempt"
end
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBecsDebit < Stripe::StripeObject; end
+ class BacsDebit < Stripe::StripeObject; end
+
+ class Bancontact < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ attr_reader :iban_last4
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ # Can be one of `en`, `de`, `fr`, or `nl`
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by Bancontact directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ end
+
+ class Boleto < Stripe::StripeObject; end
+
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ attr_reader :cvc_check
+ end
+
+ class ThreeDSecure < Stripe::StripeObject
+ # For authenticated transactions: how the customer was authenticated by
+ # the issuing bank.
+ attr_reader :authentication_flow
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
+ # indicating what degree of authentication was performed.
+ attr_reader :electronic_commerce_indicator
+ # Indicates the outcome of 3D Secure authentication.
+ attr_reader :result
+ # Additional information about why 3D Secure succeeded or failed based
+ # on the `result`.
+ attr_reader :result_reason
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
+ # (dsTransId) for this payment.
+ attr_reader :transaction_id
+ # The version of 3D Secure that was used.
+ attr_reader :version
+ end
+
+ class Wallet < Stripe::StripeObject
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ # Attribute for field apple_pay
+ attr_reader :apple_pay
+ # Attribute for field google_pay
+ attr_reader :google_pay
+ # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ attr_reader :type
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :brand
+ # Check results by Card networks on Card address and CVC at the time of authorization
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ attr_reader :issuer
+ # The last four digits of the card.
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ attr_reader :network
+ # Populated if this authorization used 3D Secure authentication.
+ attr_reader :three_d_secure
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ attr_reader :wallet
+ end
+
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ attr_reader :type
+ end
+ # The ID of the Card PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_card
+ # Details about payments collected offline.
+ attr_reader :offline
+ end
+
+ class Cashapp < Stripe::StripeObject; end
+
+ class Ideal < Stripe::StripeObject
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank.
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ attr_reader :iban_last4
+ # Owner's verified full name. Values are verified or provided by iDEAL directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ end
+
+ class KakaoPay < Stripe::StripeObject; end
+ class Klarna < Stripe::StripeObject; end
+ class KrCard < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+
+ class NaverPay < Stripe::StripeObject
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
+ attr_reader :buyer_id
+ end
+
+ class NzBankAccount < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject; end
+ class RevolutPay < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject; end
+
+ class Sofort < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ attr_reader :iban_last4
+ # Preferred language of the Sofort authorization page that the customer is redirected to.
+ # Can be one of `en`, `de`, `fr`, or `nl`
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by Sofort directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ end
+
+ class UsBankAccount < Stripe::StripeObject; end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field boleto
+ attr_reader :boleto
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # Attribute for field cashapp
+ attr_reader :cashapp
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field kakao_pay
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Attribute for field kr_card
+ attr_reader :kr_card
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field naver_pay
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ attr_reader :nz_bank_account
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field revolut_pay
+ attr_reader :revolut_pay
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class SetupError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ attr_reader :setup_intent
+ # Attribute for field source
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A filter on the list, based on the object `created` field. The value
+ # can be a string with an integer Unix timestamp or a
+ # dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return SetupAttempts created by the SetupIntent specified by
+ # this ID.
+ attr_accessor :setup_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ setup_intent: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @setup_intent = setup_intent
+ @starting_after = starting_after
+ end
+ end
+ # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
+ attr_reader :application
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_reader :attach_to_self
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
+ attr_reader :customer
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ attr_reader :flow_directions
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.
+ attr_reader :on_behalf_of
+ # ID of the payment method used with this SetupAttempt.
+ attr_reader :payment_method
+ # Attribute for field payment_method_details
+ attr_reader :payment_method_details
+ # The error encountered during this attempt to confirm the SetupIntent, if any.
+ attr_reader :setup_error
+ # ID of the SetupIntent that this attempt belongs to.
+ attr_reader :setup_intent
+ # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
+ attr_reader :status
+ # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.
+ attr_reader :usage
+
# Returns a list of SetupAttempts that associate with a provided SetupIntent.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/setup_attempts", params: params, opts: opts)
diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb
index e79b48a1..9ed8824f 100644
--- a/lib/stripe/resources/setup_intent.rb
+++ b/lib/stripe/resources/setup_intent.rb
@@ -33,6 +33,3479 @@ module Stripe
"setup_intent"
end
+ class AutomaticPaymentMethods < Stripe::StripeObject
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ attr_reader :allow_redirects
+ # Automatically calculates compatible payment methods
+ attr_reader :enabled
+ end
+
+ class LastSetupError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ attr_reader :setup_intent
+ # Attribute for field source
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ attr_reader :type
+ end
+
+ class NextAction < Stripe::StripeObject
+ class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject
+ class QrCode < Stripe::StripeObject
+ # The date (unix timestamp) when the QR code expires.
+ attr_reader :expires_at
+ # The image_url_png string used to render QR code
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ attr_reader :image_url_svg
+ end
+ # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration.
+ attr_reader :hosted_instructions_url
+ # The url for mobile redirect based auth
+ attr_reader :mobile_auth_url
+ # Attribute for field qr_code
+ attr_reader :qr_code
+ end
+
+ class RedirectToUrl < Stripe::StripeObject
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
+ attr_reader :return_url
+ # The URL you must redirect your customer to in order to authenticate.
+ attr_reader :url
+ end
+
+ class VerifyWithMicrodeposits < Stripe::StripeObject
+ # The timestamp when the microdeposits are expected to land.
+ attr_reader :arrival_date
+ # The URL for the hosted verification page, which allows customers to verify their bank account.
+ attr_reader :hosted_verification_url
+ # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
+ attr_reader :microdeposit_type
+ end
+ # Attribute for field cashapp_handle_redirect_or_display_qr_code
+ attr_reader :cashapp_handle_redirect_or_display_qr_code
+ # Attribute for field redirect_to_url
+ attr_reader :redirect_to_url
+ # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
+ attr_reader :type
+ # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
+ attr_reader :use_stripe_sdk
+ # Attribute for field verify_with_microdeposits
+ attr_reader :verify_with_microdeposits
+ end
+
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
+ # ID of the payment method configuration used.
+ attr_reader :id
+ # ID of the parent payment method configuration used.
+ attr_reader :parent
+ end
+
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # A URL for custom mandate text
+ attr_reader :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_reader :default_for
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ attr_reader :transaction_type
+ end
+ # Currency supported by the bank account
+ attr_reader :currency
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+
+ class AmazonPay < Stripe::StripeObject; end
+
+ class BacsDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ end
+
+ class Card < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Amount to be charged for future payments.
+ attr_reader :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_reader :amount_type
+ # 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).
+ attr_reader :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_reader :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_reader :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_reader :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_reader :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_reader :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_reader :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_reader :supported_types
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_reader :mandate_options
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.
+ attr_reader :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_reader :request_three_d_secure
+ end
+
+ class CardPresent < Stripe::StripeObject; end
+
+ class Link < Stripe::StripeObject
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_reader :persistent_token
+ end
+
+ class Paypal < Stripe::StripeObject
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_reader :billing_agreement_id
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_reader :return_url
+ end
+
+ class MandateOptions < Stripe::StripeObject
+ # Mandate collection method
+ attr_reader :collection_method
+ end
+ # Attribute for field financial_connections
+ attr_reader :financial_connections
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field amazon_pay
+ attr_reader :amazon_pay
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # Attribute for field link
+ attr_reader :link
+ # Attribute for field paypal
+ attr_reader :paypal
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_accessor :attach_to_self
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return SetupIntents for the customer specified by this customer ID.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return SetupIntents that associate with the specified payment method.
+ attr_accessor :payment_method
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ attach_to_self: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_method: nil,
+ starting_after: nil
+ )
+ @attach_to_self = attach_to_self
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_method = payment_method
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allow_redirects: nil, enabled: nil)
+ @allow_redirects = allow_redirects
+ @enabled = enabled
+ end
+ end
+
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
+ @currency = currency
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @currency = currency
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ )
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+
+ def initialize(persistent_token: nil)
+ @persistent_token = persistent_token
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_accessor :billing_agreement_id
+
+ def initialize(billing_agreement_id: nil)
+ @billing_agreement_id = billing_agreement_id
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @verification_method = verification_method
+ end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @amazon_pay = amazon_pay
+ @bacs_debit = bacs_debit
+ @card = card
+ @card_present = card_present
+ @link = link
+ @paypal = paypal
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class SingleUse < Stripe::RequestParams
+ # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+
+ def initialize(amount: nil, currency: nil)
+ @amount = amount
+ @currency = currency
+ end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_accessor :attach_to_self
+ # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
+ attr_accessor :automatic_payment_methods
+ # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
+ attr_accessor :confirm
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ attr_accessor :flow_directions
+ # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ attr_accessor :mandate_data
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account ID created for this SetupIntent.
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ attr_accessor :return_url
+ # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
+ #
+ # Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
+ attr_accessor :single_use
+ # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
+ attr_accessor :usage
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ attach_to_self: nil,
+ automatic_payment_methods: nil,
+ confirm: nil,
+ confirmation_token: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ mandate_data: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ return_url: nil,
+ single_use: nil,
+ usage: nil,
+ use_stripe_sdk: nil
+ )
+ @attach_to_self = attach_to_self
+ @automatic_payment_methods = automatic_payment_methods
+ @confirm = confirm
+ @confirmation_token = confirmation_token
+ @customer = customer
+ @description = description
+ @expand = expand
+ @flow_directions = flow_directions
+ @mandate_data = mandate_data
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @return_url = return_url
+ @single_use = single_use
+ @usage = usage
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
+ @currency = currency
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @currency = currency
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ )
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+
+ def initialize(persistent_token: nil)
+ @persistent_token = persistent_token
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_accessor :billing_agreement_id
+
+ def initialize(billing_agreement_id: nil)
+ @billing_agreement_id = billing_agreement_id
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @verification_method = verification_method
+ end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @amazon_pay = amazon_pay
+ @bacs_debit = bacs_debit
+ @card = card
+ @card_present = card_present
+ @link = link
+ @paypal = paypal
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_accessor :attach_to_self
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ attr_accessor :flow_directions
+ # 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`.
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+
+ def initialize(
+ attach_to_self: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ )
+ @attach_to_self = attach_to_self
+ @customer = customer
+ @description = description
+ @expand = expand
+ @flow_directions = flow_directions
+ @metadata = metadata
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate`
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(cancellation_reason: nil, expand: nil)
+ @cancellation_reason = cancellation_reason
+ @expand = expand
+ end
+ end
+
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
+ @currency = currency
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @currency = currency
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ )
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+
+ def initialize(persistent_token: nil)
+ @persistent_token = persistent_token
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_accessor :billing_agreement_id
+
+ def initialize(billing_agreement_id: nil)
+ @billing_agreement_id = billing_agreement_id
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @verification_method = verification_method
+ end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @amazon_pay = amazon_pay
+ @bacs_debit = bacs_debit
+ @card = card
+ @card_present = card_present
+ @link = link
+ @paypal = paypal
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field mandate_data
+ attr_accessor :mandate_data
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ attr_accessor :payment_method
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ attr_accessor :payment_method_options
+ # The URL to redirect your customer back to after they authenticate 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ attr_accessor :return_url
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ confirmation_token: nil,
+ expand: nil,
+ mandate_data: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ return_url: nil,
+ use_stripe_sdk: nil
+ )
+ @confirmation_token = confirmation_token
+ @expand = expand
+ @mandate_data = mandate_data
+ @payment_method = payment_method
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @return_url = return_url
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil)
+ @amounts = amounts
+ @descriptor_code = descriptor_code
+ @expand = expand
+ end
+ end
+ # ID of the Connect application that created the SetupIntent.
+ attr_reader :application
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_reader :attach_to_self
+ # Settings for dynamic payment methods compatible with this Setup Intent
+ attr_reader :automatic_payment_methods
+ # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
+ attr_reader :cancellation_reason
+ # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
+ #
+ # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ attr_reader :client_secret
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ attr_reader :flow_directions
+ # Unique identifier for the object.
+ attr_reader :id
+ # The error encountered in the previous SetupIntent confirmation.
+ attr_reader :last_setup_error
+ # The most recent SetupAttempt for this SetupIntent.
+ attr_reader :latest_attempt
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # ID of the multi use Mandate generated by the SetupIntent.
+ attr_reader :mandate
+ # 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.
+ attr_reader :metadata
+ # If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
+ attr_reader :next_action
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account (if any) for which the setup is intended.
+ attr_reader :on_behalf_of
+ # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead.
+ attr_reader :payment_method
+ # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent.
+ attr_reader :payment_method_configuration_details
+ # Payment method-specific configuration for this SetupIntent.
+ attr_reader :payment_method_options
+ # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
+ attr_reader :payment_method_types
+ # ID of the single_use Mandate generated by the SetupIntent.
+ attr_reader :single_use_mandate
+ # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
+ attr_reader :status
+ # Indicates how the payment method is intended to be used in the future.
+ #
+ # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
+ attr_reader :usage
+
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
#
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
diff --git a/lib/stripe/resources/shipping_rate.rb b/lib/stripe/resources/shipping_rate.rb
index 30d7867e..10c7d20e 100644
--- a/lib/stripe/resources/shipping_rate.rb
+++ b/lib/stripe/resources/shipping_rate.rb
@@ -14,6 +14,256 @@ module Stripe
"shipping_rate"
end
+ class DeliveryEstimate < Stripe::StripeObject
+ class Maximum < Stripe::StripeObject
+ # A unit of time.
+ attr_reader :unit
+ # Must be greater than 0.
+ attr_reader :value
+ end
+
+ class Minimum < Stripe::StripeObject
+ # A unit of time.
+ attr_reader :unit
+ # Must be greater than 0.
+ attr_reader :value
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_reader :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_reader :minimum
+ end
+
+ class FixedAmount < Stripe::StripeObject
+ class CurrencyOptions < Stripe::StripeObject
+ # A non-negative integer in cents representing how much to charge.
+ attr_reader :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_reader :tax_behavior
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_reader :currency_options
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return shipping rates that are active or inactive.
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return shipping rates for the given currency.
+ attr_accessor :currency
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @created = created
+ @currency = currency
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ expand: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @expand = expand
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(currency_options: nil)
+ @currency_options = currency_options
+ end
+ end
+ # Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(active: nil, expand: nil, fixed_amount: nil, metadata: nil, tax_behavior: nil)
+ @active = active
+ @expand = expand
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ end
+ end
+ # Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ attr_reader :active
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_reader :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_reader :display_name
+ # Attribute for field fixed_amount
+ attr_reader :fixed_amount
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_reader :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_reader :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_reader :type
+
# Creates a new shipping rate object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/shipping_rates", params: params, opts: opts)
diff --git a/lib/stripe/resources/sigma/scheduled_query_run.rb b/lib/stripe/resources/sigma/scheduled_query_run.rb
index be294ea0..805ca5cd 100644
--- a/lib/stripe/resources/sigma/scheduled_query_run.rb
+++ b/lib/stripe/resources/sigma/scheduled_query_run.rb
@@ -15,6 +15,51 @@ module Stripe
"scheduled_query_run"
end
+ class Error < Stripe::StripeObject
+ # Information about the run failure.
+ attr_reader :message
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # When the query was run, Sigma contained a snapshot of your Stripe data at this time.
+ attr_reader :data_load_time
+ # Attribute for field error
+ attr_reader :error
+ # The file object representing the results of the query.
+ attr_reader :file
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Time at which the result expires and is no longer available for download.
+ attr_reader :result_available_until
+ # SQL for the query.
+ attr_reader :sql
+ # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.
+ attr_reader :status
+ # Title of the query.
+ attr_reader :title
+
# Returns a list of scheduled query runs.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/source.rb b/lib/stripe/resources/source.rb
index 85b26120..b570b66d 100644
--- a/lib/stripe/resources/source.rb
+++ b/lib/stripe/resources/source.rb
@@ -24,6 +24,1204 @@ module Stripe
nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
+ class AchCreditTransfer < Stripe::StripeObject
+ # Attribute for field account_number
+ attr_reader :account_number
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field refund_account_holder_name
+ attr_reader :refund_account_holder_name
+ # Attribute for field refund_account_holder_type
+ attr_reader :refund_account_holder_type
+ # Attribute for field refund_routing_number
+ attr_reader :refund_routing_number
+ # Attribute for field routing_number
+ attr_reader :routing_number
+ # Attribute for field swift_code
+ attr_reader :swift_code
+ end
+
+ class AchDebit < Stripe::StripeObject
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field last4
+ attr_reader :last4
+ # Attribute for field routing_number
+ attr_reader :routing_number
+ # Attribute for field type
+ attr_reader :type
+ end
+
+ class AcssDebit < Stripe::StripeObject
+ # Attribute for field bank_address_city
+ attr_reader :bank_address_city
+ # Attribute for field bank_address_line_1
+ attr_reader :bank_address_line_1
+ # Attribute for field bank_address_line_2
+ attr_reader :bank_address_line_2
+ # Attribute for field bank_address_postal_code
+ attr_reader :bank_address_postal_code
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field category
+ attr_reader :category
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field last4
+ attr_reader :last4
+ # Attribute for field routing_number
+ attr_reader :routing_number
+ end
+
+ class Alipay < Stripe::StripeObject
+ # Attribute for field data_string
+ attr_reader :data_string
+ # Attribute for field native_url
+ attr_reader :native_url
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class AuBecsDebit < Stripe::StripeObject
+ # Attribute for field bsb_number
+ attr_reader :bsb_number
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field last4
+ attr_reader :last4
+ end
+
+ class Bancontact < Stripe::StripeObject
+ # Attribute for field bank_code
+ attr_reader :bank_code
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field bic
+ attr_reader :bic
+ # Attribute for field iban_last4
+ attr_reader :iban_last4
+ # Attribute for field preferred_language
+ attr_reader :preferred_language
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class Card < Stripe::StripeObject
+ # Attribute for field address_line1_check
+ attr_reader :address_line1_check
+ # Attribute for field address_zip_check
+ attr_reader :address_zip_check
+ # Attribute for field brand
+ attr_reader :brand
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field cvc_check
+ attr_reader :cvc_check
+ # Attribute for field description
+ attr_reader :description
+ # Attribute for field dynamic_last4
+ attr_reader :dynamic_last4
+ # Attribute for field exp_month
+ attr_reader :exp_month
+ # Attribute for field exp_year
+ attr_reader :exp_year
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field funding
+ attr_reader :funding
+ # Attribute for field iin
+ attr_reader :iin
+ # Attribute for field issuer
+ attr_reader :issuer
+ # Attribute for field last4
+ attr_reader :last4
+ # Attribute for field name
+ attr_reader :name
+ # Attribute for field three_d_secure
+ attr_reader :three_d_secure
+ # Attribute for field tokenization_method
+ attr_reader :tokenization_method
+ end
+
+ class CardPresent < Stripe::StripeObject
+ # Attribute for field application_cryptogram
+ attr_reader :application_cryptogram
+ # Attribute for field application_preferred_name
+ attr_reader :application_preferred_name
+ # Attribute for field authorization_code
+ attr_reader :authorization_code
+ # Attribute for field authorization_response_code
+ attr_reader :authorization_response_code
+ # Attribute for field brand
+ attr_reader :brand
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field cvm_type
+ attr_reader :cvm_type
+ # Attribute for field data_type
+ attr_reader :data_type
+ # Attribute for field dedicated_file_name
+ attr_reader :dedicated_file_name
+ # Attribute for field description
+ attr_reader :description
+ # Attribute for field emv_auth_data
+ attr_reader :emv_auth_data
+ # Attribute for field evidence_customer_signature
+ attr_reader :evidence_customer_signature
+ # Attribute for field evidence_transaction_certificate
+ attr_reader :evidence_transaction_certificate
+ # Attribute for field exp_month
+ attr_reader :exp_month
+ # Attribute for field exp_year
+ attr_reader :exp_year
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field funding
+ attr_reader :funding
+ # Attribute for field iin
+ attr_reader :iin
+ # Attribute for field issuer
+ attr_reader :issuer
+ # Attribute for field last4
+ attr_reader :last4
+ # Attribute for field pos_device_id
+ attr_reader :pos_device_id
+ # Attribute for field pos_entry_mode
+ attr_reader :pos_entry_mode
+ # Attribute for field read_method
+ attr_reader :read_method
+ # Attribute for field reader
+ attr_reader :reader
+ # Attribute for field terminal_verification_results
+ attr_reader :terminal_verification_results
+ # Attribute for field transaction_status_information
+ attr_reader :transaction_status_information
+ end
+
+ class CodeVerification < Stripe::StripeObject
+ # The number of attempts remaining to authenticate the source object with a verification code.
+ attr_reader :attempts_remaining
+ # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).
+ attr_reader :status
+ end
+
+ class Eps < Stripe::StripeObject
+ # Attribute for field reference
+ attr_reader :reference
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class Giropay < Stripe::StripeObject
+ # Attribute for field bank_code
+ attr_reader :bank_code
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field bic
+ attr_reader :bic
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class Ideal < Stripe::StripeObject
+ # Attribute for field bank
+ attr_reader :bank
+ # Attribute for field bic
+ attr_reader :bic
+ # Attribute for field iban_last4
+ attr_reader :iban_last4
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class Klarna < Stripe::StripeObject
+ # Attribute for field background_image_url
+ attr_reader :background_image_url
+ # Attribute for field client_token
+ attr_reader :client_token
+ # Attribute for field first_name
+ attr_reader :first_name
+ # Attribute for field last_name
+ attr_reader :last_name
+ # Attribute for field locale
+ attr_reader :locale
+ # Attribute for field logo_url
+ attr_reader :logo_url
+ # Attribute for field page_title
+ attr_reader :page_title
+ # Attribute for field pay_later_asset_urls_descriptive
+ attr_reader :pay_later_asset_urls_descriptive
+ # Attribute for field pay_later_asset_urls_standard
+ attr_reader :pay_later_asset_urls_standard
+ # Attribute for field pay_later_name
+ attr_reader :pay_later_name
+ # Attribute for field pay_later_redirect_url
+ attr_reader :pay_later_redirect_url
+ # Attribute for field pay_now_asset_urls_descriptive
+ attr_reader :pay_now_asset_urls_descriptive
+ # Attribute for field pay_now_asset_urls_standard
+ attr_reader :pay_now_asset_urls_standard
+ # Attribute for field pay_now_name
+ attr_reader :pay_now_name
+ # Attribute for field pay_now_redirect_url
+ attr_reader :pay_now_redirect_url
+ # Attribute for field pay_over_time_asset_urls_descriptive
+ attr_reader :pay_over_time_asset_urls_descriptive
+ # Attribute for field pay_over_time_asset_urls_standard
+ attr_reader :pay_over_time_asset_urls_standard
+ # Attribute for field pay_over_time_name
+ attr_reader :pay_over_time_name
+ # Attribute for field pay_over_time_redirect_url
+ attr_reader :pay_over_time_redirect_url
+ # Attribute for field payment_method_categories
+ attr_reader :payment_method_categories
+ # Attribute for field purchase_country
+ attr_reader :purchase_country
+ # Attribute for field purchase_type
+ attr_reader :purchase_type
+ # Attribute for field redirect_url
+ attr_reader :redirect_url
+ # Attribute for field shipping_delay
+ attr_reader :shipping_delay
+ # Attribute for field shipping_first_name
+ attr_reader :shipping_first_name
+ # Attribute for field shipping_last_name
+ attr_reader :shipping_last_name
+ end
+
+ class Multibanco < Stripe::StripeObject
+ # Attribute for field entity
+ attr_reader :entity
+ # Attribute for field reference
+ attr_reader :reference
+ # Attribute for field refund_account_holder_address_city
+ attr_reader :refund_account_holder_address_city
+ # Attribute for field refund_account_holder_address_country
+ attr_reader :refund_account_holder_address_country
+ # Attribute for field refund_account_holder_address_line1
+ attr_reader :refund_account_holder_address_line1
+ # Attribute for field refund_account_holder_address_line2
+ attr_reader :refund_account_holder_address_line2
+ # Attribute for field refund_account_holder_address_postal_code
+ attr_reader :refund_account_holder_address_postal_code
+ # Attribute for field refund_account_holder_address_state
+ attr_reader :refund_account_holder_address_state
+ # Attribute for field refund_account_holder_name
+ attr_reader :refund_account_holder_name
+ # Attribute for field refund_iban
+ attr_reader :refund_iban
+ end
+
+ class Owner < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class VerifiedAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Owner's address.
+ attr_reader :address
+ # Owner's email address.
+ attr_reader :email
+ # Owner's full name.
+ attr_reader :name
+ # Owner's phone number (including extension).
+ attr_reader :phone
+ # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_address
+ # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_email
+ # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_name
+ # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ attr_reader :verified_phone
+ end
+
+ class P24 < Stripe::StripeObject
+ # Attribute for field reference
+ attr_reader :reference
+ end
+
+ class Receiver < Stripe::StripeObject
+ # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.
+ attr_reader :address
+ # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.
+ attr_reader :amount_charged
+ # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.
+ attr_reader :amount_received
+ # The total amount that was returned to the customer. The amount returned is expressed in the source's currency.
+ attr_reader :amount_returned
+ # Type of refund attribute method, one of `email`, `manual`, or `none`.
+ attr_reader :refund_attributes_method
+ # Type of refund attribute status, one of `missing`, `requested`, or `available`.
+ attr_reader :refund_attributes_status
+ end
+
+ class Redirect < Stripe::StripeObject
+ # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.
+ attr_reader :failure_reason
+ # The URL you provide to redirect the customer to after they authenticated their payment.
+ attr_reader :return_url
+ # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).
+ attr_reader :status
+ # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.
+ attr_reader :url
+ end
+
+ class SepaCreditTransfer < Stripe::StripeObject
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field bic
+ attr_reader :bic
+ # Attribute for field iban
+ attr_reader :iban
+ # Attribute for field refund_account_holder_address_city
+ attr_reader :refund_account_holder_address_city
+ # Attribute for field refund_account_holder_address_country
+ attr_reader :refund_account_holder_address_country
+ # Attribute for field refund_account_holder_address_line1
+ attr_reader :refund_account_holder_address_line1
+ # Attribute for field refund_account_holder_address_line2
+ attr_reader :refund_account_holder_address_line2
+ # Attribute for field refund_account_holder_address_postal_code
+ attr_reader :refund_account_holder_address_postal_code
+ # Attribute for field refund_account_holder_address_state
+ attr_reader :refund_account_holder_address_state
+ # Attribute for field refund_account_holder_name
+ attr_reader :refund_account_holder_name
+ # Attribute for field refund_iban
+ attr_reader :refund_iban
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ # Attribute for field bank_code
+ attr_reader :bank_code
+ # Attribute for field branch_code
+ attr_reader :branch_code
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field last4
+ attr_reader :last4
+ # Attribute for field mandate_reference
+ attr_reader :mandate_reference
+ # Attribute for field mandate_url
+ attr_reader :mandate_url
+ end
+
+ class Sofort < Stripe::StripeObject
+ # Attribute for field bank_code
+ attr_reader :bank_code
+ # Attribute for field bank_name
+ attr_reader :bank_name
+ # Attribute for field bic
+ attr_reader :bic
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field iban_last4
+ attr_reader :iban_last4
+ # Attribute for field preferred_language
+ attr_reader :preferred_language
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class SourceOrder < Stripe::StripeObject
+ class Item < Stripe::StripeObject
+ # The amount (price) for this order item.
+ attr_reader :amount
+ # This currency of this order item. Required when `amount` is present.
+ attr_reader :currency
+ # Human-readable description for this order item.
+ attr_reader :description
+ # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).
+ attr_reader :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ attr_reader :quantity
+ # The type of this order item. Must be `sku`, `tax`, or `shipping`.
+ attr_reader :type
+ end
+
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_reader :carrier
+ # Recipient name.
+ attr_reader :name
+ # Recipient phone (including extension).
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_reader :tracking_number
+ end
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
+ attr_reader :amount
+ # 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).
+ attr_reader :currency
+ # The email address of the customer placing the order.
+ attr_reader :email
+ # List of items constituting the order.
+ attr_reader :items
+ # Attribute for field shipping
+ attr_reader :shipping
+ end
+
+ class ThreeDSecure < Stripe::StripeObject
+ # Attribute for field address_line1_check
+ attr_reader :address_line1_check
+ # Attribute for field address_zip_check
+ attr_reader :address_zip_check
+ # Attribute for field authenticated
+ attr_reader :authenticated
+ # Attribute for field brand
+ attr_reader :brand
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field country
+ attr_reader :country
+ # Attribute for field customer
+ attr_reader :customer
+ # Attribute for field cvc_check
+ attr_reader :cvc_check
+ # Attribute for field description
+ attr_reader :description
+ # Attribute for field dynamic_last4
+ attr_reader :dynamic_last4
+ # Attribute for field exp_month
+ attr_reader :exp_month
+ # Attribute for field exp_year
+ attr_reader :exp_year
+ # Attribute for field fingerprint
+ attr_reader :fingerprint
+ # Attribute for field funding
+ attr_reader :funding
+ # Attribute for field iin
+ attr_reader :iin
+ # Attribute for field issuer
+ attr_reader :issuer
+ # Attribute for field last4
+ attr_reader :last4
+ # Attribute for field name
+ attr_reader :name
+ # Attribute for field three_d_secure
+ attr_reader :three_d_secure
+ # Attribute for field tokenization_method
+ attr_reader :tokenization_method
+ end
+
+ class Wechat < Stripe::StripeObject
+ # Attribute for field prepay_id
+ attr_reader :prepay_id
+ # Attribute for field qr_code_url
+ attr_reader :qr_code_url
+ # Attribute for field statement_descriptor
+ attr_reader :statement_descriptor
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ attr_accessor :contact_email
+
+ def initialize(contact_email: nil)
+ @contact_email = contact_email
+ end
+ end
+
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ )
+ @date = date
+ @ip = ip
+ @offline = offline
+ @online = online
+ @status = status
+ @type = type
+ @user_agent = user_agent
+ end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ attr_accessor :notification_method
+
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ )
+ @acceptance = acceptance
+ @amount = amount
+ @currency = currency
+ @interval = interval
+ @notification_method = notification_method
+ end
+ end
+
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Owner's address.
+ attr_accessor :address
+ # Owner's email address.
+ attr_accessor :email
+ # Owner's full name.
+ attr_accessor :name
+ # Owner's phone number.
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ attr_accessor :amount
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field description
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ attr_accessor :quantity
+ # Attribute for param field type
+ attr_accessor :type
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @parent = parent
+ @quantity = quantity
+ @type = type
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # List of items constituting the order.
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ attr_accessor :shipping
+
+ def initialize(items: nil, shipping: nil)
+ @items = items
+ @shipping = shipping
+ end
+ end
+ # Amount associated with the source.
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ attr_accessor :mandate
+ # 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`.
+ attr_accessor :metadata
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ attr_accessor :owner
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ attr_accessor :source_order
+
+ def initialize(
+ amount: nil,
+ expand: nil,
+ mandate: nil,
+ metadata: nil,
+ owner: nil,
+ source_order: nil
+ )
+ @amount = amount
+ @expand = expand
+ @mandate = mandate
+ @metadata = metadata
+ @owner = owner
+ @source_order = source_order
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ attr_accessor :contact_email
+
+ def initialize(contact_email: nil)
+ @contact_email = contact_email
+ end
+ end
+
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ )
+ @date = date
+ @ip = ip
+ @offline = offline
+ @online = online
+ @status = status
+ @type = type
+ @user_agent = user_agent
+ end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ attr_accessor :notification_method
+
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ )
+ @acceptance = acceptance
+ @amount = amount
+ @currency = currency
+ @interval = interval
+ @notification_method = notification_method
+ end
+ end
+
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Owner's address.
+ attr_accessor :address
+ # Owner's email address.
+ attr_accessor :email
+ # Owner's full name.
+ attr_accessor :name
+ # Owner's phone number.
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Receiver < Stripe::RequestParams
+ # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
+ attr_accessor :refund_attributes_method
+
+ def initialize(refund_attributes_method: nil)
+ @refund_attributes_method = refund_attributes_method
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
+ attr_accessor :return_url
+
+ def initialize(return_url: nil)
+ @return_url = return_url
+ end
+ end
+
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ attr_accessor :amount
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field description
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ attr_accessor :quantity
+ # Attribute for param field type
+ attr_accessor :type
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @parent = parent
+ @quantity = quantity
+ @type = type
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # List of items constituting the order.
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ attr_accessor :shipping
+
+ def initialize(items: nil, shipping: nil)
+ @items = items
+ @shipping = shipping
+ end
+ end
+ # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
+ attr_accessor :amount
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
+ attr_accessor :currency
+ # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
+ attr_accessor :flow
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ attr_accessor :mandate
+ # Attribute for param field metadata
+ attr_accessor :metadata
+ # The source to share.
+ attr_accessor :original_source
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ attr_accessor :owner
+ # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
+ attr_accessor :receiver
+ # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
+ attr_accessor :redirect
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ attr_accessor :source_order
+ # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
+ attr_accessor :statement_descriptor
+ # An optional token used to create the source. When passed, token properties will override source parameters.
+ attr_accessor :token
+ # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
+ attr_accessor :type
+ # Attribute for param field usage
+ attr_accessor :usage
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ flow: nil,
+ mandate: nil,
+ metadata: nil,
+ original_source: nil,
+ owner: nil,
+ receiver: nil,
+ redirect: nil,
+ source_order: nil,
+ statement_descriptor: nil,
+ token: nil,
+ type: nil,
+ usage: nil
+ )
+ @amount = amount
+ @currency = currency
+ @customer = customer
+ @expand = expand
+ @flow = flow
+ @mandate = mandate
+ @metadata = metadata
+ @original_source = original_source
+ @owner = owner
+ @receiver = receiver
+ @redirect = redirect
+ @source_order = source_order
+ @statement_descriptor = statement_descriptor
+ @token = token
+ @type = type
+ @usage = usage
+ end
+ end
+
+ class VerifyParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The values needed to verify the source.
+ attr_accessor :values
+
+ def initialize(expand: nil, values: nil)
+ @expand = expand
+ @values = values
+ end
+ end
+ # Attribute for field ach_credit_transfer
+ attr_reader :ach_credit_transfer
+ # Attribute for field ach_debit
+ attr_reader :ach_debit
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # Attribute for field alipay
+ attr_reader :alipay
+ # 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. The field defaults to “unspecified”.
+ attr_reader :allow_redisplay
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.
+ attr_reader :amount
+ # Attribute for field au_becs_debit
+ attr_reader :au_becs_debit
+ # Attribute for field bancontact
+ attr_reader :bancontact
+ # Attribute for field card
+ attr_reader :card
+ # Attribute for field card_present
+ attr_reader :card_present
+ # The client secret of the source. Used for client-side retrieval using a publishable key.
+ attr_reader :client_secret
+ # Attribute for field code_verification
+ attr_reader :code_verification
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.
+ attr_reader :currency
+ # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
+ attr_reader :customer
+ # Attribute for field eps
+ attr_reader :eps
+ # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.
+ attr_reader :flow
+ # Attribute for field giropay
+ attr_reader :giropay
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field ideal
+ attr_reader :ideal
+ # Attribute for field klarna
+ attr_reader :klarna
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # Attribute for field multibanco
+ attr_reader :multibanco
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ attr_reader :owner
+ # Attribute for field p24
+ attr_reader :p24
+ # Attribute for field receiver
+ attr_reader :receiver
+ # Attribute for field redirect
+ attr_reader :redirect
+ # Attribute for field sepa_credit_transfer
+ attr_reader :sepa_credit_transfer
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ attr_reader :sofort
+ # Attribute for field source_order
+ attr_reader :source_order
+ # Extra information about a source. This will appear on your customer's statement every time you charge the source.
+ attr_reader :statement_descriptor
+ # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.
+ attr_reader :status
+ # Attribute for field three_d_secure
+ attr_reader :three_d_secure
+ # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.
+ attr_reader :type
+ # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
+ attr_reader :usage
+ # Attribute for field wechat
+ attr_reader :wechat
+
# Creates a new source object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/sources", params: params, opts: opts)
diff --git a/lib/stripe/resources/source_mandate_notification.rb b/lib/stripe/resources/source_mandate_notification.rb
new file mode 100644
index 00000000..4cfd71fb
--- /dev/null
+++ b/lib/stripe/resources/source_mandate_notification.rb
@@ -0,0 +1,66 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ # Source mandate notifications should be created when a notification related to
+ # a source mandate must be sent to the payer. They will trigger a webhook or
+ # deliver an email to the customer.
+ class SourceMandateNotification < APIResource
+ OBJECT_NAME = "source_mandate_notification"
+ def self.object_name
+ "source_mandate_notification"
+ end
+
+ class AcssDebit < Stripe::StripeObject
+ # The statement descriptor associate with the debit.
+ attr_reader :statement_descriptor
+ end
+
+ class BacsDebit < Stripe::StripeObject
+ # Last 4 digits of the account number associated with the debit.
+ attr_reader :last4
+ end
+
+ class SepaDebit < Stripe::StripeObject
+ # SEPA creditor ID.
+ attr_reader :creditor_identifier
+ # Last 4 digits of the account number associated with the debit.
+ attr_reader :last4
+ # Mandate reference associated with the debit.
+ attr_reader :mandate_reference
+ end
+ # Attribute for field acss_debit
+ attr_reader :acss_debit
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.
+ attr_reader :amount
+ # Attribute for field bacs_debit
+ attr_reader :bacs_debit
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.
+ attr_reader :reason
+ # Attribute for field sepa_debit
+ attr_reader :sepa_debit
+ # `Source` objects allow you to accept a variety of payment methods. They
+ # represent a customer's payment instrument, and can be used with the Stripe API
+ # just like a `Card` object: once chargeable, they can be charged, or can be
+ # attached to customers.
+ #
+ # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).
+ # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).
+ # This newer API provides access to our latest features and payment method types.
+ #
+ # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
+ attr_reader :source
+ # The status of the mandate notification. Valid statuses are `pending` or `submitted`.
+ attr_reader :status
+ # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.
+ attr_reader :type
+ end
+end
diff --git a/lib/stripe/resources/source_transaction.rb b/lib/stripe/resources/source_transaction.rb
index 53864e77..39ad030e 100644
--- a/lib/stripe/resources/source_transaction.rb
+++ b/lib/stripe/resources/source_transaction.rb
@@ -11,5 +11,90 @@ module Stripe
def self.object_name
"source_transaction"
end
+
+ class AchCreditTransfer < Stripe::StripeObject
+ # Customer data associated with the transfer.
+ attr_reader :customer_data
+ # Bank account fingerprint associated with the transfer.
+ attr_reader :fingerprint
+ # Last 4 digits of the account number associated with the transfer.
+ attr_reader :last4
+ # Routing number associated with the transfer.
+ attr_reader :routing_number
+ end
+
+ class ChfCreditTransfer < Stripe::StripeObject
+ # Reference associated with the transfer.
+ attr_reader :reference
+ # Sender's country address.
+ attr_reader :sender_address_country
+ # Sender's line 1 address.
+ attr_reader :sender_address_line1
+ # Sender's bank account IBAN.
+ attr_reader :sender_iban
+ # Sender's name.
+ attr_reader :sender_name
+ end
+
+ class GbpCreditTransfer < Stripe::StripeObject
+ # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.
+ attr_reader :fingerprint
+ # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported.
+ attr_reader :funding_method
+ # Last 4 digits of sender account number associated with the transfer.
+ attr_reader :last4
+ # Sender entered arbitrary information about the transfer.
+ attr_reader :reference
+ # Sender account number associated with the transfer.
+ attr_reader :sender_account_number
+ # Sender name associated with the transfer.
+ attr_reader :sender_name
+ # Sender sort code associated with the transfer.
+ attr_reader :sender_sort_code
+ end
+
+ class PaperCheck < Stripe::StripeObject
+ # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.
+ attr_reader :available_at
+ # Comma-separated list of invoice IDs associated with the paper check.
+ attr_reader :invoices
+ end
+
+ class SepaCreditTransfer < Stripe::StripeObject
+ # Reference associated with the transfer.
+ attr_reader :reference
+ # Sender's bank account IBAN.
+ attr_reader :sender_iban
+ # Sender's name.
+ attr_reader :sender_name
+ end
+ # Attribute for field ach_credit_transfer
+ attr_reader :ach_credit_transfer
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.
+ attr_reader :amount
+ # Attribute for field chf_credit_transfer
+ attr_reader :chf_credit_transfer
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # Attribute for field gbp_credit_transfer
+ attr_reader :gbp_credit_transfer
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field paper_check
+ attr_reader :paper_check
+ # Attribute for field sepa_credit_transfer
+ attr_reader :sepa_credit_transfer
+ # The ID of the source this transaction is attached to.
+ attr_reader :source
+ # The status of the transaction, one of `succeeded`, `pending`, or `failed`.
+ attr_reader :status
+ # The type of source this transaction is attached to.
+ attr_reader :type
end
end
diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb
index 542fd7bf..4542ef1f 100644
--- a/lib/stripe/resources/subscription.rb
+++ b/lib/stripe/resources/subscription.rb
@@ -16,6 +16,1692 @@ module Stripe
"subscription"
end
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on this subscription.
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ end
+
+ class BillingCycleAnchorConfig < Stripe::StripeObject
+ # The day of the month of the billing_cycle_anchor.
+ attr_reader :day_of_month
+ # The hour of the day of the billing_cycle_anchor.
+ attr_reader :hour
+ # The minute of the hour of the billing_cycle_anchor.
+ attr_reader :minute
+ # The month to start full cycle billing periods.
+ attr_reader :month
+ # The second of the minute of the billing_cycle_anchor.
+ attr_reader :second
+ end
+
+ class CancellationDetails < Stripe::StripeObject
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ attr_reader :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ attr_reader :feedback
+ # Why this subscription was canceled.
+ attr_reader :reason
+ end
+
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ attr_reader :account_tax_ids
+ # Attribute for field issuer
+ attr_reader :issuer
+ end
+
+ class PauseCollection < Stripe::StripeObject
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ attr_reader :behavior
+ # The time after which the subscription will resume collecting payments.
+ attr_reader :resumes_at
+ end
+
+ class PaymentSettings < Stripe::StripeObject
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Transaction type of the mandate.
+ attr_reader :transaction_type
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+
+ class Bancontact < Stripe::StripeObject
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_reader :preferred_language
+ end
+
+ class Card < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Amount to be charged for future payments.
+ attr_reader :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_reader :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_reader :description
+ end
+ # Attribute for field mandate_options
+ attr_reader :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ attr_reader :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_reader :request_three_d_secure
+ end
+
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ attr_reader :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_reader :funding_type
+ end
+
+ class Konbini < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject; end
+
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ attr_reader :prefetch
+ end
+ # Attribute for field financial_connections
+ attr_reader :financial_connections
+ # Bank account verification method.
+ attr_reader :verification_method
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.
+ attr_reader :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
+ attr_reader :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
+ attr_reader :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
+ attr_reader :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
+ attr_reader :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.
+ attr_reader :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
+ attr_reader :us_bank_account
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ attr_reader :payment_method_options
+ # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
+ attr_reader :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.
+ attr_reader :save_default_payment_method
+ end
+
+ class PendingInvoiceItemInterval < Stripe::StripeObject
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ attr_reader :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ attr_reader :interval_count
+ end
+
+ class PendingUpdate < Stripe::StripeObject
+ # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
+ attr_reader :billing_cycle_anchor
+ # The point after which the changes reflected by this update will be discarded and no longer applied.
+ attr_reader :expires_at
+ # List of subscription items, each with an attached plan, that will be set if the update is applied.
+ attr_reader :subscription_items
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.
+ attr_reader :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_reader :trial_from_plan
+ end
+
+ class TransferData < Stripe::StripeObject
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ attr_reader :destination
+ end
+
+ class TrialSettings < Stripe::StripeObject
+ class EndBehavior < Stripe::StripeObject
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_reader :missing_payment_method
+ end
+ # Defines how a subscription behaves when a free trial ends.
+ attr_reader :end_behavior
+ end
+
+ class CancelParams < Stripe::RequestParams
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ attr_accessor :feedback
+
+ def initialize(comment: nil, feedback: nil)
+ @comment = comment
+ @feedback = feedback
+ end
+ end
+ # Details about why this subscription was cancelled
+ attr_accessor :cancellation_details
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
+ attr_accessor :invoice_now
+ # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
+ attr_accessor :prorate
+
+ def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil)
+ @cancellation_details = cancellation_details
+ @expand = expand
+ @invoice_now = invoice_now
+ @prorate = prorate
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ attr_accessor :feedback
+
+ def initialize(comment: nil, feedback: nil)
+ @comment = comment
+ @feedback = feedback
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Subscription item to update.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @clear_usage = clear_usage
+ @deleted = deleted
+ @discounts = discounts
+ @id = id
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class PauseCollection < Stripe::RequestParams
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ attr_accessor :behavior
+ # The time after which the subscription will resume collecting payments.
+ attr_accessor :resumes_at
+
+ def initialize(behavior: nil, resumes_at: nil)
+ @behavior = behavior
+ @resumes_at = resumes_at
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+
+ def initialize(amount: nil, amount_type: nil, description: nil)
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil)
+ @mandate_options = mandate_options
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ attr_accessor :save_default_payment_method
+
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ )
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @save_default_payment_method = save_default_payment_method
+ end
+ end
+
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ attr_accessor :automatic_tax
+ # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ attr_accessor :cancel_at_period_end
+ # Details about why this subscription was cancelled
+ attr_accessor :cancellation_details
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :default_tax_rates
+ # 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.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ attr_accessor :items
+ # 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`.
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ attr_accessor :on_behalf_of
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ attr_accessor :pause_collection
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
+ attr_accessor :proration_date
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_from_plan
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancellation_details: nil,
+ collection_method: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ pause_collection: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_settings: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @cancel_at = cancel_at
+ @cancel_at_period_end = cancel_at_period_end
+ @cancellation_details = cancellation_details
+ @collection_method = collection_method
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @invoice_settings = invoice_settings
+ @items = items
+ @metadata = metadata
+ @off_session = off_session
+ @on_behalf_of = on_behalf_of
+ @pause_collection = pause_collection
+ @payment_behavior = payment_behavior
+ @payment_settings = payment_settings
+ @pending_invoice_item_interval = pending_invoice_item_interval
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @transfer_data = transfer_data
+ @trial_end = trial_end
+ @trial_from_plan = trial_from_plan
+ @trial_settings = trial_settings
+ end
+ end
+
+ class DeleteDiscountParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CurrentPeriodEnd < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CurrentPeriodStart < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Filter subscriptions by their automatic tax settings.
+ attr_accessor :automatic_tax
+ # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
+ attr_accessor :collection_method
+ # Only return subscriptions that were created during the given date interval.
+ attr_accessor :created
+ # Only return subscriptions whose current_period_end falls within the given date interval.
+ attr_accessor :current_period_end
+ # Only return subscriptions whose current_period_start falls within the given date interval.
+ attr_accessor :current_period_start
+ # The ID of the customer whose subscriptions will be retrieved.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The ID of the plan whose subscriptions will be retrieved.
+ attr_accessor :plan
+ # Filter for subscriptions that contain this recurring price ID.
+ attr_accessor :price
+ # 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.
+ attr_accessor :starting_after
+ # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
+ attr_accessor :status
+ # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.
+ attr_accessor :test_clock
+
+ def initialize(
+ automatic_tax: nil,
+ collection_method: nil,
+ created: nil,
+ current_period_end: nil,
+ current_period_start: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ plan: nil,
+ price: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ )
+ @automatic_tax = automatic_tax
+ @collection_method = collection_method
+ @created = created
+ @current_period_end = current_period_end
+ @current_period_start = current_period_start
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @plan = plan
+ @price = price
+ @starting_after = starting_after
+ @status = status
+ @test_clock = test_clock
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class BillingCycleAnchorConfig < Stripe::RequestParams
+ # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
+ attr_accessor :day_of_month
+ # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
+ attr_accessor :hour
+ # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
+ attr_accessor :minute
+ # The month to start full cycle billing periods. Ranges from 1 to 12.
+ attr_accessor :month
+ # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
+ attr_accessor :second
+
+ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
+ @day_of_month = day_of_month
+ @hour = hour
+ @minute = minute
+ @month = month
+ @second = second
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # 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`.
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for this item.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+
+ def initialize(amount: nil, amount_type: nil, description: nil)
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil)
+ @mandate_options = mandate_options
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ attr_accessor :save_default_payment_method
+
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ )
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @save_default_payment_method = save_default_payment_method
+ end
+ end
+
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ attr_accessor :automatic_tax
+ # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
+ attr_accessor :backdate_start_date
+ # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
+ attr_accessor :billing_cycle_anchor
+ # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
+ attr_accessor :billing_cycle_anchor_config
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ attr_accessor :cancel_at_period_end
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # The identifier of the customer to subscribe.
+ attr_accessor :customer
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ attr_accessor :default_tax_rates
+ # 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.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ attr_accessor :items
+ # 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`.
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Only applies to subscriptions with `collection_method=charge_automatically`.
+ #
+ # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ #
+ # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
+ #
+ # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_from_plan
+ # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ backdate_start_date: nil,
+ billing_cycle_anchor: nil,
+ billing_cycle_anchor_config: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ collection_method: nil,
+ currency: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @backdate_start_date = backdate_start_date
+ @billing_cycle_anchor = billing_cycle_anchor
+ @billing_cycle_anchor_config = billing_cycle_anchor_config
+ @cancel_at = cancel_at
+ @cancel_at_period_end = cancel_at_period_end
+ @collection_method = collection_method
+ @currency = currency
+ @customer = customer
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @invoice_settings = invoice_settings
+ @items = items
+ @metadata = metadata
+ @off_session = off_session
+ @on_behalf_of = on_behalf_of
+ @payment_behavior = payment_behavior
+ @payment_settings = payment_settings
+ @pending_invoice_item_interval = pending_invoice_item_interval
+ @proration_behavior = proration_behavior
+ @transfer_data = transfer_data
+ @trial_end = trial_end
+ @trial_from_plan = trial_from_plan
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class ResumeParams < Stripe::RequestParams
+ # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+
+ def initialize(
+ billing_cycle_anchor: nil,
+ expand: nil,
+ proration_behavior: nil,
+ proration_date: nil
+ )
+ @billing_cycle_anchor = billing_cycle_anchor
+ @expand = expand
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ end
+ end
+ # ID of the Connect Application that created the subscription.
+ attr_reader :application
+ # 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.
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
+ attr_reader :billing_cycle_anchor
+ # The fixed values used to calculate the `billing_cycle_anchor`.
+ attr_reader :billing_cycle_anchor_config
+ # A date in the future at which the subscription will automatically get canceled
+ attr_reader :cancel_at
+ # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
+ attr_reader :cancel_at_period_end
+ # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
+ attr_reader :canceled_at
+ # Details about why this subscription was cancelled
+ attr_reader :cancellation_details
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
+ attr_reader :collection_method
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # ID of the customer who owns the subscription.
+ attr_reader :customer
+ # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
+ attr_reader :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_reader :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_reader :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ attr_reader :default_tax_rates
+ # 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.
+ attr_reader :description
+ # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
+ attr_reader :discounts
+ # If the subscription has ended, the date the subscription ended.
+ attr_reader :ended_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field invoice_settings
+ attr_reader :invoice_settings
+ # List of subscription items, each with an attached price.
+ attr_reader :items
+ # The most recent invoice this subscription has generated.
+ attr_reader :latest_invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
+ attr_reader :next_pending_invoice_item_invoice
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details.
+ attr_reader :on_behalf_of
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ attr_reader :pause_collection
+ # Payment settings passed on to invoices created by the subscription.
+ attr_reader :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ attr_reader :pending_invoice_item_interval
+ # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
+ attr_reader :pending_setup_intent
+ # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
+ attr_reader :pending_update
+ # The schedule attached to the subscription
+ attr_reader :schedule
+ # Date when the subscription was first created. The date might differ from the `created` date due to backdating.
+ attr_reader :start_date
+ # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`.
+ #
+ # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
+ #
+ # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
+ #
+ # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
+ #
+ # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
+ #
+ # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
+ attr_reader :status
+ # ID of the test clock this subscription belongs to.
+ attr_reader :test_clock
+ # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
+ attr_reader :transfer_data
+ # If the subscription has a trial, the end of that trial.
+ attr_reader :trial_end
+ # Settings related to subscription trials.
+ attr_reader :trial_settings
+ # If the subscription has a trial, the beginning of that trial.
+ attr_reader :trial_start
+
# Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
#
# Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
diff --git a/lib/stripe/resources/subscription_item.rb b/lib/stripe/resources/subscription_item.rb
index a4c979be..829e736f 100644
--- a/lib/stripe/resources/subscription_item.rb
+++ b/lib/stripe/resources/subscription_item.rb
@@ -15,6 +15,320 @@ module Stripe
"subscription_item"
end
+ class DeleteParams < Stripe::RequestParams
+ # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
+ attr_accessor :clear_usage
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+
+ def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil)
+ @clear_usage = clear_usage
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ attr_accessor :off_session
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ attr_accessor :payment_behavior
+ # The identifier of the new plan for this subscription item.
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ off_session: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @off_session = off_session
+ @payment_behavior = payment_behavior
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The ID of the subscription whose items will be retrieved.
+ attr_accessor :subscription
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ subscription: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @subscription = subscription
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ attr_accessor :payment_behavior
+ # The identifier of the plan to add to the subscription.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ attr_accessor :quantity
+ # The identifier of the subscription to modify.
+ attr_accessor :subscription
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @payment_behavior = payment_behavior
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @quantity = quantity
+ @subscription = subscription
+ @tax_rates = tax_rates
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # The end time of this subscription item's current billing period.
+ attr_reader :current_period_end
+ # The start time of this subscription item's current billing period.
+ attr_reader :current_period_start
+ # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
+ attr_reader :discounts
+ # Unique identifier for the object.
+ attr_reader :id
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
+ #
+ # Plans define the base price, currency, and billing cycle for recurring purchases of products.
+ # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
+ #
+ # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
+ attr_reader :plan
+ # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
+ # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
+ #
+ # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
+ attr_reader :price
+ # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.
+ attr_reader :quantity
+ # The `subscription` this `subscription_item` belongs to.
+ attr_reader :subscription
+ # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
+ attr_reader :tax_rates
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Adds a new item to an existing subscription. No existing items will be changed or replaced.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb
index 87249a32..d962fb9a 100644
--- a/lib/stripe/resources/subscription_schedule.rb
+++ b/lib/stripe/resources/subscription_schedule.rb
@@ -15,6 +15,1287 @@ module Stripe
"subscription_schedule"
end
+ class CurrentPhase < Stripe::StripeObject
+ # The end of this phase of the subscription schedule.
+ attr_reader :end_date
+ # The start of this phase of the subscription schedule.
+ attr_reader :start_date
+ end
+
+ class DefaultSettings < Stripe::StripeObject
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on invoices created during this phase.
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ end
+
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ attr_reader :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_reader :days_until_due
+ # Attribute for field issuer
+ attr_reader :issuer
+ end
+
+ class TransferData < Stripe::StripeObject
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ attr_reader :destination
+ end
+ # 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 during this phase of the schedule.
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_reader :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
+ attr_reader :collection_method
+ # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_reader :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_reader :description
+ # Attribute for field invoice_settings
+ attr_reader :invoice_settings
+ # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
+ attr_reader :on_behalf_of
+ # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
+ attr_reader :transfer_data
+ end
+
+ class Phase < Stripe::StripeObject
+ class AddInvoiceItem < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # ID of the coupon to create a new discount for.
+ attr_reader :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_reader :discount
+ # ID of the promotion code to create a new discount for.
+ attr_reader :promotion_code
+ end
+ # The stackable discounts that will be applied to the item.
+ attr_reader :discounts
+ # ID of the price used to generate the invoice item.
+ attr_reader :price
+ # The quantity of the invoice item.
+ attr_reader :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_reader :tax_rates
+ end
+
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on invoices created during this phase.
+ attr_reader :enabled
+ # 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.
+ attr_reader :liability
+ end
+
+ class Discount < Stripe::StripeObject
+ # ID of the coupon to create a new discount for.
+ attr_reader :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_reader :discount
+ # ID of the promotion code to create a new discount for.
+ attr_reader :promotion_code
+ end
+
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ attr_reader :account
+ # Type of the account referenced.
+ attr_reader :type
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_reader :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_reader :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_reader :issuer
+ end
+
+ class Item < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # ID of the coupon to create a new discount for.
+ attr_reader :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_reader :discount
+ # ID of the promotion code to create a new discount for.
+ attr_reader :promotion_code
+ end
+ # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
+ attr_reader :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
+ attr_reader :metadata
+ # ID of the plan to which the customer should be subscribed.
+ attr_reader :plan
+ # ID of the price to which the customer should be subscribed.
+ attr_reader :price
+ # Quantity of the plan to which the customer should be subscribed.
+ attr_reader :quantity
+ # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
+ attr_reader :tax_rates
+ end
+
+ class TransferData < Stripe::StripeObject
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ attr_reader :destination
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
+ attr_reader :add_invoice_items
+ # 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 during this phase of the schedule.
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ attr_reader :automatic_tax
+ # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_reader :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
+ attr_reader :collection_method
+ # 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).
+ attr_reader :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_reader :default_payment_method
+ # The default tax rates to apply to the subscription during this phase of the subscription schedule.
+ attr_reader :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_reader :description
+ # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
+ attr_reader :discounts
+ # The end of this phase of the subscription schedule.
+ attr_reader :end_date
+ # The invoice settings applicable during this phase.
+ attr_reader :invoice_settings
+ # Subscription items to configure the subscription to during this phase of the subscription schedule.
+ attr_reader :items
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
+ attr_reader :metadata
+ # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
+ attr_reader :on_behalf_of
+ # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
+ attr_reader :proration_behavior
+ # The start of this phase of the subscription schedule.
+ attr_reader :start_date
+ # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
+ attr_reader :transfer_data
+ # When the trial ends within the phase.
+ attr_reader :trial_end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class CanceledAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CompletedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class ReleasedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return subscription schedules that were created canceled the given date interval.
+ attr_accessor :canceled_at
+ # Only return subscription schedules that completed during the given date interval.
+ attr_accessor :completed_at
+ # Only return subscription schedules that were created during the given date interval.
+ attr_accessor :created
+ # Only return subscription schedules for the given customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return subscription schedules that were released during the given date interval.
+ attr_accessor :released_at
+ # Only return subscription schedules that have not started yet.
+ attr_accessor :scheduled
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ canceled_at: nil,
+ completed_at: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ released_at: nil,
+ scheduled: nil,
+ starting_after: nil
+ )
+ @canceled_at = canceled_at
+ @completed_at = completed_at
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @released_at = released_at
+ @scheduled = scheduled
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ )
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @default_payment_method = default_payment_method
+ @description = description
+ @invoice_settings = invoice_settings
+ @on_behalf_of = on_behalf_of
+ @transfer_data = transfer_data
+ end
+ end
+
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ attr_accessor :proration_behavior
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ attr_accessor :trial_end
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @currency = currency
+ @default_payment_method = default_payment_method
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @end_date = end_date
+ @invoice_settings = invoice_settings
+ @items = items
+ @iterations = iterations
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @transfer_data = transfer_data
+ @trial = trial
+ @trial_end = trial_end
+ end
+ end
+ # The identifier of the customer to create the subscription schedule for.
+ attr_accessor :customer
+ # Object representing the subscription schedule's default settings.
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
+ attr_accessor :from_subscription
+ # 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`.
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ attr_accessor :phases
+ # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
+ attr_accessor :start_date
+
+ def initialize(
+ customer: nil,
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ from_subscription: nil,
+ metadata: nil,
+ phases: nil,
+ start_date: nil
+ )
+ @customer = customer
+ @default_settings = default_settings
+ @end_behavior = end_behavior
+ @expand = expand
+ @from_subscription = from_subscription
+ @metadata = metadata
+ @phases = phases
+ @start_date = start_date
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ )
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @default_payment_method = default_payment_method
+ @description = description
+ @invoice_settings = invoice_settings
+ @on_behalf_of = on_behalf_of
+ @transfer_data = transfer_data
+ end
+ end
+
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ attr_accessor :trial_end
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @currency = currency
+ @default_payment_method = default_payment_method
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @end_date = end_date
+ @invoice_settings = invoice_settings
+ @items = items
+ @iterations = iterations
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @start_date = start_date
+ @transfer_data = transfer_data
+ @trial = trial
+ @trial_end = trial_end
+ end
+ end
+ # Object representing the subscription schedule's default settings.
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
+ attr_accessor :phases
+ # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+
+ def initialize(
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ metadata: nil,
+ phases: nil,
+ proration_behavior: nil
+ )
+ @default_settings = default_settings
+ @end_behavior = end_behavior
+ @expand = expand
+ @metadata = metadata
+ @phases = phases
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
+ attr_accessor :invoice_now
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
+ attr_accessor :prorate
+
+ def initialize(expand: nil, invoice_now: nil, prorate: nil)
+ @expand = expand
+ @invoice_now = invoice_now
+ @prorate = prorate
+ end
+ end
+
+ class ReleaseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Keep any cancellation on the subscription that the schedule has set
+ attr_accessor :preserve_cancel_date
+
+ def initialize(expand: nil, preserve_cancel_date: nil)
+ @expand = expand
+ @preserve_cancel_date = preserve_cancel_date
+ end
+ end
+ # ID of the Connect Application that created the schedule.
+ attr_reader :application
+ # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
+ attr_reader :canceled_at
+ # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
+ attr_reader :completed_at
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
+ attr_reader :current_phase
+ # ID of the customer who owns the subscription schedule.
+ attr_reader :customer
+ # Attribute for field default_settings
+ attr_reader :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_reader :end_behavior
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Configuration for the subscription schedule's phases.
+ attr_reader :phases
+ # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
+ attr_reader :released_at
+ # ID of the subscription once managed by the subscription schedule (if it is released).
+ attr_reader :released_subscription
+ # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
+ attr_reader :status
+ # ID of the subscription managed by the subscription schedule.
+ attr_reader :subscription
+ # ID of the test clock this subscription schedule belongs to.
+ attr_reader :test_clock
+
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
def cancel(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb
index 99cd00e6..2c51c008 100644
--- a/lib/stripe/resources/tax/calculation.rb
+++ b/lib/stripe/resources/tax/calculation.rb
@@ -14,6 +14,384 @@ module Stripe
"tax.calculation"
end
+ class CustomerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_reader :state
+ end
+
+ class TaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ attr_reader :type
+ # The value of the tax ID.
+ attr_reader :value
+ end
+ # The customer's postal address (for example, home or business location).
+ attr_reader :address
+ # The type of customer address provided.
+ attr_reader :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ attr_reader :ip_address
+ # The customer's tax IDs (for example, EU VAT numbers).
+ attr_reader :tax_ids
+ # The taxability override used for taxation.
+ attr_reader :taxability_override
+ end
+
+ class ShipFromDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ end
+
+ class ShippingCost < Stripe::StripeObject
+ class TaxBreakdown < Stripe::StripeObject
+ class Jurisdiction < Stripe::StripeObject
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # A human-readable name for the jurisdiction imposing the tax.
+ attr_reader :display_name
+ # Indicates the level of the jurisdiction imposing the tax.
+ attr_reader :level
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_reader :state
+ end
+
+ class TaxRateDetails < Stripe::StripeObject
+ # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
+ attr_reader :display_name
+ # The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
+ attr_reader :percentage_decimal
+ # The tax type, such as `vat` or `sales_tax`.
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Attribute for field jurisdiction
+ attr_reader :jurisdiction
+ # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
+ attr_reader :sourcing
+ # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :taxable_amount
+ end
+ # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ attr_reader :amount
+ # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_tax
+ # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).
+ attr_reader :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ attr_reader :tax_behavior
+ # Detailed account of taxes relevant to shipping cost.
+ attr_reader :tax_breakdown
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.
+ attr_reader :tax_code
+ end
+
+ class TaxBreakdown < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ class FlatAmount < Stripe::StripeObject
+ # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_reader :amount
+ # Three-letter ISO currency code, in lowercase.
+ attr_reader :currency
+ end
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
+ attr_reader :flat_amount
+ # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`.
+ attr_reader :percentage_decimal
+ # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
+ attr_reader :rate_type
+ # State, county, province, or region.
+ attr_reader :state
+ # The tax type, such as `vat` or `sales_tax`.
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Specifies whether the tax amount is included in the line item amount.
+ attr_reader :inclusive
+ # Attribute for field tax_rate_details
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :taxable_amount
+ end
+
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class TaxId < Stripe::RequestParams
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(type: nil, value: nil)
+ @type = type
+ @value = value
+ end
+ end
+ # The customer's postal address (for example, home or business location).
+ attr_accessor :address
+ # The type of customer address provided.
+ attr_accessor :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ attr_accessor :ip_address
+ # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness.
+ attr_accessor :tax_ids
+ # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
+ attr_accessor :taxability_override
+
+ def initialize(
+ address: nil,
+ address_source: nil,
+ ip_address: nil,
+ tax_ids: nil,
+ taxability_override: nil
+ )
+ @address = address
+ @address_source = address_source
+ @ip_address = ip_address
+ @tax_ids = tax_ids
+ @taxability_override = taxability_override
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ attr_accessor :amount
+ # If provided, the product's `tax_code` will be used as the line item's `tax_code`.
+ attr_accessor :product
+ # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
+ attr_accessor :quantity
+ # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).
+ attr_accessor :reference
+ # Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
+ attr_accessor :tax_code
+
+ def initialize(
+ amount: nil,
+ product: nil,
+ quantity: nil,
+ reference: nil,
+ tax_behavior: nil,
+ tax_code: nil
+ )
+ @amount = amount
+ @product = product
+ @quantity = quantity
+ @reference = reference
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ end
+ end
+
+ class ShipFromDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The address from which the goods are being shipped from.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ attr_accessor :amount
+ # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
+ attr_accessor :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
+ attr_accessor :tax_behavior
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
+ attr_accessor :tax_code
+
+ def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil)
+ @amount = amount
+ @shipping_rate = shipping_rate
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.
+ attr_accessor :customer
+ # Details about the customer, including address and tax IDs.
+ attr_accessor :customer_details
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A list of items the customer is purchasing.
+ attr_accessor :line_items
+ # Details about the address from which the goods are being shipped.
+ attr_accessor :ship_from_details
+ # Shipping cost details to be used for the calculation.
+ attr_accessor :shipping_cost
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.
+ attr_accessor :tax_date
+
+ def initialize(
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ expand: nil,
+ line_items: nil,
+ ship_from_details: nil,
+ shipping_cost: nil,
+ tax_date: nil
+ )
+ @currency = currency
+ @customer = customer
+ @customer_details = customer_details
+ @expand = expand
+ @line_items = line_items
+ @ship_from_details = ship_from_details
+ @shipping_cost = shipping_cost
+ @tax_date = tax_date
+ end
+ end
+ # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_total
+ # 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).
+ attr_reader :currency
+ # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.
+ attr_reader :customer
+ # Attribute for field customer_details
+ attr_reader :customer_details
+ # Timestamp of date at which the tax calculation will expire.
+ attr_reader :expires_at
+ # Unique identifier for the calculation.
+ attr_reader :id
+ # The list of items the customer is purchasing.
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The details of the ship from location, such as the address.
+ attr_reader :ship_from_details
+ # The shipping cost details for the calculation.
+ attr_reader :shipping_cost
+ # The amount of tax to be collected on top of the line item prices.
+ attr_reader :tax_amount_exclusive
+ # The amount of tax already included in the line item prices.
+ attr_reader :tax_amount_inclusive
+ # Breakdown of individual tax amounts that add up to the total.
+ attr_reader :tax_breakdown
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation.
+ attr_reader :tax_date
+
# Calculates tax based on the input and returns a Tax Calculation object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/tax/calculation_line_item.rb b/lib/stripe/resources/tax/calculation_line_item.rb
index 1dbcdc73..e365f6ad 100644
--- a/lib/stripe/resources/tax/calculation_line_item.rb
+++ b/lib/stripe/resources/tax/calculation_line_item.rb
@@ -8,6 +8,62 @@ module Stripe
def self.object_name
"tax.calculation_line_item"
end
+
+ class TaxBreakdown < Stripe::StripeObject
+ class Jurisdiction < Stripe::StripeObject
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # A human-readable name for the jurisdiction imposing the tax.
+ attr_reader :display_name
+ # Indicates the level of the jurisdiction imposing the tax.
+ attr_reader :level
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_reader :state
+ end
+
+ class TaxRateDetails < Stripe::StripeObject
+ # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
+ attr_reader :display_name
+ # The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
+ attr_reader :percentage_decimal
+ # The tax type, such as `vat` or `sales_tax`.
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Attribute for field jurisdiction
+ attr_reader :jurisdiction
+ # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
+ attr_reader :sourcing
+ # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :taxable_amount
+ end
+ # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ attr_reader :amount
+ # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_tax
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The ID of an existing [Product](https://stripe.com/docs/api/products/object).
+ attr_reader :product
+ # The number of units of the item being purchased. For reversals, this is the quantity reversed.
+ attr_reader :quantity
+ # A custom identifier for this line item.
+ attr_reader :reference
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ attr_reader :tax_behavior
+ # Detailed account of taxes relevant to this line item.
+ attr_reader :tax_breakdown
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
+ attr_reader :tax_code
end
end
end
diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb
index b88f13a1..cdcc212a 100644
--- a/lib/stripe/resources/tax/registration.rb
+++ b/lib/stripe/resources/tax/registration.rb
@@ -18,6 +18,2379 @@ module Stripe
"tax.registration"
end
+ class CountryOptions < Stripe::StripeObject
+ class Ae < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Al < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Am < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ao < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class At < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Au < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ba < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Bb < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Be < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Bg < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Bh < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Bs < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class By < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ca < Stripe::StripeObject
+ class ProvinceStandard < Stripe::StripeObject
+ # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ attr_reader :province
+ end
+ # Attribute for field province_standard
+ attr_reader :province_standard
+ # Type of registration in Canada.
+ attr_reader :type
+ end
+
+ class Cd < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ch < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Cl < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Co < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Cr < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Cy < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Cz < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class De < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Dk < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Ec < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ee < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Eg < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Es < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Fi < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Fr < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Gb < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ge < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Gn < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Gr < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Hr < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Hu < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Id < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ie < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Is < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class It < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Jp < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ke < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Kh < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Kr < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Kz < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Lt < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Lu < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Lv < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Ma < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Md < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Me < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Mk < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Mr < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Mt < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Mx < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class My < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ng < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Nl < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class No < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Np < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Nz < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Om < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Pe < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Pl < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Pt < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Ro < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Rs < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ru < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Sa < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Se < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Sg < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Si < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Sk < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ attr_reader :standard
+ # Type of registration in an EU country.
+ attr_reader :type
+ end
+
+ class Sn < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Sr < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Th < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Tj < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Tr < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Tz < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Ug < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Us < Stripe::StripeObject
+ class LocalAmusementTax < Stripe::StripeObject
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
+ attr_reader :jurisdiction
+ end
+
+ class LocalLeaseTax < Stripe::StripeObject
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
+ attr_reader :jurisdiction
+ end
+
+ class StateSalesTax < Stripe::StripeObject
+ class Election < Stripe::StripeObject
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
+ attr_reader :jurisdiction
+ # The type of the election for the state sales tax registration.
+ attr_reader :type
+ end
+ # Elections for the state sales tax registration.
+ attr_reader :elections
+ end
+ # Attribute for field local_amusement_tax
+ attr_reader :local_amusement_tax
+ # Attribute for field local_lease_tax
+ attr_reader :local_lease_tax
+ # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ attr_reader :state
+ # Attribute for field state_sales_tax
+ attr_reader :state_sales_tax
+ # Type of registration in the US.
+ attr_reader :type
+ end
+
+ class Uy < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Uz < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Vn < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Za < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Zm < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+
+ class Zw < Stripe::StripeObject
+ # Type of registration in `country`.
+ attr_reader :type
+ end
+ # Attribute for field ae
+ attr_reader :ae
+ # Attribute for field al
+ attr_reader :al
+ # Attribute for field am
+ attr_reader :am
+ # Attribute for field ao
+ attr_reader :ao
+ # Attribute for field at
+ attr_reader :at
+ # Attribute for field au
+ attr_reader :au
+ # Attribute for field ba
+ attr_reader :ba
+ # Attribute for field bb
+ attr_reader :bb
+ # Attribute for field be
+ attr_reader :be
+ # Attribute for field bg
+ attr_reader :bg
+ # Attribute for field bh
+ attr_reader :bh
+ # Attribute for field bs
+ attr_reader :bs
+ # Attribute for field by
+ attr_reader :by
+ # Attribute for field ca
+ attr_reader :ca
+ # Attribute for field cd
+ attr_reader :cd
+ # Attribute for field ch
+ attr_reader :ch
+ # Attribute for field cl
+ attr_reader :cl
+ # Attribute for field co
+ attr_reader :co
+ # Attribute for field cr
+ attr_reader :cr
+ # Attribute for field cy
+ attr_reader :cy
+ # Attribute for field cz
+ attr_reader :cz
+ # Attribute for field de
+ attr_reader :de
+ # Attribute for field dk
+ attr_reader :dk
+ # Attribute for field ec
+ attr_reader :ec
+ # Attribute for field ee
+ attr_reader :ee
+ # Attribute for field eg
+ attr_reader :eg
+ # Attribute for field es
+ attr_reader :es
+ # Attribute for field fi
+ attr_reader :fi
+ # Attribute for field fr
+ attr_reader :fr
+ # Attribute for field gb
+ attr_reader :gb
+ # Attribute for field ge
+ attr_reader :ge
+ # Attribute for field gn
+ attr_reader :gn
+ # Attribute for field gr
+ attr_reader :gr
+ # Attribute for field hr
+ attr_reader :hr
+ # Attribute for field hu
+ attr_reader :hu
+ # Attribute for field id
+ attr_reader :id
+ # Attribute for field ie
+ attr_reader :ie
+ # Attribute for field is
+ attr_reader :is
+ # Attribute for field it
+ attr_reader :it
+ # Attribute for field jp
+ attr_reader :jp
+ # Attribute for field ke
+ attr_reader :ke
+ # Attribute for field kh
+ attr_reader :kh
+ # Attribute for field kr
+ attr_reader :kr
+ # Attribute for field kz
+ attr_reader :kz
+ # Attribute for field lt
+ attr_reader :lt
+ # Attribute for field lu
+ attr_reader :lu
+ # Attribute for field lv
+ attr_reader :lv
+ # Attribute for field ma
+ attr_reader :ma
+ # Attribute for field md
+ attr_reader :md
+ # Attribute for field me
+ attr_reader :me
+ # Attribute for field mk
+ attr_reader :mk
+ # Attribute for field mr
+ attr_reader :mr
+ # Attribute for field mt
+ attr_reader :mt
+ # Attribute for field mx
+ attr_reader :mx
+ # Attribute for field my
+ attr_reader :my
+ # Attribute for field ng
+ attr_reader :ng
+ # Attribute for field nl
+ attr_reader :nl
+ # Attribute for field no
+ attr_reader :no
+ # Attribute for field np
+ attr_reader :np
+ # Attribute for field nz
+ attr_reader :nz
+ # Attribute for field om
+ attr_reader :om
+ # Attribute for field pe
+ attr_reader :pe
+ # Attribute for field pl
+ attr_reader :pl
+ # Attribute for field pt
+ attr_reader :pt
+ # Attribute for field ro
+ attr_reader :ro
+ # Attribute for field rs
+ attr_reader :rs
+ # Attribute for field ru
+ attr_reader :ru
+ # Attribute for field sa
+ attr_reader :sa
+ # Attribute for field se
+ attr_reader :se
+ # Attribute for field sg
+ attr_reader :sg
+ # Attribute for field si
+ attr_reader :si
+ # Attribute for field sk
+ attr_reader :sk
+ # Attribute for field sn
+ attr_reader :sn
+ # Attribute for field sr
+ attr_reader :sr
+ # Attribute for field th
+ attr_reader :th
+ # Attribute for field tj
+ attr_reader :tj
+ # Attribute for field tr
+ attr_reader :tr
+ # Attribute for field tz
+ attr_reader :tz
+ # Attribute for field ug
+ attr_reader :ug
+ # Attribute for field us
+ attr_reader :us
+ # Attribute for field uy
+ attr_reader :uy
+ # Attribute for field uz
+ attr_reader :uz
+ # Attribute for field vn
+ attr_reader :vn
+ # Attribute for field za
+ attr_reader :za
+ # Attribute for field zm
+ attr_reader :zm
+ # Attribute for field zw
+ attr_reader :zw
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The status of the Tax Registration.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CountryOptions < Stripe::RequestParams
+ class Ae < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Al < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Am < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ao < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class At < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Au < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ba < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Bb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Be < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Bg < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Bh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Bs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class By < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ca < Stripe::RequestParams
+ class ProvinceStandard < Stripe::RequestParams
+ # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ attr_accessor :province
+
+ def initialize(province: nil)
+ @province = province
+ end
+ end
+ # Options for the provincial tax registration.
+ attr_accessor :province_standard
+ # Type of registration to be created in Canada.
+ attr_accessor :type
+
+ def initialize(province_standard: nil, type: nil)
+ @province_standard = province_standard
+ @type = type
+ end
+ end
+
+ class Cd < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ch < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Cl < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Co < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Cr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Cy < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Cz < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class De < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Dk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Ec < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ee < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Eg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Es < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Fi < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Fr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Gb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ge < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Gn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Gr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Hr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Hu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Id < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ie < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Is < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class It < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Jp < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ke < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Kh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Kr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Kz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Lt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Lu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Lv < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Ma < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Md < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Me < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Mk < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Mr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Mt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Mx < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class My < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ng < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Nl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class No < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Np < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Nz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Om < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Pe < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Pl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Pt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Ro < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Rs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ru < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Sa < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Se < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Sg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Si < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Sk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Sn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Sr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Th < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Tj < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Tr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Tz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ug < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Us < Stripe::RequestParams
+ class LocalAmusementTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `64343` (River Grove), and `68081` (Schiller Park).
+ attr_accessor :jurisdiction
+
+ def initialize(jurisdiction: nil)
+ @jurisdiction = jurisdiction
+ end
+ end
+
+ class LocalLeaseTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
+ attr_accessor :jurisdiction
+
+ def initialize(jurisdiction: nil)
+ @jurisdiction = jurisdiction
+ end
+ end
+
+ class StateSalesTax < Stripe::RequestParams
+ class Election < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
+ attr_accessor :jurisdiction
+ # The type of the election for the state sales tax registration.
+ attr_accessor :type
+
+ def initialize(jurisdiction: nil, type: nil)
+ @jurisdiction = jurisdiction
+ @type = type
+ end
+ end
+ # Elections for the state sales tax registration.
+ attr_accessor :elections
+
+ def initialize(elections: nil)
+ @elections = elections
+ end
+ end
+ # Options for the local amusement tax registration.
+ attr_accessor :local_amusement_tax
+ # Options for the local lease tax registration.
+ attr_accessor :local_lease_tax
+ # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ attr_accessor :state
+ # Options for the state sales tax registration.
+ attr_accessor :state_sales_tax
+ # Type of registration to be created in the US.
+ attr_accessor :type
+
+ def initialize(
+ local_amusement_tax: nil,
+ local_lease_tax: nil,
+ state: nil,
+ state_sales_tax: nil,
+ type: nil
+ )
+ @local_amusement_tax = local_amusement_tax
+ @local_lease_tax = local_lease_tax
+ @state = state
+ @state_sales_tax = state_sales_tax
+ @type = type
+ end
+ end
+
+ class Uy < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Uz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Vn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Za < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Zm < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Zw < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # Options for the registration in AE.
+ attr_accessor :ae
+ # Options for the registration in AL.
+ attr_accessor :al
+ # Options for the registration in AM.
+ attr_accessor :am
+ # Options for the registration in AO.
+ attr_accessor :ao
+ # Options for the registration in AT.
+ attr_accessor :at
+ # Options for the registration in AU.
+ attr_accessor :au
+ # Options for the registration in BA.
+ attr_accessor :ba
+ # Options for the registration in BB.
+ attr_accessor :bb
+ # Options for the registration in BE.
+ attr_accessor :be
+ # Options for the registration in BG.
+ attr_accessor :bg
+ # Options for the registration in BH.
+ attr_accessor :bh
+ # Options for the registration in BS.
+ attr_accessor :bs
+ # Options for the registration in BY.
+ attr_accessor :by
+ # Options for the registration in CA.
+ attr_accessor :ca
+ # Options for the registration in CD.
+ attr_accessor :cd
+ # Options for the registration in CH.
+ attr_accessor :ch
+ # Options for the registration in CL.
+ attr_accessor :cl
+ # Options for the registration in CO.
+ attr_accessor :co
+ # Options for the registration in CR.
+ attr_accessor :cr
+ # Options for the registration in CY.
+ attr_accessor :cy
+ # Options for the registration in CZ.
+ attr_accessor :cz
+ # Options for the registration in DE.
+ attr_accessor :de
+ # Options for the registration in DK.
+ attr_accessor :dk
+ # Options for the registration in EC.
+ attr_accessor :ec
+ # Options for the registration in EE.
+ attr_accessor :ee
+ # Options for the registration in EG.
+ attr_accessor :eg
+ # Options for the registration in ES.
+ attr_accessor :es
+ # Options for the registration in FI.
+ attr_accessor :fi
+ # Options for the registration in FR.
+ attr_accessor :fr
+ # Options for the registration in GB.
+ attr_accessor :gb
+ # Options for the registration in GE.
+ attr_accessor :ge
+ # Options for the registration in GN.
+ attr_accessor :gn
+ # Options for the registration in GR.
+ attr_accessor :gr
+ # Options for the registration in HR.
+ attr_accessor :hr
+ # Options for the registration in HU.
+ attr_accessor :hu
+ # Options for the registration in ID.
+ attr_accessor :id
+ # Options for the registration in IE.
+ attr_accessor :ie
+ # Options for the registration in IS.
+ attr_accessor :is
+ # Options for the registration in IT.
+ attr_accessor :it
+ # Options for the registration in JP.
+ attr_accessor :jp
+ # Options for the registration in KE.
+ attr_accessor :ke
+ # Options for the registration in KH.
+ attr_accessor :kh
+ # Options for the registration in KR.
+ attr_accessor :kr
+ # Options for the registration in KZ.
+ attr_accessor :kz
+ # Options for the registration in LT.
+ attr_accessor :lt
+ # Options for the registration in LU.
+ attr_accessor :lu
+ # Options for the registration in LV.
+ attr_accessor :lv
+ # Options for the registration in MA.
+ attr_accessor :ma
+ # Options for the registration in MD.
+ attr_accessor :md
+ # Options for the registration in ME.
+ attr_accessor :me
+ # Options for the registration in MK.
+ attr_accessor :mk
+ # Options for the registration in MR.
+ attr_accessor :mr
+ # Options for the registration in MT.
+ attr_accessor :mt
+ # Options for the registration in MX.
+ attr_accessor :mx
+ # Options for the registration in MY.
+ attr_accessor :my
+ # Options for the registration in NG.
+ attr_accessor :ng
+ # Options for the registration in NL.
+ attr_accessor :nl
+ # Options for the registration in NO.
+ attr_accessor :no
+ # Options for the registration in NP.
+ attr_accessor :np
+ # Options for the registration in NZ.
+ attr_accessor :nz
+ # Options for the registration in OM.
+ attr_accessor :om
+ # Options for the registration in PE.
+ attr_accessor :pe
+ # Options for the registration in PL.
+ attr_accessor :pl
+ # Options for the registration in PT.
+ attr_accessor :pt
+ # Options for the registration in RO.
+ attr_accessor :ro
+ # Options for the registration in RS.
+ attr_accessor :rs
+ # Options for the registration in RU.
+ attr_accessor :ru
+ # Options for the registration in SA.
+ attr_accessor :sa
+ # Options for the registration in SE.
+ attr_accessor :se
+ # Options for the registration in SG.
+ attr_accessor :sg
+ # Options for the registration in SI.
+ attr_accessor :si
+ # Options for the registration in SK.
+ attr_accessor :sk
+ # Options for the registration in SN.
+ attr_accessor :sn
+ # Options for the registration in SR.
+ attr_accessor :sr
+ # Options for the registration in TH.
+ attr_accessor :th
+ # Options for the registration in TJ.
+ attr_accessor :tj
+ # Options for the registration in TR.
+ attr_accessor :tr
+ # Options for the registration in TZ.
+ attr_accessor :tz
+ # Options for the registration in UG.
+ attr_accessor :ug
+ # Options for the registration in US.
+ attr_accessor :us
+ # Options for the registration in UY.
+ attr_accessor :uy
+ # Options for the registration in UZ.
+ attr_accessor :uz
+ # Options for the registration in VN.
+ attr_accessor :vn
+ # Options for the registration in ZA.
+ attr_accessor :za
+ # Options for the registration in ZM.
+ attr_accessor :zm
+ # Options for the registration in ZW.
+ attr_accessor :zw
+
+ def initialize(
+ ae: nil,
+ al: nil,
+ am: nil,
+ ao: nil,
+ at: nil,
+ au: nil,
+ ba: nil,
+ bb: nil,
+ be: nil,
+ bg: nil,
+ bh: nil,
+ bs: nil,
+ by: nil,
+ ca: nil,
+ cd: nil,
+ ch: nil,
+ cl: nil,
+ co: nil,
+ cr: nil,
+ cy: nil,
+ cz: nil,
+ de: nil,
+ dk: nil,
+ ec: nil,
+ ee: nil,
+ eg: nil,
+ es: nil,
+ fi: nil,
+ fr: nil,
+ gb: nil,
+ ge: nil,
+ gn: nil,
+ gr: nil,
+ hr: nil,
+ hu: nil,
+ id: nil,
+ ie: nil,
+ is: nil,
+ it: nil,
+ jp: nil,
+ ke: nil,
+ kh: nil,
+ kr: nil,
+ kz: nil,
+ lt: nil,
+ lu: nil,
+ lv: nil,
+ ma: nil,
+ md: nil,
+ me: nil,
+ mk: nil,
+ mr: nil,
+ mt: nil,
+ mx: nil,
+ my: nil,
+ ng: nil,
+ nl: nil,
+ no: nil,
+ np: nil,
+ nz: nil,
+ om: nil,
+ pe: nil,
+ pl: nil,
+ pt: nil,
+ ro: nil,
+ rs: nil,
+ ru: nil,
+ sa: nil,
+ se: nil,
+ sg: nil,
+ si: nil,
+ sk: nil,
+ sn: nil,
+ sr: nil,
+ th: nil,
+ tj: nil,
+ tr: nil,
+ tz: nil,
+ ug: nil,
+ us: nil,
+ uy: nil,
+ uz: nil,
+ vn: nil,
+ za: nil,
+ zm: nil,
+ zw: nil
+ )
+ @ae = ae
+ @al = al
+ @am = am
+ @ao = ao
+ @at = at
+ @au = au
+ @ba = ba
+ @bb = bb
+ @be = be
+ @bg = bg
+ @bh = bh
+ @bs = bs
+ @by = by
+ @ca = ca
+ @cd = cd
+ @ch = ch
+ @cl = cl
+ @co = co
+ @cr = cr
+ @cy = cy
+ @cz = cz
+ @de = de
+ @dk = dk
+ @ec = ec
+ @ee = ee
+ @eg = eg
+ @es = es
+ @fi = fi
+ @fr = fr
+ @gb = gb
+ @ge = ge
+ @gn = gn
+ @gr = gr
+ @hr = hr
+ @hu = hu
+ @id = id
+ @ie = ie
+ @is = is
+ @it = it
+ @jp = jp
+ @ke = ke
+ @kh = kh
+ @kr = kr
+ @kz = kz
+ @lt = lt
+ @lu = lu
+ @lv = lv
+ @ma = ma
+ @md = md
+ @me = me
+ @mk = mk
+ @mr = mr
+ @mt = mt
+ @mx = mx
+ @my = my
+ @ng = ng
+ @nl = nl
+ @no = no
+ @np = np
+ @nz = nz
+ @om = om
+ @pe = pe
+ @pl = pl
+ @pt = pt
+ @ro = ro
+ @rs = rs
+ @ru = ru
+ @sa = sa
+ @se = se
+ @sg = sg
+ @si = si
+ @sk = sk
+ @sn = sn
+ @sr = sr
+ @th = th
+ @tj = tj
+ @tr = tr
+ @tz = tz
+ @ug = ug
+ @us = us
+ @uy = uy
+ @uz = uz
+ @vn = vn
+ @za = za
+ @zm = zm
+ @zw = zw
+ end
+ end
+ # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch.
+ attr_accessor :active_from
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Specific options for a registration in the specified `country`.
+ attr_accessor :country_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+
+ def initialize(
+ active_from: nil,
+ country: nil,
+ country_options: nil,
+ expand: nil,
+ expires_at: nil
+ )
+ @active_from = active_from
+ @country = country
+ @country_options = country_options
+ @expand = expand
+ @expires_at = expires_at
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ attr_accessor :active_from
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+
+ def initialize(active_from: nil, expand: nil, expires_at: nil)
+ @active_from = active_from
+ @expand = expand
+ @expires_at = expires_at
+ end
+ end
+ # Time at which the registration becomes active. Measured in seconds since the Unix epoch.
+ attr_reader :active_from
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Attribute for field country_options
+ attr_reader :country_options
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch.
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`.
+ attr_reader :status
+
# Creates a new Tax Registration object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/tax/settings.rb b/lib/stripe/resources/tax/settings.rb
index 1250ea35..896ce6e3 100644
--- a/lib/stripe/resources/tax/settings.rb
+++ b/lib/stripe/resources/tax/settings.rb
@@ -8,10 +8,127 @@ module Stripe
# Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
class Settings < SingletonAPIResource
include Stripe::APIOperations::SingletonSave
+
OBJECT_NAME = "tax.settings"
def self.object_name
"tax.settings"
end
+
+ class Defaults < Stripe::StripeObject
+ # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior.
+ attr_reader :tax_behavior
+ # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices.
+ attr_reader :tax_code
+ end
+
+ class HeadOffice < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ end
+
+ class StatusDetails < Stripe::StripeObject
+ class Active < Stripe::StripeObject; end
+
+ class Pending < Stripe::StripeObject
+ # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call.
+ attr_reader :missing_fields
+ end
+ # Attribute for field active
+ attr_reader :active
+ # Attribute for field pending
+ attr_reader :pending
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Defaults < Stripe::RequestParams
+ # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(tax_behavior: nil, tax_code: nil)
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ end
+ end
+
+ class HeadOffice < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The location of the business for tax purposes.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+ # Default configuration to be used on Stripe Tax calculations.
+ attr_accessor :defaults
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The place where your business is located.
+ attr_accessor :head_office
+
+ def initialize(defaults: nil, expand: nil, head_office: nil)
+ @defaults = defaults
+ @expand = expand
+ @head_office = head_office
+ end
+ end
+ # Attribute for field defaults
+ attr_reader :defaults
+ # The place where your business is located.
+ attr_reader :head_office
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The status of the Tax `Settings`.
+ attr_reader :status
+ # Attribute for field status_details
+ attr_reader :status_details
end
end
end
diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb
index bdbfa41d..983fe571 100644
--- a/lib/stripe/resources/tax/transaction.rb
+++ b/lib/stripe/resources/tax/transaction.rb
@@ -12,6 +12,264 @@ module Stripe
"tax.transaction"
end
+ class CustomerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_reader :state
+ end
+
+ class TaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ attr_reader :type
+ # The value of the tax ID.
+ attr_reader :value
+ end
+ # The customer's postal address (for example, home or business location).
+ attr_reader :address
+ # The type of customer address provided.
+ attr_reader :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ attr_reader :ip_address
+ # The customer's tax IDs (for example, EU VAT numbers).
+ attr_reader :tax_ids
+ # The taxability override used for taxation.
+ attr_reader :taxability_override
+ end
+
+ class Reversal < Stripe::StripeObject
+ # The `id` of the reversed `Transaction` object.
+ attr_reader :original_transaction
+ end
+
+ class ShipFromDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ end
+
+ class ShippingCost < Stripe::StripeObject
+ class TaxBreakdown < Stripe::StripeObject
+ class Jurisdiction < Stripe::StripeObject
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # A human-readable name for the jurisdiction imposing the tax.
+ attr_reader :display_name
+ # Indicates the level of the jurisdiction imposing the tax.
+ attr_reader :level
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_reader :state
+ end
+
+ class TaxRateDetails < Stripe::StripeObject
+ # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
+ attr_reader :display_name
+ # The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
+ attr_reader :percentage_decimal
+ # The tax type, such as `vat` or `sales_tax`.
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Attribute for field jurisdiction
+ attr_reader :jurisdiction
+ # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
+ attr_reader :sourcing
+ # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :taxable_amount
+ end
+ # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ attr_reader :amount
+ # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_tax
+ # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).
+ attr_reader :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ attr_reader :tax_behavior
+ # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.)
+ attr_reader :tax_breakdown
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.
+ attr_reader :tax_code
+ end
+
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateFromCalculationParams < Stripe::RequestParams
+ # Tax Calculation ID to be used as input when creating the transaction.
+ attr_accessor :calculation
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.
+ attr_accessor :posted_at
+ # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.
+ attr_accessor :reference
+
+ def initialize(calculation: nil, expand: nil, metadata: nil, posted_at: nil, reference: nil)
+ @calculation = calculation
+ @expand = expand
+ @metadata = metadata
+ @posted_at = posted_at
+ @reference = reference
+ end
+ end
+
+ class CreateReversalParams < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount_tax
+ # 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.
+ attr_accessor :metadata
+ # The `id` of the line item to reverse in the original transaction.
+ attr_accessor :original_line_item
+ # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed.
+ attr_accessor :quantity
+ # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.
+ attr_accessor :reference
+
+ def initialize(
+ amount: nil,
+ amount_tax: nil,
+ metadata: nil,
+ original_line_item: nil,
+ quantity: nil,
+ reference: nil
+ )
+ @amount = amount
+ @amount_tax = amount_tax
+ @metadata = metadata
+ @original_line_item = original_line_item
+ @quantity = quantity
+ @reference = reference
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount_tax
+
+ def initialize(amount: nil, amount_tax: nil)
+ @amount = amount
+ @amount_tax = amount_tax
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.
+ attr_accessor :flat_amount
+ # The line item amounts to reverse.
+ attr_accessor :line_items
+ # 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`.
+ attr_accessor :metadata
+ # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
+ attr_accessor :mode
+ # The ID of the Transaction to partially or fully reverse.
+ attr_accessor :original_transaction
+ # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports).
+ attr_accessor :reference
+ # The shipping cost to reverse.
+ attr_accessor :shipping_cost
+
+ def initialize(
+ expand: nil,
+ flat_amount: nil,
+ line_items: nil,
+ metadata: nil,
+ mode: nil,
+ original_transaction: nil,
+ reference: nil,
+ shipping_cost: nil
+ )
+ @expand = expand
+ @flat_amount = flat_amount
+ @line_items = line_items
+ @metadata = metadata
+ @mode = mode
+ @original_transaction = original_transaction
+ @reference = reference
+ @shipping_cost = shipping_cost
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.
+ attr_reader :customer
+ # Attribute for field customer_details
+ attr_reader :customer_details
+ # Unique identifier for the transaction.
+ attr_reader :id
+ # The tax collected or refunded, by line item.
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The Unix timestamp representing when the tax liability is assumed or reduced.
+ attr_reader :posted_at
+ # A custom unique identifier, such as 'myOrder_123'.
+ attr_reader :reference
+ # If `type=reversal`, contains information about what was reversed.
+ attr_reader :reversal
+ # The details of the ship from location, such as the address.
+ attr_reader :ship_from_details
+ # The shipping cost details for the transaction.
+ attr_reader :shipping_cost
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation.
+ attr_reader :tax_date
+ # If `reversal`, this transaction reverses an earlier transaction.
+ attr_reader :type
+
# Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
def self.create_from_calculation(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/tax/transaction_line_item.rb b/lib/stripe/resources/tax/transaction_line_item.rb
index b0d8face..10880f60 100644
--- a/lib/stripe/resources/tax/transaction_line_item.rb
+++ b/lib/stripe/resources/tax/transaction_line_item.rb
@@ -8,6 +8,37 @@ module Stripe
def self.object_name
"tax.transaction_line_item"
end
+
+ class Reversal < Stripe::StripeObject
+ # The `id` of the line item to reverse in the original transaction.
+ attr_reader :original_line_item
+ end
+ # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ attr_reader :amount
+ # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount_tax
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The ID of an existing [Product](https://stripe.com/docs/api/products/object).
+ attr_reader :product
+ # The number of units of the item being purchased. For reversals, this is the quantity reversed.
+ attr_reader :quantity
+ # A custom identifier for this line item in the transaction.
+ attr_reader :reference
+ # If `type=reversal`, contains information about what was reversed.
+ attr_reader :reversal
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ attr_reader :tax_behavior
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
+ attr_reader :tax_code
+ # If `reversal`, this line item reverses an earlier transaction.
+ attr_reader :type
end
end
end
diff --git a/lib/stripe/resources/tax_code.rb b/lib/stripe/resources/tax_code.rb
index 2c4df61d..fb7f813d 100644
--- a/lib/stripe/resources/tax_code.rb
+++ b/lib/stripe/resources/tax_code.rb
@@ -11,6 +11,32 @@ module Stripe
"tax_code"
end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+ # A detailed description of which types of products the tax code represents.
+ attr_reader :description
+ # Unique identifier for the object.
+ attr_reader :id
+ # A short name for the tax code.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+
# A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/tax_codes", params: params, opts: opts)
diff --git a/lib/stripe/resources/tax_deducted_at_source.rb b/lib/stripe/resources/tax_deducted_at_source.rb
new file mode 100644
index 00000000..a504a626
--- /dev/null
+++ b/lib/stripe/resources/tax_deducted_at_source.rb
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+ class TaxDeductedAtSource < APIResource
+ OBJECT_NAME = "tax_deducted_at_source"
+ def self.object_name
+ "tax_deducted_at_source"
+ end
+
+ # Unique identifier for the object.
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.
+ attr_reader :period_end
+ # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.
+ attr_reader :period_start
+ # The TAN that was supplied to Stripe when TDS was assessed
+ attr_reader :tax_deduction_account_number
+ end
+end
diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb
index 1d9eff23..f56479da 100644
--- a/lib/stripe/resources/tax_id.rb
+++ b/lib/stripe/resources/tax_id.rb
@@ -16,6 +16,118 @@ module Stripe
"tax_id"
end
+ class Owner < Stripe::StripeObject
+ # The account being referenced when `type` is `account`.
+ attr_reader :account
+ # The Connect Application being referenced when `type` is `application`.
+ attr_reader :application
+ # The customer being referenced when `type` is `customer`.
+ attr_reader :customer
+ # Type of owner referenced.
+ attr_reader :type
+ end
+
+ class Verification < Stripe::StripeObject
+ # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.
+ attr_reader :status
+ # Verified address.
+ attr_reader :verified_address
+ # Verified name.
+ attr_reader :verified_name
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ attr_accessor :customer
+ # Type of owner referenced.
+ attr_accessor :type
+
+ def initialize(account: nil, customer: nil, type: nil)
+ @account = account
+ @customer = customer
+ @type = type
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ attr_accessor :owner
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, owner: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @owner = owner
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ attr_accessor :customer
+ # Type of owner referenced.
+ attr_accessor :type
+
+ def initialize(account: nil, customer: nil, type: nil)
+ @account = account
+ @customer = customer
+ @type = type
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ attr_accessor :owner
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(expand: nil, owner: nil, type: nil, value: nil)
+ @expand = expand
+ @owner = owner
+ @type = type
+ @value = value
+ end
+ end
+ # Two-letter ISO code representing the country of the tax ID.
+ attr_reader :country
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # ID of the customer.
+ attr_reader :customer
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The account or customer the tax ID belongs to.
+ attr_reader :owner
+ # 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`
+ attr_reader :type
+ # Value of the tax ID.
+ attr_reader :value
+ # Tax ID verification information.
+ attr_reader :verification
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new account or customer tax_id object.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/tax_ids", params: params, opts: opts)
diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb
index dc640b28..91706665 100644
--- a/lib/stripe/resources/tax_rate.rb
+++ b/lib/stripe/resources/tax_rate.rb
@@ -15,6 +15,197 @@ module Stripe
"tax_rate"
end
+ class FlatAmount < Stripe::StripeObject
+ # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_reader :amount
+ # Three-letter ISO currency code, in lowercase.
+ attr_reader :currency
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Optional flag to filter by tax rates that are either active or inactive (archived).
+ attr_accessor :active
+ # Optional range for filtering created date.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).
+ attr_accessor :inclusive
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ inclusive: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @inclusive = inclusive
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # 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`.
+ attr_accessor :metadata
+ # This represents the tax rate percent out of 100.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @active = active
+ @country = country
+ @description = description
+ @display_name = display_name
+ @expand = expand
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @metadata = metadata
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # 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`.
+ attr_accessor :metadata
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @active = active
+ @country = country
+ @description = description
+ @display_name = display_name
+ @expand = expand
+ @jurisdiction = jurisdiction
+ @metadata = metadata
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ attr_reader :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_reader :description
+ # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
+ attr_reader :display_name
+ # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,
+ # this percentage reflects the rate actually used to calculate tax based on the product's taxability
+ # and whether the user is registered to collect taxes in the corresponding jurisdiction.
+ attr_reader :effective_percentage
+ # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
+ attr_reader :flat_amount
+ # Unique identifier for the object.
+ attr_reader :id
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_reader :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_reader :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.
+ attr_reader :jurisdiction_level
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
+ attr_reader :percentage
+ # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
+ attr_reader :rate_type
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_reader :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_reader :tax_type
+
# Creates a new tax rate.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/tax_rates", params: params, opts: opts)
diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb
index 3e832903..79734213 100644
--- a/lib/stripe/resources/terminal/configuration.rb
+++ b/lib/stripe/resources/terminal/configuration.rb
@@ -15,6 +15,1266 @@ module Stripe
"terminal.configuration"
end
+ class BbposWiseposE < Stripe::StripeObject
+ # A File ID representing an image to display on the reader
+ attr_reader :splashscreen
+ end
+
+ class Offline < Stripe::StripeObject
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ attr_reader :enabled
+ end
+
+ class RebootWindow < Stripe::StripeObject
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ attr_reader :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ attr_reader :start_hour
+ end
+
+ class StripeS700 < Stripe::StripeObject
+ # A File ID representing an image to display on the reader
+ attr_reader :splashscreen
+ end
+
+ class Tipping < Stripe::StripeObject
+ class Aud < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Cad < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Chf < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Czk < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Dkk < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Eur < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Gbp < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Hkd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Jpy < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Myr < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Nok < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Nzd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Pln < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Sek < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Sgd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+
+ class Usd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_reader :smart_tip_threshold
+ end
+ # Attribute for field aud
+ attr_reader :aud
+ # Attribute for field cad
+ attr_reader :cad
+ # Attribute for field chf
+ attr_reader :chf
+ # Attribute for field czk
+ attr_reader :czk
+ # Attribute for field dkk
+ attr_reader :dkk
+ # Attribute for field eur
+ attr_reader :eur
+ # Attribute for field gbp
+ attr_reader :gbp
+ # Attribute for field hkd
+ attr_reader :hkd
+ # Attribute for field jpy
+ attr_reader :jpy
+ # Attribute for field myr
+ attr_reader :myr
+ # Attribute for field nok
+ attr_reader :nok
+ # Attribute for field nzd
+ attr_reader :nzd
+ # Attribute for field pln
+ attr_reader :pln
+ # Attribute for field sek
+ attr_reader :sek
+ # Attribute for field sgd
+ attr_reader :sgd
+ # Attribute for field usd
+ attr_reader :usd
+ end
+
+ class VerifoneP400 < Stripe::StripeObject
+ # A File ID representing an image to display on the reader
+ attr_reader :splashscreen
+ end
+
+ class Wifi < Stripe::StripeObject
+ class EnterpriseEapPeap < Stripe::StripeObject
+ # A File ID representing a PEM file containing the server certificate
+ attr_reader :ca_certificate_file
+ # Password for connecting to the WiFi network
+ attr_reader :password
+ # Name of the WiFi network
+ attr_reader :ssid
+ # Username for connecting to the WiFi network
+ attr_reader :username
+ end
+
+ class EnterpriseEapTls < Stripe::StripeObject
+ # A File ID representing a PEM file containing the server certificate
+ attr_reader :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ attr_reader :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ attr_reader :private_key_file
+ # Password for the private key file
+ attr_reader :private_key_file_password
+ # Name of the WiFi network
+ attr_reader :ssid
+ end
+
+ class PersonalPsk < Stripe::StripeObject
+ # Password for connecting to the WiFi network
+ attr_reader :password
+ # Name of the WiFi network
+ attr_reader :ssid
+ end
+ # Attribute for field enterprise_eap_peap
+ attr_reader :enterprise_eap_peap
+ # Attribute for field enterprise_eap_tls
+ attr_reader :enterprise_eap_tls
+ # Attribute for field personal_psk
+ attr_reader :personal_psk
+ # Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type.
+ attr_reader :type
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ attr_accessor :start_hour
+
+ def initialize(end_hour: nil, start_hour: nil)
+ @end_hour = end_hour
+ @start_hour = start_hour
+ end
+ end
+
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+ # Tipping configuration for AUD
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ attr_accessor :usd
+
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ )
+ @aud = aud
+ @cad = cad
+ @chf = chf
+ @czk = czk
+ @dkk = dkk
+ @eur = eur
+ @gbp = gbp
+ @hkd = hkd
+ @jpy = jpy
+ @myr = myr
+ @nok = nok
+ @nzd = nzd
+ @pln = pln
+ @sek = sek
+ @sgd = sgd
+ @usd = usd
+ end
+ end
+
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ attr_accessor :username
+
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil)
+ @ca_certificate_file = ca_certificate_file
+ @password = password
+ @ssid = ssid
+ @username = username
+ end
+ end
+
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ attr_accessor :private_key_file
+ # Password for the private key file
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ )
+ @ca_certificate_file = ca_certificate_file
+ @client_certificate_file = client_certificate_file
+ @private_key_file = private_key_file
+ @private_key_file_password = private_key_file_password
+ @ssid = ssid
+ end
+ end
+
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(password: nil, ssid: nil)
+ @password = password
+ @ssid = ssid
+ end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ attr_accessor :type
+
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ )
+ @enterprise_eap_peap = enterprise_eap_peap
+ @enterprise_eap_tls = enterprise_eap_tls
+ @personal_psk = personal_psk
+ @type = type
+ end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Name of the configuration
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ attr_accessor :wifi
+
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ )
+ @bbpos_wisepos_e = bbpos_wisepos_e
+ @expand = expand
+ @name = name
+ @offline = offline
+ @reboot_window = reboot_window
+ @stripe_s700 = stripe_s700
+ @tipping = tipping
+ @verifone_p400 = verifone_p400
+ @wifi = wifi
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # if present, only return the account default or non-default configurations.
+ attr_accessor :is_account_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ is_account_default: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @is_account_default = is_account_default
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ attr_accessor :start_hour
+
+ def initialize(end_hour: nil, start_hour: nil)
+ @end_hour = end_hour
+ @start_hour = start_hour
+ end
+ end
+
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+ # Tipping configuration for AUD
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ attr_accessor :usd
+
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ )
+ @aud = aud
+ @cad = cad
+ @chf = chf
+ @czk = czk
+ @dkk = dkk
+ @eur = eur
+ @gbp = gbp
+ @hkd = hkd
+ @jpy = jpy
+ @myr = myr
+ @nok = nok
+ @nzd = nzd
+ @pln = pln
+ @sek = sek
+ @sgd = sgd
+ @usd = usd
+ end
+ end
+
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ attr_accessor :username
+
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil)
+ @ca_certificate_file = ca_certificate_file
+ @password = password
+ @ssid = ssid
+ @username = username
+ end
+ end
+
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ attr_accessor :private_key_file
+ # Password for the private key file
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ )
+ @ca_certificate_file = ca_certificate_file
+ @client_certificate_file = client_certificate_file
+ @private_key_file = private_key_file
+ @private_key_file_password = private_key_file_password
+ @ssid = ssid
+ end
+ end
+
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(password: nil, ssid: nil)
+ @password = password
+ @ssid = ssid
+ end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ attr_accessor :type
+
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ )
+ @enterprise_eap_peap = enterprise_eap_peap
+ @enterprise_eap_tls = enterprise_eap_tls
+ @personal_psk = personal_psk
+ @type = type
+ end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Name of the configuration
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ attr_accessor :wifi
+
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ )
+ @bbpos_wisepos_e = bbpos_wisepos_e
+ @expand = expand
+ @name = name
+ @offline = offline
+ @reboot_window = reboot_window
+ @stripe_s700 = stripe_s700
+ @tipping = tipping
+ @verifone_p400 = verifone_p400
+ @wifi = wifi
+ end
+ end
+ # Attribute for field bbpos_wisepos_e
+ attr_reader :bbpos_wisepos_e
+ # Unique identifier for the object.
+ attr_reader :id
+ # Whether this Configuration is the default for your account
+ attr_reader :is_account_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String indicating the name of the Configuration object, set by the user
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Attribute for field offline
+ attr_reader :offline
+ # Attribute for field reboot_window
+ attr_reader :reboot_window
+ # Attribute for field stripe_s700
+ attr_reader :stripe_s700
+ # Attribute for field tipping
+ attr_reader :tipping
+ # Attribute for field verifone_p400
+ attr_reader :verifone_p400
+ # Attribute for field wifi
+ attr_reader :wifi
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new Configuration object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/terminal/connection_token.rb b/lib/stripe/resources/terminal/connection_token.rb
index 3decf1fc..77e5caba 100644
--- a/lib/stripe/resources/terminal/connection_token.rb
+++ b/lib/stripe/resources/terminal/connection_token.rb
@@ -14,6 +14,24 @@ module Stripe
"terminal.connection_token"
end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ attr_accessor :location
+
+ def initialize(expand: nil, location: nil)
+ @expand = expand
+ @location = location
+ end
+ end
+ # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ attr_reader :location
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Your application should pass this token to the Stripe Terminal SDK.
+ attr_reader :secret
+
# To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb
index 577b8631..cddf45f2 100644
--- a/lib/stripe/resources/terminal/location.rb
+++ b/lib/stripe/resources/terminal/location.rb
@@ -17,6 +17,172 @@ module Stripe
"terminal.location"
end
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location.
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ attr_accessor :configuration_overrides
+ # A name for the location.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ )
+ @address = address
+ @configuration_overrides = configuration_overrides
+ @display_name = display_name
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The full address of the location.
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ attr_accessor :configuration_overrides
+ # A name for the location. Maximum length is 1000 characters.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ )
+ @address = address
+ @configuration_overrides = configuration_overrides
+ @display_name = display_name
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+ # Attribute for field address
+ attr_reader :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ attr_reader :configuration_overrides
+ # The display name of the location.
+ attr_reader :display_name
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Creates a new Location object.
# For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
def self.create(params = {}, opts = {})
diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb
index 101e4494..19fc10ee 100644
--- a/lib/stripe/resources/terminal/reader.rb
+++ b/lib/stripe/resources/terminal/reader.rb
@@ -17,6 +17,433 @@ module Stripe
"terminal.reader"
end
+ class Action < Stripe::StripeObject
+ class ProcessPaymentIntent < Stripe::StripeObject
+ class ProcessConfig < Stripe::StripeObject
+ class Tipping < Stripe::StripeObject
+ # 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).
+ attr_reader :amount_eligible
+ end
+ # Enable customer initiated cancellation when processing this payment.
+ attr_reader :enable_customer_cancellation
+ # Override showing a tipping selection screen on this transaction.
+ attr_reader :skip_tipping
+ # Represents a per-transaction tipping configuration
+ attr_reader :tipping
+ end
+ # Most recent PaymentIntent processed by the reader.
+ attr_reader :payment_intent
+ # Represents a per-transaction override of a reader configuration
+ attr_reader :process_config
+ end
+
+ class ProcessSetupIntent < Stripe::StripeObject
+ class ProcessConfig < Stripe::StripeObject
+ # Enable customer initiated cancellation when processing this SetupIntent.
+ attr_reader :enable_customer_cancellation
+ end
+ # 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.
+ attr_reader :generated_card
+ # Represents a per-setup override of a reader configuration
+ attr_reader :process_config
+ # Most recent SetupIntent processed by the reader.
+ attr_reader :setup_intent
+ end
+
+ class RefundPayment < Stripe::StripeObject
+ class RefundPaymentConfig < Stripe::StripeObject
+ # Enable customer initiated cancellation when refunding this payment.
+ attr_reader :enable_customer_cancellation
+ end
+ # The amount being refunded.
+ attr_reader :amount
+ # Charge that is being refunded.
+ attr_reader :charge
+ # 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.
+ attr_reader :metadata
+ # Payment intent that is being refunded.
+ attr_reader :payment_intent
+ # The reason for the refund.
+ attr_reader :reason
+ # Unique identifier for the refund object.
+ attr_reader :refund
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ attr_reader :refund_application_fee
+ # Represents a per-transaction override of a reader configuration
+ attr_reader :refund_payment_config
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
+ attr_reader :reverse_transfer
+ end
+
+ class SetReaderDisplay < Stripe::StripeObject
+ class Cart < Stripe::StripeObject
+ class LineItem < Stripe::StripeObject
+ # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :amount
+ # Description of the line item.
+ attr_reader :description
+ # The quantity of the line item.
+ attr_reader :quantity
+ end
+ # 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).
+ attr_reader :currency
+ # List of line items in the cart.
+ attr_reader :line_items
+ # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :tax
+ # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_reader :total
+ end
+ # Cart object to be displayed by the reader.
+ attr_reader :cart
+ # Type of information to be displayed by the reader.
+ attr_reader :type
+ end
+ # Failure code, only set if status is `failed`.
+ attr_reader :failure_code
+ # Detailed failure message, only set if status is `failed`.
+ attr_reader :failure_message
+ # Represents a reader action to process a payment intent
+ attr_reader :process_payment_intent
+ # Represents a reader action to process a setup intent
+ attr_reader :process_setup_intent
+ # Represents a reader action to refund a payment
+ attr_reader :refund_payment
+ # Represents a reader action to set the reader display
+ attr_reader :set_reader_display
+ # Status of the action performed by the reader.
+ attr_reader :status
+ # Type of action performed by the reader.
+ attr_reader :type
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The new label of the reader.
+ attr_accessor :label
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, label: nil, metadata: nil)
+ @expand = expand
+ @label = label
+ @metadata = metadata
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Filters readers by device type
+ attr_accessor :device_type
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A location ID to filter the response list to only readers at the specific location
+ attr_accessor :location
+ # Filters readers by serial number
+ attr_accessor :serial_number
+ # 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.
+ attr_accessor :starting_after
+ # A status filter to filter readers to only offline or online readers
+ attr_accessor :status
+
+ def initialize(
+ device_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ location: nil,
+ serial_number: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @device_type = device_type
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @location = location
+ @serial_number = serial_number
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.
+ attr_accessor :label
+ # The location to assign the reader to.
+ attr_accessor :location
+ # 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`.
+ attr_accessor :metadata
+ # A code generated by the reader used for registering to an account.
+ attr_accessor :registration_code
+
+ def initialize(
+ expand: nil,
+ label: nil,
+ location: nil,
+ metadata: nil,
+ registration_code: nil
+ )
+ @expand = expand
+ @label = label
+ @location = location
+ @metadata = metadata
+ @registration_code = registration_code
+ end
+ end
+
+ class CancelActionParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ProcessPaymentIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ class Tipping < Stripe::RequestParams
+ # 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).
+ attr_accessor :amount_eligible
+
+ def initialize(amount_eligible: nil)
+ @amount_eligible = amount_eligible
+ end
+ end
+ # 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.
+ attr_accessor :allow_redisplay
+ # Enables cancel button on transaction screens.
+ attr_accessor :enable_customer_cancellation
+ # Override showing a tipping selection screen on this transaction.
+ attr_accessor :skip_tipping
+ # Tipping configuration for this transaction.
+ attr_accessor :tipping
+
+ def initialize(
+ allow_redisplay: nil,
+ enable_customer_cancellation: nil,
+ skip_tipping: nil,
+ tipping: nil
+ )
+ @allow_redisplay = allow_redisplay
+ @enable_customer_cancellation = enable_customer_cancellation
+ @skip_tipping = skip_tipping
+ @tipping = tipping
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # PaymentIntent ID
+ attr_accessor :payment_intent
+ # Configuration overrides
+ attr_accessor :process_config
+
+ def initialize(expand: nil, payment_intent: nil, process_config: nil)
+ @expand = expand
+ @payment_intent = payment_intent
+ @process_config = process_config
+ end
+ end
+
+ class ProcessSetupIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ attr_accessor :enable_customer_cancellation
+
+ def initialize(enable_customer_cancellation: nil)
+ @enable_customer_cancellation = enable_customer_cancellation
+ end
+ end
+ # 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.
+ attr_accessor :allow_redisplay
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Configuration overrides
+ attr_accessor :process_config
+ # SetupIntent ID
+ attr_accessor :setup_intent
+
+ def initialize(allow_redisplay: nil, expand: nil, process_config: nil, setup_intent: nil)
+ @allow_redisplay = allow_redisplay
+ @expand = expand
+ @process_config = process_config
+ @setup_intent = setup_intent
+ end
+ end
+
+ class RefundPaymentParams < Stripe::RequestParams
+ class RefundPaymentConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ attr_accessor :enable_customer_cancellation
+
+ def initialize(enable_customer_cancellation: nil)
+ @enable_customer_cancellation = enable_customer_cancellation
+ end
+ end
+ # A positive integer in __cents__ representing how much of this charge to refund.
+ attr_accessor :amount
+ # ID of the Charge to refund.
+ attr_accessor :charge
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # ID of the PaymentIntent to refund.
+ attr_accessor :payment_intent
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ attr_accessor :refund_application_fee
+ # Configuration overrides
+ attr_accessor :refund_payment_config
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
+ attr_accessor :reverse_transfer
+
+ def initialize(
+ amount: nil,
+ charge: nil,
+ expand: nil,
+ metadata: nil,
+ payment_intent: nil,
+ refund_application_fee: nil,
+ refund_payment_config: nil,
+ reverse_transfer: nil
+ )
+ @amount = amount
+ @charge = charge
+ @expand = expand
+ @metadata = metadata
+ @payment_intent = payment_intent
+ @refund_application_fee = refund_application_fee
+ @refund_payment_config = refund_payment_config
+ @reverse_transfer = reverse_transfer
+ end
+ end
+
+ class SetReaderDisplayParams < Stripe::RequestParams
+ class Cart < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The price of the item in cents.
+ attr_accessor :amount
+ # The description or name of the item.
+ attr_accessor :description
+ # The quantity of the line item being purchased.
+ attr_accessor :quantity
+
+ def initialize(amount: nil, description: nil, quantity: nil)
+ @amount = amount
+ @description = description
+ @quantity = quantity
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Array of line items that were purchased.
+ attr_accessor :line_items
+ # The amount of tax in cents.
+ attr_accessor :tax
+ # Total balance of cart due in cents.
+ attr_accessor :total
+
+ def initialize(currency: nil, line_items: nil, tax: nil, total: nil)
+ @currency = currency
+ @line_items = line_items
+ @tax = tax
+ @total = total
+ end
+ end
+ # Cart
+ attr_accessor :cart
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Type
+ attr_accessor :type
+
+ def initialize(cart: nil, expand: nil, type: nil)
+ @cart = cart
+ @expand = expand
+ @type = type
+ end
+ end
+
+ class PresentPaymentMethodParams < Stripe::RequestParams
+ class CardPresent < Stripe::RequestParams
+ # The card number, as a string without any separators.
+ attr_accessor :number
+
+ def initialize(number: nil)
+ @number = number
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ # Card Number
+ attr_accessor :number
+
+ def initialize(number: nil)
+ @number = number
+ end
+ end
+ # Simulated on-reader tip amount.
+ attr_accessor :amount_tip
+ # Simulated data for the card_present payment method.
+ attr_accessor :card_present
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Simulated data for the interac_present payment method.
+ attr_accessor :interac_present
+ # Simulated payment type.
+ attr_accessor :type
+
+ def initialize(
+ amount_tip: nil,
+ card_present: nil,
+ expand: nil,
+ interac_present: nil,
+ type: nil
+ )
+ @amount_tip = amount_tip
+ @card_present = card_present
+ @expand = expand
+ @interac_present = interac_present
+ @type = type
+ end
+ end
+ # The most recent action performed by the reader.
+ attr_reader :action
+ # The current software version of the reader.
+ attr_reader :device_sw_version
+ # 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`.
+ attr_reader :device_type
+ # Unique identifier for the object.
+ attr_reader :id
+ # The local IP address of the reader.
+ attr_reader :ip_address
+ # Custom label given to the reader for easier identification.
+ attr_reader :label
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The location identifier of the reader.
+ attr_reader :location
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Serial number of the reader.
+ attr_reader :serial_number
+ # The networking status of the reader. We do not recommend using this field in flows that may block taking payments.
+ attr_reader :status
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Cancels the current reader action.
def cancel_action(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/test_helpers/test_clock.rb b/lib/stripe/resources/test_helpers/test_clock.rb
index 4f6559d3..2acf3683 100644
--- a/lib/stripe/resources/test_helpers/test_clock.rb
+++ b/lib/stripe/resources/test_helpers/test_clock.rb
@@ -16,6 +16,83 @@ module Stripe
"test_helpers.test_clock"
end
+ class StatusDetails < Stripe::StripeObject
+ class Advancing < Stripe::StripeObject
+ # The `frozen_time` that the Test Clock is advancing towards.
+ attr_reader :target_frozen_time
+ end
+ # Attribute for field advancing
+ attr_reader :advancing
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The initial frozen time for this test clock.
+ attr_accessor :frozen_time
+ # The name for this test clock.
+ attr_accessor :name
+
+ def initialize(expand: nil, frozen_time: nil, name: nil)
+ @expand = expand
+ @frozen_time = frozen_time
+ @name = name
+ end
+ end
+
+ class AdvanceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.
+ attr_accessor :frozen_time
+
+ def initialize(expand: nil, frozen_time: nil)
+ @expand = expand
+ @frozen_time = frozen_time
+ end
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Time at which this clock is scheduled to auto delete.
+ attr_reader :deletes_after
+ # Time at which all objects belonging to this clock are frozen.
+ attr_reader :frozen_time
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The custom name supplied at creation.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The status of the Test Clock.
+ attr_reader :status
+ # Attribute for field status_details
+ attr_reader :status_details
+ # Always true for a deleted object
+ attr_reader :deleted
+
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
def advance(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb
index ffef36de..2e0ff141 100644
--- a/lib/stripe/resources/token.rb
+++ b/lib/stripe/resources/token.rb
@@ -30,6 +30,1165 @@ module Stripe
"token"
end
+ class CreateParams < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document verifying the business.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # The company's primary address.
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_accessor :ownership_declaration
+ # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct.
+ attr_accessor :ownership_declaration_shown_and_signed
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_declaration_shown_and_signed: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @directors_provided = directors_provided
+ @directorship_declaration = directorship_declaration
+ @executives_provided = executives_provided
+ @export_license_id = export_license_id
+ @export_purpose_code = export_purpose_code
+ @name = name
+ @name_kana = name_kana
+ @name_kanji = name_kanji
+ @owners_provided = owners_provided
+ @ownership_declaration = ownership_declaration
+ @ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed
+ @ownership_exemption_reason = ownership_exemption_reason
+ @phone = phone
+ @registration_number = registration_number
+ @structure = structure
+ @tax_id = tax_id
+ @tax_id_registrar = tax_id_registrar
+ @vat_id = vat_id
+ @verification = verification
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ )
+ @director = director
+ @executive = executive
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # The individual's primary address.
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ attr_accessor :dob
+ # The individual's email address.
+ attr_accessor :email
+ # The individual's first name.
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The individual's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+ # The business type.
+ attr_accessor :business_type
+ # Information about the company or business.
+ attr_accessor :company
+ # Information about the person represented by the account.
+ attr_accessor :individual
+ # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(
+ business_type: nil,
+ company: nil,
+ individual: nil,
+ tos_shown_and_accepted: nil
+ )
+ @business_type = business_type
+ @company = company
+ @individual = individual
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class BankAccount < Stripe::RequestParams
+ # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ attr_accessor :account_type
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts)
+ attr_accessor :currency
+ # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`.
+ attr_accessor :payment_method
+ # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ country: nil,
+ currency: nil,
+ payment_method: nil,
+ routing_number: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @country = country
+ @currency = currency
+ @payment_method = payment_method
+ @routing_number = routing_number
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ attr_accessor :preferred
+
+ def initialize(preferred: nil)
+ @preferred = preferred
+ end
+ end
+ # City / District / Suburb / Town / Village.
+ attr_accessor :address_city
+ # Billing address country, if provided.
+ attr_accessor :address_country
+ # Address line 1 (Street address / PO Box / Company name).
+ attr_accessor :address_line1
+ # Address line 2 (Apartment / Suite / Unit / Building).
+ attr_accessor :address_line2
+ # State / County / Province / Region.
+ attr_accessor :address_state
+ # ZIP or postal code.
+ attr_accessor :address_zip
+ # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.
+ attr_accessor :currency
+ # Card security code. Highly recommended to always include this value.
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ attr_accessor :exp_month
+ # Two- or four-digit number representing the card's expiration year.
+ attr_accessor :exp_year
+ # Cardholder's full name.
+ attr_accessor :name
+ # Contains information about card networks used to process the payment.
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ attr_accessor :number
+
+ def initialize(
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ networks: nil,
+ number: nil
+ )
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @networks = networks
+ @number = number
+ end
+ end
+
+ class CvcUpdate < Stripe::RequestParams
+ # The CVC value, in string form.
+ attr_accessor :cvc
+
+ def initialize(cvc: nil)
+ @cvc = cvc
+ end
+ end
+
+ class Person < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ attr_accessor :account
+
+ def initialize(account: nil)
+ @account = account
+ end
+ end
+
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ attr_accessor :visa
+
+ def initialize(company_authorization: nil, passport: nil, visa: nil)
+ @company_authorization = company_authorization
+ @passport = passport
+ @visa = visa
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ )
+ @authorizer = authorizer
+ @director = director
+ @executive = executive
+ @legal_guardian = legal_guardian
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @representative = representative
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The person's email address.
+ attr_accessor :email
+ # The person's first name.
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ attr_accessor :nationality
+ # The person's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The person's registered address.
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ attr_accessor :verification
+
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @additional_tos_acceptances = additional_tos_acceptances
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @documents = documents
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @nationality = nationality
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class Pii < Stripe::RequestParams
+ # The `id_number` for the PII, in string form.
+ attr_accessor :id_number
+
+ def initialize(id_number: nil)
+ @id_number = id_number
+ end
+ end
+ # Information for the account this token represents.
+ attr_accessor :account
+ # The bank account this token will represent.
+ attr_accessor :bank_account
+ # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
+ attr_accessor :card
+ # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
+ attr_accessor :customer
+ # The updated CVC value this token represents.
+ attr_accessor :cvc_update
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information for the person this token represents.
+ attr_accessor :person
+ # The PII this token represents.
+ attr_accessor :pii
+
+ def initialize(
+ account: nil,
+ bank_account: nil,
+ card: nil,
+ customer: nil,
+ cvc_update: nil,
+ expand: nil,
+ person: nil,
+ pii: nil
+ )
+ @account = account
+ @bank_account = bank_account
+ @card = card
+ @customer = customer
+ @cvc_update = cvc_update
+ @expand = expand
+ @person = person
+ @pii = pii
+ end
+ end
+ # These bank accounts are payment methods on `Customer` objects.
+ #
+ # On the other hand [External Accounts](/api#external_accounts) are transfer
+ # destinations on `Account` objects for connected accounts.
+ # They can be bank accounts or debit cards as well, and are documented in the links above.
+ #
+ # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers)
+ attr_reader :bank_account
+ # You can store multiple cards on a customer in order to charge the customer
+ # later. You can also store multiple debit cards on a recipient in order to
+ # transfer to those cards later.
+ #
+ # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
+ attr_reader :card
+ # IP address of the client that generates the token.
+ attr_reader :client_ip
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Type of the token: `account`, `bank_account`, `card`, or `pii`.
+ attr_reader :type
+ # Determines if you have already used this token (you can only use tokens once).
+ attr_reader :used
+
# Creates a single-use token that represents a bank account's details.
# You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
def self.create(params = {}, opts = {})
diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb
index c0f65bb1..eff14cb5 100644
--- a/lib/stripe/resources/topup.rb
+++ b/lib/stripe/resources/topup.rb
@@ -17,6 +17,171 @@ module Stripe
"topup"
end
+ class ListParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A positive integer representing how much to transfer.
+ attr_accessor :amount
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.
+ attr_accessor :status
+
+ def initialize(
+ amount: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @amount = amount
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer representing how much to transfer.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).
+ attr_accessor :source
+ # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.
+ attr_accessor :statement_descriptor
+ # A string that identifies this top-up as part of a group.
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ source: nil,
+ statement_descriptor: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @source = source
+ @statement_descriptor = statement_descriptor
+ @transfer_group = transfer_group
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(description: nil, expand: nil, metadata: nil)
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Amount transferred.
+ attr_reader :amount
+ # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
+ attr_reader :expected_availability_date
+ # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).
+ attr_reader :failure_code
+ # Message to user further explaining reason for top-up failure if available.
+ attr_reader :failure_message
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The source field is deprecated. It might not always be present in the API response.
+ attr_reader :source
+ # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
+ attr_reader :statement_descriptor
+ # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.
+ attr_reader :status
+ # A string that identifies this top-up as part of a group.
+ attr_reader :transfer_group
+
# Cancels a top-up. Only pending top-ups can be canceled.
def cancel(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb
index 8c2295eb..d88b8cab 100644
--- a/lib/stripe/resources/transfer.rb
+++ b/lib/stripe/resources/transfer.rb
@@ -25,6 +25,150 @@ module Stripe
nested_resource_class_methods :reversal, operations: %i[create retrieve update list]
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return transfers that were created during the given date interval.
+ attr_accessor :created
+ # Only return transfers for the destination specified by this account ID.
+ attr_accessor :destination
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return transfers with the specified transfer group.
+ attr_accessor :transfer_group
+
+ def initialize(
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transfer_group: nil
+ )
+ @created = created
+ @destination = destination
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @transfer_group = transfer_group
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents (or local equivalent) representing how much to transfer.
+ attr_accessor :amount
+ # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The ID of a connected Stripe account. See the Connect documentation for details.
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
+ attr_accessor :source_transaction
+ # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.
+ attr_accessor :source_type
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ source_transaction: nil,
+ source_type: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @destination = destination
+ @expand = expand
+ @metadata = metadata
+ @source_transaction = source_transaction
+ @source_type = source_type
+ @transfer_group = transfer_group
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(description: nil, expand: nil, metadata: nil)
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+ # Amount in cents (or local equivalent) to be transferred.
+ attr_reader :amount
+ # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
+ attr_reader :amount_reversed
+ # Balance transaction that describes the impact of this transfer on your account balance.
+ attr_reader :balance_transaction
+ # Time that this record of the transfer was first created.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # ID of the Stripe account the transfer was sent to.
+ attr_reader :destination
+ # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
+ attr_reader :destination_payment
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # A list of reversals that have been applied to the transfer.
+ attr_reader :reversals
+ # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
+ attr_reader :reversed
+ # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.
+ attr_reader :source_transaction
+ # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.
+ attr_reader :source_type
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_reader :transfer_group
+
# To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/transfers", params: params, opts: opts)
diff --git a/lib/stripe/resources/treasury/credit_reversal.rb b/lib/stripe/resources/treasury/credit_reversal.rb
index edc7ed10..8b10dab8 100644
--- a/lib/stripe/resources/treasury/credit_reversal.rb
+++ b/lib/stripe/resources/treasury/credit_reversal.rb
@@ -13,6 +13,89 @@ module Stripe
"treasury.credit_reversal"
end
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when the CreditReversal changed status to `posted`
+ attr_reader :posted_at
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return CreditReversals for the ReceivedCredit ID.
+ attr_accessor :received_credit
+ # 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.
+ attr_accessor :starting_after
+ # Only return CreditReversals for a given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_credit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @received_credit = received_credit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ReceivedCredit to reverse.
+ attr_accessor :received_credit
+
+ def initialize(expand: nil, metadata: nil, received_credit: nil)
+ @expand = expand
+ @metadata = metadata
+ @received_credit = received_credit
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # The FinancialAccount to reverse funds from.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The rails used to reverse the funds.
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The ReceivedCredit being reversed.
+ attr_reader :received_credit
+ # Status of the CreditReversal
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# Reverses a ReceivedCredit and creates a CreditReversal object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/debit_reversal.rb b/lib/stripe/resources/treasury/debit_reversal.rb
index 52654500..4f73f68e 100644
--- a/lib/stripe/resources/treasury/debit_reversal.rb
+++ b/lib/stripe/resources/treasury/debit_reversal.rb
@@ -13,6 +13,100 @@ module Stripe
"treasury.debit_reversal"
end
+ class LinkedFlows < Stripe::StripeObject
+ # Set if there is an Issuing dispute associated with the DebitReversal.
+ attr_reader :issuing_dispute
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when the DebitReversal changed status to `completed`.
+ attr_reader :completed_at
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return DebitReversals for the ReceivedDebit ID.
+ attr_accessor :received_debit
+ # Only return DebitReversals for a given resolution.
+ attr_accessor :resolution
+ # 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.
+ attr_accessor :starting_after
+ # Only return DebitReversals for a given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_debit: nil,
+ resolution: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @received_debit = received_debit
+ @resolution = resolution
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ReceivedDebit to reverse.
+ attr_accessor :received_debit
+
+ def initialize(expand: nil, metadata: nil, received_debit: nil)
+ @expand = expand
+ @metadata = metadata
+ @received_debit = received_debit
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # The FinancialAccount to reverse funds from.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Other flows linked to a DebitReversal.
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The rails used to reverse the funds.
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The ReceivedDebit being reversed.
+ attr_reader :received_debit
+ # Status of the DebitReversal
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# Reverses a ReceivedDebit and creates a DebitReversal object.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb
index 0d82e725..ea9023a3 100644
--- a/lib/stripe/resources/treasury/financial_account.rb
+++ b/lib/stripe/resources/treasury/financial_account.rb
@@ -15,6 +15,730 @@ module Stripe
"treasury.financial_account"
end
+ class Balance < Stripe::StripeObject
+ # Funds the user can spend right now.
+ attr_reader :cash
+ # Funds not spendable yet, but will become available at a later time.
+ attr_reader :inbound_pending
+ # Funds in the account, but not spendable because they are being held for pending outbound flows.
+ attr_reader :outbound_pending
+ end
+
+ class FinancialAddress < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ # The name of the person or business that owns the bank account.
+ attr_reader :account_holder_name
+ # The account number.
+ attr_reader :account_number
+ # The last four characters of the account number.
+ attr_reader :account_number_last4
+ # Name of the bank.
+ attr_reader :bank_name
+ # Routing number for the account.
+ attr_reader :routing_number
+ end
+ # ABA Records contain U.S. bank account details per the ABA format.
+ attr_reader :aba
+ # The list of networks that the address supports
+ attr_reader :supported_networks
+ # The type of financial address
+ attr_reader :type
+ end
+
+ class PlatformRestrictions < Stripe::StripeObject
+ # Restricts all inbound money movement.
+ attr_reader :inbound_flows
+ # Restricts all outbound money movement.
+ attr_reader :outbound_flows
+ end
+
+ class StatusDetails < Stripe::StripeObject
+ class Closed < Stripe::StripeObject
+ # The array that contains reasons for a FinancialAccount closure.
+ attr_reader :reasons
+ end
+ # Details related to the closure of this FinancialAccount
+ attr_reader :closed
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return FinancialAccounts that were created during the given date interval.
+ attr_accessor :created
+ # An object ID cursor for use in pagination.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit ranging from 1 to 100 (defaults to 10).
+ attr_accessor :limit
+ # An object ID cursor for use in pagination.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ attr_accessor :aba
+
+ def initialize(aba: nil)
+ @aba = aba
+ end
+ end
+
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ attr_accessor :ach
+
+ def initialize(ach: nil)
+ @ach = ach
+ end
+ end
+
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ attr_accessor :outbound_transfers
+
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ )
+ @card_issuing = card_issuing
+ @deposit_insurance = deposit_insurance
+ @financial_addresses = financial_addresses
+ @inbound_transfers = inbound_transfers
+ @intra_stripe_flows = intra_stripe_flows
+ @outbound_payments = outbound_payments
+ @outbound_transfers = outbound_transfers
+ end
+ end
+
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ attr_accessor :outbound_flows
+
+ def initialize(inbound_flows: nil, outbound_flows: nil)
+ @inbound_flows = inbound_flows
+ @outbound_flows = outbound_flows
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
+ attr_accessor :features
+ # 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`.
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ attr_accessor :platform_restrictions
+ # The currencies the FinancialAccount can hold a balance in.
+ attr_accessor :supported_currencies
+
+ def initialize(
+ expand: nil,
+ features: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil,
+ supported_currencies: nil
+ )
+ @expand = expand
+ @features = features
+ @metadata = metadata
+ @nickname = nickname
+ @platform_restrictions = platform_restrictions
+ @supported_currencies = supported_currencies
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ attr_accessor :aba
+
+ def initialize(aba: nil)
+ @aba = aba
+ end
+ end
+
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ attr_accessor :ach
+
+ def initialize(ach: nil)
+ @ach = ach
+ end
+ end
+
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ attr_accessor :outbound_transfers
+
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ )
+ @card_issuing = card_issuing
+ @deposit_insurance = deposit_insurance
+ @financial_addresses = financial_addresses
+ @inbound_transfers = inbound_transfers
+ @intra_stripe_flows = intra_stripe_flows
+ @outbound_payments = outbound_payments
+ @outbound_transfers = outbound_transfers
+ end
+ end
+
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ attr_accessor :type
+
+ def initialize(financial_account: nil, payment_method: nil, type: nil)
+ @financial_account = financial_account
+ @payment_method = payment_method
+ @type = type
+ end
+ end
+
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ attr_accessor :outbound_flows
+
+ def initialize(inbound_flows: nil, outbound_flows: nil)
+ @inbound_flows = inbound_flows
+ @outbound_flows = outbound_flows
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
+ attr_accessor :features
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ attr_accessor :forwarding_settings
+ # 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`.
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ attr_accessor :platform_restrictions
+
+ def initialize(
+ expand: nil,
+ features: nil,
+ forwarding_settings: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil
+ )
+ @expand = expand
+ @features = features
+ @forwarding_settings = forwarding_settings
+ @metadata = metadata
+ @nickname = nickname
+ @platform_restrictions = platform_restrictions
+ end
+ end
+
+ class RetrieveFeaturesParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateFeaturesParams < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ attr_accessor :aba
+
+ def initialize(aba: nil)
+ @aba = aba
+ end
+ end
+
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ attr_accessor :ach
+
+ def initialize(ach: nil)
+ @ach = ach
+ end
+ end
+
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ attr_accessor :deposit_insurance
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ attr_accessor :outbound_transfers
+
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ expand: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ )
+ @card_issuing = card_issuing
+ @deposit_insurance = deposit_insurance
+ @expand = expand
+ @financial_addresses = financial_addresses
+ @inbound_transfers = inbound_transfers
+ @intra_stripe_flows = intra_stripe_flows
+ @outbound_payments = outbound_payments
+ @outbound_transfers = outbound_transfers
+ end
+ end
+
+ class CloseParams < Stripe::RequestParams
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ attr_accessor :type
+
+ def initialize(financial_account: nil, payment_method: nil, type: nil)
+ @financial_account = financial_account
+ @payment_method = payment_method
+ @type = type
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ attr_accessor :forwarding_settings
+
+ def initialize(expand: nil, forwarding_settings: nil)
+ @expand = expand
+ @forwarding_settings = forwarding_settings
+ end
+ end
+ # The array of paths to active Features in the Features hash.
+ attr_reader :active_features
+ # Balance information for the FinancialAccount
+ attr_reader :balance
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
+ # Stripe or the platform can control Features via the requested field.
+ attr_reader :features
+ # The set of credentials that resolve to a FinancialAccount.
+ attr_reader :financial_addresses
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field is_default
+ attr_reader :is_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # The nickname for the FinancialAccount.
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The array of paths to pending Features in the Features hash.
+ attr_reader :pending_features
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ attr_reader :platform_restrictions
+ # The array of paths to restricted Features in the Features hash.
+ attr_reader :restricted_features
+ # Status of this FinancialAccount.
+ attr_reader :status
+ # Attribute for field status_details
+ attr_reader :status_details
+ # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ attr_reader :supported_currencies
+
# Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
def close(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/financial_account_features.rb b/lib/stripe/resources/treasury/financial_account_features.rb
index e8849b8e..2bdf3fb5 100644
--- a/lib/stripe/resources/treasury/financial_account_features.rb
+++ b/lib/stripe/resources/treasury/financial_account_features.rb
@@ -10,6 +10,195 @@ module Stripe
def self.object_name
"treasury.financial_account_features"
end
+
+ class CardIssuing < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+
+ class DepositInsurance < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+
+ class FinancialAddresses < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling the ABA address feature
+ attr_reader :aba
+ end
+
+ class InboundTransfers < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling an inbound ACH specific feature
+ attr_reader :ach
+ end
+
+ class IntraStripeFlows < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+
+ class OutboundPayments < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+
+ class UsDomesticWire < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling an outbound ACH specific feature
+ attr_reader :ach
+ # Toggle settings for enabling/disabling a feature
+ attr_reader :us_domestic_wire
+ end
+
+ class OutboundTransfers < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+
+ class UsDomesticWire < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ attr_reader :requested
+ # Whether the Feature is operational.
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling an outbound ACH specific feature
+ attr_reader :ach
+ # Toggle settings for enabling/disabling a feature
+ attr_reader :us_domestic_wire
+ end
+ # Toggle settings for enabling/disabling a feature
+ attr_reader :card_issuing
+ # Toggle settings for enabling/disabling a feature
+ attr_reader :deposit_insurance
+ # Settings related to Financial Addresses features on a Financial Account
+ attr_reader :financial_addresses
+ # InboundTransfers contains inbound transfers features for a FinancialAccount.
+ attr_reader :inbound_transfers
+ # Toggle settings for enabling/disabling a feature
+ attr_reader :intra_stripe_flows
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Settings related to Outbound Payments features on a Financial Account
+ attr_reader :outbound_payments
+ # OutboundTransfers contains outbound transfers features for a FinancialAccount.
+ attr_reader :outbound_transfers
end
end
end
diff --git a/lib/stripe/resources/treasury/inbound_transfer.rb b/lib/stripe/resources/treasury/inbound_transfer.rb
index d901468e..47d8500b 100644
--- a/lib/stripe/resources/treasury/inbound_transfer.rb
+++ b/lib/stripe/resources/treasury/inbound_transfer.rb
@@ -15,6 +15,232 @@ module Stripe
"treasury.inbound_transfer"
end
+ class FailureDetails < Stripe::StripeObject
+ # Reason for the failure.
+ attr_reader :code
+ end
+
+ class LinkedFlows < Stripe::StripeObject
+ # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.
+ attr_reader :received_debit
+ end
+
+ class OriginPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_reader :network
+ # Routing number of the bank account.
+ attr_reader :routing_number
+ end
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # The type of the payment method used in the InboundTransfer.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when an InboundTransfer changed status to `canceled`.
+ attr_reader :canceled_at
+ # Timestamp describing when an InboundTransfer changed status to `failed`.
+ attr_reader :failed_at
+ # Timestamp describing when an InboundTransfer changed status to `succeeded`.
+ attr_reader :succeeded_at
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The origin payment method to be debited for the InboundTransfer.
+ attr_accessor :origin_payment_method
+ # The complete description that appears on your customers' statements. Maximum 10 characters.
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ origin_payment_method: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @origin_payment_method = origin_payment_method
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FailParams < Stripe::RequestParams
+ class FailureDetails < Stripe::RequestParams
+ # Reason for the failure.
+ attr_accessor :code
+
+ def initialize(code: nil)
+ @code = code
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about a failed InboundTransfer.
+ attr_accessor :failure_details
+
+ def initialize(expand: nil, failure_details: nil)
+ @expand = expand
+ @failure_details = failure_details
+ end
+ end
+
+ class ReturnInboundTransferParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class SucceedParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Returns `true` if the InboundTransfer is able to be canceled.
+ attr_reader :cancelable
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Details about this InboundTransfer's failure. Only set when status is `failed`.
+ attr_reader :failure_details
+ # The FinancialAccount that received the funds.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field linked_flows
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The origin payment method to be debited for an InboundTransfer.
+ attr_reader :origin_payment_method
+ # Details about the PaymentMethod for an InboundTransfer.
+ attr_reader :origin_payment_method_details
+ # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
+ attr_reader :returned
+ # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.
+ attr_reader :statement_descriptor
+ # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# Cancels an InboundTransfer.
def cancel(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/outbound_payment.rb b/lib/stripe/resources/treasury/outbound_payment.rb
index 9b3b7a5b..f482d9d9 100644
--- a/lib/stripe/resources/treasury/outbound_payment.rb
+++ b/lib/stripe/resources/treasury/outbound_payment.rb
@@ -17,6 +17,492 @@ module Stripe
"treasury.outbound_payment"
end
+ class DestinationPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ end
+
+ class FinancialAccount < Stripe::StripeObject
+ # Token of the FinancialAccount.
+ attr_reader :id
+ # The rails used to send funds.
+ attr_reader :network
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_reader :network
+ # Routing number of the bank account.
+ attr_reader :routing_number
+ end
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ attr_reader :financial_account
+ # The type of the payment method used in the OutboundPayment.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class EndUserDetails < Stripe::StripeObject
+ # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.
+ attr_reader :ip_address
+ # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ attr_reader :present
+ end
+
+ class ReturnedDetails < Stripe::StripeObject
+ # Reason for the return.
+ attr_reader :code
+ # The Transaction associated with this object.
+ attr_reader :transaction
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when an OutboundPayment changed status to `canceled`.
+ attr_reader :canceled_at
+ # Timestamp describing when an OutboundPayment changed status to `failed`.
+ attr_reader :failed_at
+ # Timestamp describing when an OutboundPayment changed status to `posted`.
+ attr_reader :posted_at
+ # Timestamp describing when an OutboundPayment changed status to `returned`.
+ attr_reader :returned_at
+ end
+
+ class TrackingDetails < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ # ACH trace ID of the OutboundPayment for payments sent over the `ach` network.
+ attr_reader :trace_id
+ end
+
+ class UsDomesticWire < Stripe::StripeObject
+ # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network.
+ attr_reader :chips
+ # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
+ attr_reader :imad
+ # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
+ attr_reader :omad
+ end
+ # Attribute for field ach
+ attr_reader :ach
+ # The US bank account network used to send funds.
+ attr_reader :type
+ # Attribute for field us_domestic_wire
+ attr_reader :us_domestic_wire
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return OutboundPayments that were created during the given date interval.
+ attr_accessor :created
+ # Only return OutboundPayments sent to this customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
+ attr_accessor :status
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # Required hash if type is set to `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ billing_details: nil,
+ financial_account: nil,
+ metadata: nil,
+ type: nil,
+ us_bank_account: nil
+ )
+ @billing_details = billing_details
+ @financial_account = financial_account
+ @metadata = metadata
+ @type = type
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(network: nil)
+ @network = network
+ end
+ end
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(us_bank_account: nil)
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class EndUserDetails < Stripe::RequestParams
+ # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
+ attr_accessor :ip_address
+ # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ attr_accessor :present
+
+ def initialize(ip_address: nil, present: nil)
+ @ip_address = ip_address
+ @present = present
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
+ attr_accessor :destination_payment_method_data
+ # Payment method-specific configuration for this OutboundPayment.
+ attr_accessor :destination_payment_method_options
+ # End user details.
+ attr_accessor :end_user_details
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment".
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ end_user_details: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @customer = customer
+ @description = description
+ @destination_payment_method = destination_payment_method
+ @destination_payment_method_data = destination_payment_method_data
+ @destination_payment_method_options = destination_payment_method_options
+ @end_user_details = end_user_details
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ attr_accessor :trace_id
+
+ def initialize(trace_id: nil)
+ @trace_id = trace_id
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :omad
+
+ def initialize(chips: nil, imad: nil, omad: nil)
+ @chips = chips
+ @imad = imad
+ @omad = omad
+ end
+ end
+ # ACH network tracking details.
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil)
+ @ach = ach
+ @type = type
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ attr_accessor :tracking_details
+
+ def initialize(expand: nil, tracking_details: nil)
+ @expand = expand
+ @tracking_details = tracking_details
+ end
+ end
+
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReturnOutboundPaymentParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # The return code to be set on the OutboundPayment object.
+ attr_accessor :code
+
+ def initialize(code: nil)
+ @code = code
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Optional hash to set the return code.
+ attr_accessor :returned_details
+
+ def initialize(expand: nil, returned_details: nil)
+ @expand = expand
+ @returned_details = returned_details
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Returns `true` if the object can be canceled, and `false` otherwise.
+ attr_reader :cancelable
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.
+ attr_reader :destination_payment_method
+ # Details about the PaymentMethod for an OutboundPayment.
+ attr_reader :destination_payment_method_details
+ # Details about the end user.
+ attr_reader :end_user_details
+ # The date when funds are expected to arrive in the destination account.
+ attr_reader :expected_arrival_date
+ # The FinancialAccount that funds were pulled from.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Details about a returned OutboundPayment. Only set when the status is `returned`.
+ attr_reader :returned_details
+ # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
+ attr_reader :statement_descriptor
+ # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # Details about network-specific tracking information if available.
+ attr_reader :tracking_details
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# Cancel an OutboundPayment.
def cancel(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/outbound_transfer.rb b/lib/stripe/resources/treasury/outbound_transfer.rb
index 3b1e66e1..704c925a 100644
--- a/lib/stripe/resources/treasury/outbound_transfer.rb
+++ b/lib/stripe/resources/treasury/outbound_transfer.rb
@@ -17,6 +17,347 @@ module Stripe
"treasury.outbound_transfer"
end
+ class DestinationPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ end
+
+ class FinancialAccount < Stripe::StripeObject
+ # Token of the FinancialAccount.
+ attr_reader :id
+ # The rails used to send funds.
+ attr_reader :network
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ attr_reader :mandate
+ # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_reader :network
+ # Routing number of the bank account.
+ attr_reader :routing_number
+ end
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ attr_reader :financial_account
+ # The type of the payment method used in the OutboundTransfer.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class ReturnedDetails < Stripe::StripeObject
+ # Reason for the return.
+ attr_reader :code
+ # The Transaction associated with this object.
+ attr_reader :transaction
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when an OutboundTransfer changed status to `canceled`
+ attr_reader :canceled_at
+ # Timestamp describing when an OutboundTransfer changed status to `failed`
+ attr_reader :failed_at
+ # Timestamp describing when an OutboundTransfer changed status to `posted`
+ attr_reader :posted_at
+ # Timestamp describing when an OutboundTransfer changed status to `returned`
+ attr_reader :returned_at
+ end
+
+ class TrackingDetails < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network.
+ attr_reader :trace_id
+ end
+
+ class UsDomesticWire < Stripe::StripeObject
+ # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
+ attr_reader :chips
+ # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
+ attr_reader :imad
+ # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
+ attr_reader :omad
+ end
+ # Attribute for field ach
+ attr_reader :ach
+ # The US bank account network used to send funds.
+ attr_reader :type
+ # Attribute for field us_domestic_wire
+ attr_reader :us_domestic_wire
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ attr_accessor :financial_account
+ # The type of the destination.
+ attr_accessor :type
+
+ def initialize(financial_account: nil, type: nil)
+ @financial_account = financial_account
+ @type = type
+ end
+ end
+
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(network: nil)
+ @network = network
+ end
+ end
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(us_bank_account: nil)
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundTransfer.
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
+ attr_accessor :destination_payment_method_data
+ # Hash describing payment method configuration details.
+ attr_accessor :destination_payment_method_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer".
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @destination_payment_method = destination_payment_method
+ @destination_payment_method_data = destination_payment_method_data
+ @destination_payment_method_options = destination_payment_method_options
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ attr_accessor :trace_id
+
+ def initialize(trace_id: nil)
+ @trace_id = trace_id
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :omad
+
+ def initialize(chips: nil, imad: nil, omad: nil)
+ @chips = chips
+ @imad = imad
+ @omad = omad
+ end
+ end
+ # ACH network tracking details.
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil)
+ @ach = ach
+ @type = type
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ attr_accessor :tracking_details
+
+ def initialize(expand: nil, tracking_details: nil)
+ @expand = expand
+ @tracking_details = tracking_details
+ end
+ end
+
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReturnOutboundTransferParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # Reason for the return.
+ attr_accessor :code
+
+ def initialize(code: nil)
+ @code = code
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about a returned OutboundTransfer.
+ attr_accessor :returned_details
+
+ def initialize(expand: nil, returned_details: nil)
+ @expand = expand
+ @returned_details = returned_details
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Returns `true` if the object can be canceled, and `false` otherwise.
+ attr_reader :cancelable
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # The PaymentMethod used as the payment instrument for an OutboundTransfer.
+ attr_reader :destination_payment_method
+ # Attribute for field destination_payment_method_details
+ attr_reader :destination_payment_method_details
+ # The date when funds are expected to arrive in the destination account.
+ attr_reader :expected_arrival_date
+ # The FinancialAccount that funds were pulled from.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Details about a returned OutboundTransfer. Only set when the status is `returned`.
+ attr_reader :returned_details
+ # Information about the OutboundTransfer to be sent to the recipient account.
+ attr_reader :statement_descriptor
+ # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+ # Details about network-specific tracking information if available.
+ attr_reader :tracking_details
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# An OutboundTransfer can be canceled if the funds have not yet been paid out.
def cancel(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/received_credit.rb b/lib/stripe/resources/treasury/received_credit.rb
index 1df02a6c..09707450 100644
--- a/lib/stripe/resources/treasury/received_credit.rb
+++ b/lib/stripe/resources/treasury/received_credit.rb
@@ -12,6 +12,243 @@ module Stripe
"treasury.received_credit"
end
+ class InitiatingPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ end
+
+ class FinancialAccount < Stripe::StripeObject
+ # The FinancialAccount ID.
+ attr_reader :id
+ # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
+ attr_reader :network
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Bank name.
+ attr_reader :bank_name
+ # The last four digits of the bank account number.
+ attr_reader :last4
+ # The routing number for the bank account.
+ attr_reader :routing_number
+ end
+ # Set when `type` is `balance`.
+ attr_reader :balance
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ attr_reader :financial_account
+ # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.
+ attr_reader :issuing_card
+ # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class LinkedFlows < Stripe::StripeObject
+ class SourceFlowDetails < Stripe::StripeObject
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ attr_reader :credit_reversal
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ attr_reader :outbound_payment
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ attr_reader :outbound_transfer
+ # A `Payout` object is created when you receive funds from Stripe, or when you
+ # initiate a payout to either a bank account or debit card of a [connected
+ # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
+ # and list all payouts. Payouts are made on [varying
+ # schedules](/docs/connect/manage-payout-schedule), depending on your country and
+ # industry.
+ #
+ # Related guide: [Receiving payouts](https://stripe.com/docs/payouts)
+ attr_reader :payout
+ # The type of the source flow that originated the ReceivedCredit.
+ attr_reader :type
+ end
+ # The CreditReversal created as a result of this ReceivedCredit being reversed.
+ attr_reader :credit_reversal
+ # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.
+ attr_reader :issuing_authorization
+ # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.
+ attr_reader :issuing_transaction
+ # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.
+ attr_reader :source_flow
+ # The expandable object of the source flow.
+ attr_reader :source_flow_details
+ # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).
+ attr_reader :source_flow_type
+ end
+
+ class ReversalDetails < Stripe::StripeObject
+ # Time before which a ReceivedCredit can be reversed.
+ attr_reader :deadline
+ # Set if a ReceivedCredit cannot be reversed.
+ attr_reader :restricted_reason
+ end
+
+ class ListParams < Stripe::RequestParams
+ class LinkedFlows < Stripe::RequestParams
+ # The source flow type.
+ attr_accessor :source_flow_type
+
+ def initialize(source_flow_type: nil)
+ @source_flow_type = source_flow_type
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount that received the funds.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return ReceivedCredits described by the flow.
+ attr_accessor :linked_flows
+ # 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.
+ attr_accessor :starting_after
+ # Only return ReceivedCredits that have the given status: `succeeded` or `failed`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ linked_flows: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @linked_flows = linked_flows
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ attr_accessor :account_holder_name
+ # The bank account number.
+ attr_accessor :account_number
+ # The bank account's routing number.
+ attr_accessor :routing_number
+
+ def initialize(account_holder_name: nil, account_number: nil, routing_number: nil)
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @routing_number = routing_number
+ end
+ end
+ # The source type.
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(type: nil, us_bank_account: nil)
+ @type = type
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @financial_account = financial_account
+ @initiating_payment_method_details = initiating_payment_method_details
+ @network = network
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
+ attr_reader :failure_code
+ # The FinancialAccount that received the funds.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field initiating_payment_method_details
+ attr_reader :initiating_payment_method_details
+ # Attribute for field linked_flows
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The rails used to send the funds.
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Details describing when a ReceivedCredit may be reversed.
+ attr_reader :reversal_details
+ # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.
+ attr_reader :status
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# Returns a list of ReceivedCredits.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/received_debit.rb b/lib/stripe/resources/treasury/received_debit.rb
index f45425c0..fe965296 100644
--- a/lib/stripe/resources/treasury/received_debit.rb
+++ b/lib/stripe/resources/treasury/received_debit.rb
@@ -12,6 +12,202 @@ module Stripe
"treasury.received_debit"
end
+ class InitiatingPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_reader :line2
+ # ZIP or postal code.
+ attr_reader :postal_code
+ # State, county, province, or region.
+ attr_reader :state
+ end
+ # Attribute for field address
+ attr_reader :address
+ # Email address.
+ attr_reader :email
+ # Full name.
+ attr_reader :name
+ end
+
+ class FinancialAccount < Stripe::StripeObject
+ # The FinancialAccount ID.
+ attr_reader :id
+ # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
+ attr_reader :network
+ end
+
+ class UsBankAccount < Stripe::StripeObject
+ # Bank name.
+ attr_reader :bank_name
+ # The last four digits of the bank account number.
+ attr_reader :last4
+ # The routing number for the bank account.
+ attr_reader :routing_number
+ end
+ # Set when `type` is `balance`.
+ attr_reader :balance
+ # Attribute for field billing_details
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ attr_reader :financial_account
+ # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.
+ attr_reader :issuing_card
+ # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
+ attr_reader :type
+ # Attribute for field us_bank_account
+ attr_reader :us_bank_account
+ end
+
+ class LinkedFlows < Stripe::StripeObject
+ # The DebitReversal created as a result of this ReceivedDebit being reversed.
+ attr_reader :debit_reversal
+ # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.
+ attr_reader :inbound_transfer
+ # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.
+ attr_reader :issuing_authorization
+ # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.
+ attr_reader :issuing_transaction
+ # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object.
+ attr_reader :payout
+ end
+
+ class ReversalDetails < Stripe::StripeObject
+ # Time before which a ReceivedDebit can be reversed.
+ attr_reader :deadline
+ # Set if a ReceivedDebit can't be reversed.
+ attr_reader :restricted_reason
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount that funds were pulled from.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return ReceivedDebits that have the given status: `succeeded` or `failed`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ attr_accessor :account_holder_name
+ # The bank account number.
+ attr_accessor :account_number
+ # The bank account's routing number.
+ attr_accessor :routing_number
+
+ def initialize(account_holder_name: nil, account_number: nil, routing_number: nil)
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @routing_number = routing_number
+ end
+ end
+ # The source type.
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(type: nil, us_bank_account: nil)
+ @type = type
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @financial_account = financial_account
+ @initiating_payment_method_details = initiating_payment_method_details
+ @network = network
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
+ attr_reader :failure_code
+ # The FinancialAccount that funds were pulled from.
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ attr_reader :id
+ # Attribute for field initiating_payment_method_details
+ attr_reader :initiating_payment_method_details
+ # Attribute for field linked_flows
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # The network used for the ReceivedDebit.
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Details describing when a ReceivedDebit might be reversed.
+ attr_reader :reversal_details
+ # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.
+ attr_reader :status
+ # The Transaction associated with this object.
+ attr_reader :transaction
+
# Returns a list of ReceivedDebits.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/transaction.rb b/lib/stripe/resources/treasury/transaction.rb
index bc5ae337..e920b3a4 100644
--- a/lib/stripe/resources/treasury/transaction.rb
+++ b/lib/stripe/resources/treasury/transaction.rb
@@ -12,6 +12,173 @@ module Stripe
"treasury.transaction"
end
+ class BalanceImpact < Stripe::StripeObject
+ # The change made to funds the user can spend right now.
+ attr_reader :cash
+ # The change made to funds that are not spendable yet, but will become available at a later time.
+ attr_reader :inbound_pending
+ # The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
+ attr_reader :outbound_pending
+ end
+
+ class FlowDetails < Stripe::StripeObject
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ attr_reader :credit_reversal
+ # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
+ attr_reader :debit_reversal
+ # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
+ #
+ # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
+ attr_reader :inbound_transfer
+ # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
+ # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
+ # purchase to be completed successfully.
+ #
+ # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
+ attr_reader :issuing_authorization
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ attr_reader :outbound_payment
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ attr_reader :outbound_transfer
+ # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
+ attr_reader :received_credit
+ # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
+ attr_reader :received_debit
+ # Type of the flow that created the Transaction. Set to the same value as `flow_type`.
+ attr_reader :type
+ end
+
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when the Transaction changed status to `posted`.
+ attr_reader :posted_at
+ # Timestamp describing when the Transaction changed status to `void`.
+ attr_reader :void_at
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class StatusTransitions < Stripe::RequestParams
+ class PostedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Returns Transactions with `posted_at` within the specified range.
+ attr_accessor :posted_at
+
+ def initialize(posted_at: nil)
+ @posted_at = posted_at
+ end
+ end
+ # Only return Transactions that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.
+ attr_accessor :order_by
+ # 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.
+ attr_accessor :starting_after
+ # Only return Transactions that have the given status: `open`, `posted`, or `void`.
+ attr_accessor :status
+ # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
+ attr_accessor :status_transitions
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ status: nil,
+ status_transitions: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @order_by = order_by
+ @starting_after = starting_after
+ @status = status
+ @status_transitions = status_transitions
+ end
+ end
+ # Amount (in cents) transferred.
+ attr_reader :amount
+ # Change to a FinancialAccount's balance
+ attr_reader :balance_impact
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_reader :description
+ # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
+ attr_reader :entries
+ # The FinancialAccount associated with this object.
+ attr_reader :financial_account
+ # ID of the flow that created the Transaction.
+ attr_reader :flow
+ # Details of the flow that created the Transaction.
+ attr_reader :flow_details
+ # Type of the flow that created the Transaction.
+ attr_reader :flow_type
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # Status of the Transaction.
+ attr_reader :status
+ # Attribute for field status_transitions
+ attr_reader :status_transitions
+
# Retrieves a list of Transaction objects.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/treasury/transaction_entry.rb b/lib/stripe/resources/treasury/transaction_entry.rb
index 439e0a32..db4db9f7 100644
--- a/lib/stripe/resources/treasury/transaction_entry.rb
+++ b/lib/stripe/resources/treasury/transaction_entry.rb
@@ -12,6 +12,154 @@ module Stripe
"treasury.transaction_entry"
end
+ class BalanceImpact < Stripe::StripeObject
+ # The change made to funds the user can spend right now.
+ attr_reader :cash
+ # The change made to funds that are not spendable yet, but will become available at a later time.
+ attr_reader :inbound_pending
+ # The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
+ attr_reader :outbound_pending
+ end
+
+ class FlowDetails < Stripe::StripeObject
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ attr_reader :credit_reversal
+ # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
+ attr_reader :debit_reversal
+ # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
+ #
+ # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
+ attr_reader :inbound_transfer
+ # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
+ # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
+ # purchase to be completed successfully.
+ #
+ # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
+ attr_reader :issuing_authorization
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ attr_reader :outbound_payment
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ attr_reader :outbound_transfer
+ # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
+ attr_reader :received_credit
+ # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
+ attr_reader :received_debit
+ # Type of the flow that created the Transaction. Set to the same value as `flow_type`.
+ attr_reader :type
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class EffectiveAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return TransactionEntries that were created during the given date interval.
+ attr_accessor :created
+ # Attribute for param field effective_at
+ attr_accessor :effective_at
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.
+ attr_accessor :order_by
+ # 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.
+ attr_accessor :starting_after
+ # Only return TransactionEntries associated with this Transaction.
+ attr_accessor :transaction
+
+ def initialize(
+ created: nil,
+ effective_at: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ transaction: nil
+ )
+ @created = created
+ @effective_at = effective_at
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @order_by = order_by
+ @starting_after = starting_after
+ @transaction = transaction
+ end
+ end
+ # Change to a FinancialAccount's balance
+ attr_reader :balance_impact
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # 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).
+ attr_reader :currency
+ # When the TransactionEntry will impact the FinancialAccount's balance.
+ attr_reader :effective_at
+ # The FinancialAccount associated with this object.
+ attr_reader :financial_account
+ # Token of the flow associated with the TransactionEntry.
+ attr_reader :flow
+ # Details of the flow associated with the TransactionEntry.
+ attr_reader :flow_details
+ # Type of the flow associated with the TransactionEntry.
+ attr_reader :flow_type
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The Transaction associated with this object.
+ attr_reader :transaction
+ # The specific money movement that generated the TransactionEntry.
+ attr_reader :type
+
# Retrieves a list of TransactionEntry objects.
def self.list(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/resources/v2/amount.rb b/lib/stripe/resources/v2/amount.rb
new file mode 100644
index 00000000..357bf059
--- /dev/null
+++ b/lib/stripe/resources/v2/amount.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+module Stripe
+ module V2
+ class Amount
+ attr_reader :value, :currency
+ end
+ end
+end
diff --git a/lib/stripe/resources/v2/billing/meter_event.rb b/lib/stripe/resources/v2/billing/meter_event.rb
index 95f1e494..108f37f4 100644
--- a/lib/stripe/resources/v2/billing/meter_event.rb
+++ b/lib/stripe/resources/v2/billing/meter_event.rb
@@ -10,6 +10,24 @@ module Stripe
def self.object_name
"v2.billing.meter_event"
end
+
+ # The creation time of this meter event.
+ attr_reader :created
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_reader :event_name
+ # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period.
+ attr_reader :identifier
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ attr_reader :object
+ # The payload of the event. This must contain the fields corresponding to a meter’s
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
+ # `value_settings.event_payload_key` (default is `value`). Read more about the payload.
+ attr_reader :payload
+ # The time of the event. Must be within the past 35 calendar days or up to
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
+ attr_reader :timestamp
end
end
end
diff --git a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb
index f26f857f..a8d099ea 100644
--- a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb
+++ b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb
@@ -9,6 +9,27 @@ module Stripe
def self.object_name
"v2.billing.meter_event_adjustment"
end
+
+ class Cancel < Stripe::StripeObject
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ attr_reader :identifier
+ end
+ # Specifies which event to cancel.
+ attr_reader :cancel
+ # The time the adjustment was created.
+ attr_reader :created
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_reader :event_name
+ # The unique id of this meter event adjustment.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ attr_reader :object
+ # Open Enum. The meter event adjustment’s status.
+ attr_reader :status
+ # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ attr_reader :type
end
end
end
diff --git a/lib/stripe/resources/v2/billing/meter_event_session.rb b/lib/stripe/resources/v2/billing/meter_event_session.rb
index 0bb2ac4d..b3c71355 100644
--- a/lib/stripe/resources/v2/billing/meter_event_session.rb
+++ b/lib/stripe/resources/v2/billing/meter_event_session.rb
@@ -9,6 +9,20 @@ module Stripe
def self.object_name
"v2.billing.meter_event_session"
end
+
+ # The authentication token for this session. Use this token when calling the
+ # high-throughput meter event API.
+ attr_reader :authentication_token
+ # The creation time of this session.
+ attr_reader :created
+ # The time at which this session will expire.
+ attr_reader :expires_at
+ # The unique id of this auth session.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ attr_reader :object
end
end
end
diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb
index d41bc188..8cf52887 100644
--- a/lib/stripe/resources/v2/event.rb
+++ b/lib/stripe/resources/v2/event.rb
@@ -9,6 +9,33 @@ module Stripe
def self.object_name
"v2.core.event"
end
+
+ class Reason < Stripe::StripeObject
+ class Request < Stripe::StripeObject
+ # ID of the API request that caused the event.
+ attr_reader :id
+ # The idempotency key transmitted during the request.
+ attr_reader :idempotency_key
+ end
+ # Event reason type.
+ attr_reader :type
+ # Information on the API request that instigated the event.
+ attr_reader :request
+ end
+ # Authentication context needed to fetch the event or related object.
+ attr_reader :context
+ # Time at which the object was created.
+ attr_reader :created
+ # Unique identifier for the event.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ attr_reader :object
+ # Reason for the event.
+ attr_reader :reason
+ # The type of the event.
+ attr_reader :type
end
end
end
diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb
index 9a0bb079..13398ea9 100644
--- a/lib/stripe/resources/v2/event_destination.rb
+++ b/lib/stripe/resources/v2/event_destination.rb
@@ -9,6 +9,65 @@ module Stripe
def self.object_name
"v2.core.event_destination"
end
+
+ class StatusDetails < Stripe::StripeObject
+ class Disabled < Stripe::StripeObject
+ # Reason event destination has been disabled.
+ attr_reader :reason
+ end
+ # Details about why the event destination has been disabled.
+ attr_reader :disabled
+ end
+
+ class AmazonEventbridge < Stripe::StripeObject
+ # The AWS account ID.
+ attr_reader :aws_account_id
+ # The ARN of the AWS event source.
+ attr_reader :aws_event_source_arn
+ # The state of the AWS event source.
+ attr_reader :aws_event_source_status
+ end
+
+ class WebhookEndpoint < Stripe::StripeObject
+ # The signing secret of the webhook endpoint, only includable on creation.
+ attr_reader :signing_secret
+ # The URL of the webhook endpoint, includable.
+ attr_reader :url
+ end
+ # Time at which the object was created.
+ attr_reader :created
+ # An optional description of what the event destination is used for.
+ attr_reader :description
+ # The list of events to enable for this endpoint.
+ attr_reader :enabled_events
+ # Payload type of events being subscribed to.
+ attr_reader :event_payload
+ # Where events should be routed from.
+ attr_reader :events_from
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # Metadata.
+ attr_reader :metadata
+ # Event destination name.
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ attr_reader :object
+ # If using the snapshot event payload, the API version events are rendered as.
+ attr_reader :snapshot_api_version
+ # Status. It can be set to either enabled or disabled.
+ attr_reader :status
+ # Additional information about event destination status.
+ attr_reader :status_details
+ # Event destination type.
+ attr_reader :type
+ # Time at which the object was last updated.
+ attr_reader :updated
+ # Amazon EventBridge configuration.
+ attr_reader :amazon_eventbridge
+ # Webhook endpoint configuration.
+ attr_reader :webhook_endpoint
end
end
end
diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb
index e5c5b21d..365cf666 100644
--- a/lib/stripe/resources/webhook_endpoint.rb
+++ b/lib/stripe/resources/webhook_endpoint.rb
@@ -20,6 +20,119 @@ module Stripe
"webhook_endpoint"
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An optional description of what the webhook is used for.
+ attr_accessor :description
+ # Disable the webhook endpoint if set to true.
+ attr_accessor :disabled
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ attr_accessor :url
+
+ def initialize(
+ description: nil,
+ disabled: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ )
+ @description = description
+ @disabled = disabled
+ @enabled_events = enabled_events
+ @expand = expand
+ @metadata = metadata
+ @url = url
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
+ attr_accessor :api_version
+ # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
+ attr_accessor :connect
+ # An optional description of what the webhook is used for.
+ attr_accessor :description
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ attr_accessor :url
+
+ def initialize(
+ api_version: nil,
+ connect: nil,
+ description: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ )
+ @api_version = api_version
+ @connect = connect
+ @description = description
+ @enabled_events = enabled_events
+ @expand = expand
+ @metadata = metadata
+ @url = url
+ end
+ end
+ # The API version events are rendered as for this webhook endpoint.
+ attr_reader :api_version
+ # The ID of the associated Connect application.
+ attr_reader :application
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ attr_reader :created
+ # An optional description of what the webhook is used for.
+ attr_reader :description
+ # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
+ attr_reader :enabled_events
+ # Unique identifier for the object.
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ attr_reader :livemode
+ # 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.
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ attr_reader :object
+ # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
+ attr_reader :secret
+ # The status of the webhook. It can be `enabled` or `disabled`.
+ attr_reader :status
+ # The URL of the webhook endpoint.
+ attr_reader :url
+ # Always true for a deleted object
+ attr_reader :deleted
+
# A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
def self.create(params = {}, opts = {})
request_stripe_object(
diff --git a/lib/stripe/services/account_capability_service.rb b/lib/stripe/services/account_capability_service.rb
index 61b95869..26172297 100644
--- a/lib/stripe/services/account_capability_service.rb
+++ b/lib/stripe/services/account_capability_service.rb
@@ -3,6 +3,38 @@
module Stripe
class AccountCapabilityService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
+ #
+ # If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
+ attr_accessor :requested
+
+ def initialize(expand: nil, requested: nil)
+ @expand = expand
+ @requested = requested
+ end
+ end
+
# Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
def list(account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/account_external_account_service.rb b/lib/stripe/services/account_external_account_service.rb
index 98ceee1e..7f104c4c 100644
--- a/lib/stripe/services/account_external_account_service.rb
+++ b/lib/stripe/services/account_external_account_service.rb
@@ -3,6 +3,256 @@
module Stripe
class AccountExternalAccountService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check.
+ attr_accessor :bank_account_ownership_verification
+
+ def initialize(bank_account_ownership_verification: nil)
+ @bank_account_ownership_verification = bank_account_ownership_verification
+ end
+ end
+ # The name of the person or business that owns the bank account.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. This can be either `individual` or `company`.
+ attr_accessor :account_holder_type
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ attr_accessor :account_type
+ # City/District/Suburb/Town/Village.
+ attr_accessor :address_city
+ # Billing address country, if provided when creating card.
+ attr_accessor :address_country
+ # Address line 1 (Street address/PO Box/Company name).
+ attr_accessor :address_line1
+ # Address line 2 (Apartment/Suite/Unit/Building).
+ attr_accessor :address_line2
+ # State/County/Province/Region.
+ attr_accessor :address_state
+ # ZIP or postal code.
+ attr_accessor :address_zip
+ # When set to true, this becomes the default external account for its currency.
+ attr_accessor :default_for_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # Two digit number representing the card’s expiration month.
+ attr_accessor :exp_month
+ # Four digit number representing the card’s expiration year.
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Cardholder name.
+ attr_accessor :name
+
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_type: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ default_for_currency: nil,
+ documents: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ metadata: nil,
+ name: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_type = account_type
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @default_for_currency = default_for_currency
+ @documents = documents
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filter external accounts according to a particular object type.
+ attr_accessor :object
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, object: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @object = object
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ )
+ @object = object
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @country = country
+ @currency = currency
+ @routing_number = routing_number
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field address_city
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field cvc
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ attr_accessor :exp_year
+ # Attribute for param field name
+ attr_accessor :name
+ # Attribute for param field number
+ attr_accessor :number
+ # 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.
+ attr_accessor :metadata
+
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil
+ )
+ @object = object
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @number = number
+ @metadata = metadata
+ end
+ end
+
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field token
+ attr_accessor :token
+
+ def initialize(object: nil, currency: nil, token: nil)
+ @object = object
+ @currency = currency
+ @token = token
+ end
+ end
+ # When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.
+ attr_accessor :default_for_currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead.
+ attr_accessor :external_account
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(default_for_currency: nil, expand: nil, external_account: nil, metadata: nil)
+ @default_for_currency = default_for_currency
+ @expand = expand
+ @external_account = external_account
+ @metadata = metadata
+ end
+ end
+
# Create an external account for a given account.
def create(account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/account_link_service.rb b/lib/stripe/services/account_link_service.rb
index f5318f1a..095635f1 100644
--- a/lib/stripe/services/account_link_service.rb
+++ b/lib/stripe/services/account_link_service.rb
@@ -3,6 +3,52 @@
module Stripe
class AccountLinkService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class CollectionOptions < Stripe::RequestParams
+ # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
+ attr_accessor :fields
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
+ attr_accessor :future_requirements
+
+ def initialize(fields: nil, future_requirements: nil)
+ @fields = fields
+ @future_requirements = future_requirements
+ end
+ end
+ # The identifier of the account to create an account link for.
+ attr_accessor :account
+ # The collect parameter is deprecated. Use `collection_options` instead.
+ attr_accessor :collect
+ # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
+ attr_accessor :collection_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
+ attr_accessor :refresh_url
+ # The URL that the user will be redirected to upon leaving or completing the linked flow.
+ attr_accessor :return_url
+ # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
+ attr_accessor :type
+
+ def initialize(
+ account: nil,
+ collect: nil,
+ collection_options: nil,
+ expand: nil,
+ refresh_url: nil,
+ return_url: nil,
+ type: nil
+ )
+ @account = account
+ @collect = collect
+ @collection_options = collection_options
+ @expand = expand
+ @refresh_url = refresh_url
+ @return_url = return_url
+ @type = type
+ end
+ end
+
# Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/account_login_link_service.rb b/lib/stripe/services/account_login_link_service.rb
index c02e7c24..80b16c8b 100644
--- a/lib/stripe/services/account_login_link_service.rb
+++ b/lib/stripe/services/account_login_link_service.rb
@@ -3,6 +3,15 @@
module Stripe
class AccountLoginLinkService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a login link for a connected account to access the Express Dashboard.
#
# You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
diff --git a/lib/stripe/services/account_person_service.rb b/lib/stripe/services/account_person_service.rb
index cdee2fed..c0e027bf 100644
--- a/lib/stripe/services/account_person_service.rb
+++ b/lib/stripe/services/account_person_service.rb
@@ -3,6 +3,881 @@
module Stripe
class AccountPersonService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ attr_accessor :account
+
+ def initialize(account: nil)
+ @account = account
+ end
+ end
+
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ attr_accessor :visa
+
+ def initialize(company_authorization: nil, passport: nil, visa: nil)
+ @company_authorization = company_authorization
+ @passport = passport
+ @visa = visa
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ )
+ @authorizer = authorizer
+ @director = director
+ @executive = executive
+ @legal_guardian = legal_guardian
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @representative = representative
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The person's email address.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The person's first name.
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ attr_accessor :nationality
+ # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.
+ attr_accessor :person_token
+ # The person's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The person's registered address.
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ attr_accessor :verification
+
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ person_token: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @additional_tos_acceptances = additional_tos_acceptances
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @documents = documents
+ @email = email
+ @expand = expand
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @nationality = nationality
+ @person_token = person_token
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Relationship < Stripe::RequestParams
+ # A filter on the list of people returned based on whether these people are authorizers of the account's representative.
+ attr_accessor :authorizer
+ # A filter on the list of people returned based on whether these people are directors of the account's company.
+ attr_accessor :director
+ # A filter on the list of people returned based on whether these people are executives of the account's company.
+ attr_accessor :executive
+ # A filter on the list of people returned based on whether these people are legal guardians of the account's representative.
+ attr_accessor :legal_guardian
+ # A filter on the list of people returned based on whether these people are owners of the account's company.
+ attr_accessor :owner
+ # A filter on the list of people returned based on whether these people are the representative of the account's company.
+ attr_accessor :representative
+
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ representative: nil
+ )
+ @authorizer = authorizer
+ @director = director
+ @executive = executive
+ @legal_guardian = legal_guardian
+ @owner = owner
+ @representative = representative
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filters on the list of people returned based on the person's relationship to the account's company.
+ attr_accessor :relationship
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ relationship: nil,
+ starting_after: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @relationship = relationship
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ attr_accessor :account
+
+ def initialize(account: nil)
+ @account = account
+ end
+ end
+
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ attr_accessor :visa
+
+ def initialize(company_authorization: nil, passport: nil, visa: nil)
+ @company_authorization = company_authorization
+ @passport = passport
+ @visa = visa
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ )
+ @authorizer = authorizer
+ @director = director
+ @executive = executive
+ @legal_guardian = legal_guardian
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @representative = representative
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The person's email address.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The person's first name.
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ attr_accessor :nationality
+ # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.
+ attr_accessor :person_token
+ # The person's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The person's registered address.
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ attr_accessor :verification
+
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ person_token: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @additional_tos_acceptances = additional_tos_acceptances
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @documents = documents
+ @email = email
+ @expand = expand
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @nationality = nationality
+ @person_token = person_token
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
# Creates a new person.
def create(account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/account_service.rb b/lib/stripe/services/account_service.rb
index 8b546c36..313e6cab 100644
--- a/lib/stripe/services/account_service.rb
+++ b/lib/stripe/services/account_service.rb
@@ -13,6 +13,3980 @@ module Stripe
@persons = Stripe::AccountPersonService.new(@requestor)
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ )
+ @object = object
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @country = country
+ @currency = currency
+ @routing_number = routing_number
+ end
+ end
+
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ attr_accessor :fiscal_year_end
+
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil)
+ @amount = amount
+ @currency = currency
+ @fiscal_year_end = fiscal_year_end
+ end
+ end
+
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+
+ def initialize(amount: nil, currency: nil)
+ @amount = amount
+ @currency = currency
+ end
+ end
+
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ attr_accessor :support_url
+ # The business's publicly available website.
+ attr_accessor :url
+
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ )
+ @annual_revenue = annual_revenue
+ @estimated_worker_count = estimated_worker_count
+ @mcc = mcc
+ @monthly_estimated_revenue = monthly_estimated_revenue
+ @name = name
+ @product_description = product_description
+ @support_address = support_address
+ @support_email = support_email
+ @support_phone = support_phone
+ @support_url = support_url
+ @url = url
+ end
+ end
+
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # The acss_debit_payments capability.
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ attr_accessor :transfers
+ # The treasury capability.
+ attr_accessor :treasury
+ # The twint_payments capability.
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ attr_accessor :zip_payments
+
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ )
+ @acss_debit_payments = acss_debit_payments
+ @affirm_payments = affirm_payments
+ @afterpay_clearpay_payments = afterpay_clearpay_payments
+ @alma_payments = alma_payments
+ @amazon_pay_payments = amazon_pay_payments
+ @au_becs_debit_payments = au_becs_debit_payments
+ @bacs_debit_payments = bacs_debit_payments
+ @bancontact_payments = bancontact_payments
+ @bank_transfer_payments = bank_transfer_payments
+ @billie_payments = billie_payments
+ @blik_payments = blik_payments
+ @boleto_payments = boleto_payments
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @cartes_bancaires_payments = cartes_bancaires_payments
+ @cashapp_payments = cashapp_payments
+ @eps_payments = eps_payments
+ @fpx_payments = fpx_payments
+ @gb_bank_transfer_payments = gb_bank_transfer_payments
+ @giropay_payments = giropay_payments
+ @grabpay_payments = grabpay_payments
+ @ideal_payments = ideal_payments
+ @india_international_payments = india_international_payments
+ @jcb_payments = jcb_payments
+ @jp_bank_transfer_payments = jp_bank_transfer_payments
+ @kakao_pay_payments = kakao_pay_payments
+ @klarna_payments = klarna_payments
+ @konbini_payments = konbini_payments
+ @kr_card_payments = kr_card_payments
+ @legacy_payments = legacy_payments
+ @link_payments = link_payments
+ @mobilepay_payments = mobilepay_payments
+ @multibanco_payments = multibanco_payments
+ @mx_bank_transfer_payments = mx_bank_transfer_payments
+ @naver_pay_payments = naver_pay_payments
+ @oxxo_payments = oxxo_payments
+ @p24_payments = p24_payments
+ @pay_by_bank_payments = pay_by_bank_payments
+ @payco_payments = payco_payments
+ @paynow_payments = paynow_payments
+ @promptpay_payments = promptpay_payments
+ @revolut_pay_payments = revolut_pay_payments
+ @samsung_pay_payments = samsung_pay_payments
+ @satispay_payments = satispay_payments
+ @sepa_bank_transfer_payments = sepa_bank_transfer_payments
+ @sepa_debit_payments = sepa_debit_payments
+ @sofort_payments = sofort_payments
+ @swish_payments = swish_payments
+ @tax_reporting_us_1099_k = tax_reporting_us_1099_k
+ @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc
+ @transfers = transfers
+ @treasury = treasury
+ @twint_payments = twint_payments
+ @us_bank_account_ach_payments = us_bank_account_ach_payments
+ @us_bank_transfer_payments = us_bank_transfer_payments
+ @zip_payments = zip_payments
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field address_city
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field cvc
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ attr_accessor :exp_year
+ # Attribute for param field name
+ attr_accessor :name
+ # Attribute for param field number
+ attr_accessor :number
+ # 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.
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ attr_accessor :default_for_currency
+
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ )
+ @object = object
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @number = number
+ @metadata = metadata
+ @default_for_currency = default_for_currency
+ end
+ end
+
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field token
+ attr_accessor :token
+
+ def initialize(object: nil, currency: nil, token: nil)
+ @object = object
+ @currency = currency
+ @token = token
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document verifying the business.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # The company's primary address.
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @directors_provided = directors_provided
+ @directorship_declaration = directorship_declaration
+ @executives_provided = executives_provided
+ @export_license_id = export_license_id
+ @export_purpose_code = export_purpose_code
+ @name = name
+ @name_kana = name_kana
+ @name_kanji = name_kanji
+ @owners_provided = owners_provided
+ @ownership_declaration = ownership_declaration
+ @ownership_exemption_reason = ownership_exemption_reason
+ @phone = phone
+ @registration_number = registration_number
+ @structure = structure
+ @tax_id = tax_id
+ @tax_id_registrar = tax_id_registrar
+ @vat_id = vat_id
+ @verification = verification
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ )
+ @bank_account_ownership_verification = bank_account_ownership_verification
+ @company_license = company_license
+ @company_memorandum_of_association = company_memorandum_of_association
+ @company_ministerial_decree = company_ministerial_decree
+ @company_registration_verification = company_registration_verification
+ @company_tax_id_verification = company_tax_id_verification
+ @proof_of_registration = proof_of_registration
+ @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
+ end
+ end
+
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ attr_accessor :payments_pricing
+
+ def initialize(payments_pricing: nil)
+ @payments_pricing = payments_pricing
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ )
+ @director = director
+ @executive = executive
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # The individual's primary address.
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ attr_accessor :dob
+ # The individual's email address.
+ attr_accessor :email
+ # The individual's first name.
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The individual's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ attr_accessor :display_name
+
+ def initialize(display_name: nil)
+ @display_name = display_name
+ end
+ end
+
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ attr_accessor :secondary_color
+
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil)
+ @icon = icon
+ @logo = logo
+ @primary_color = primary_color
+ @secondary_color = secondary_color
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ attr_accessor :cvc_failure
+
+ def initialize(avs_failure: nil, cvc_failure: nil)
+ @avs_failure = avs_failure
+ @cvc_failure = cvc_failure
+ end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kanji
+
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ )
+ @decline_on = decline_on
+ @statement_descriptor_prefix = statement_descriptor_prefix
+ @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana
+ @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji
+ end
+ end
+
+ class Invoices < Stripe::RequestParams
+ # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
+ attr_accessor :default_account_tax_ids
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ attr_accessor :hosted_payment_method_save
+
+ def initialize(default_account_tax_ids: nil, hosted_payment_method_save: nil)
+ @default_account_tax_ids = default_account_tax_ids
+ @hosted_payment_method_save = hosted_payment_method_save
+ end
+ end
+
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kanji
+
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ )
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_kana = statement_descriptor_kana
+ @statement_descriptor_kanji = statement_descriptor_kanji
+ end
+ end
+
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ attr_accessor :weekly_anchor
+
+ def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
+ @delay_days = delay_days
+ @interval = interval
+ @monthly_anchor = monthly_anchor
+ @weekly_anchor = weekly_anchor
+ end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ attr_accessor :statement_descriptor
+
+ def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil)
+ @debit_negative_balances = debit_negative_balances
+ @schedule = schedule
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+ # Settings specific to Bacs Direct Debit payments.
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ attr_accessor :card_payments
+ # Settings specific to the account's use of Invoices.
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ attr_accessor :treasury
+
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ )
+ @bacs_debit_payments = bacs_debit_payments
+ @branding = branding
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @invoices = invoices
+ @payments = payments
+ @payouts = payouts
+ @treasury = treasury
+ end
+ end
+
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ attr_accessor :ip
+ # The user's service agreement type.
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @service_agreement = service_agreement
+ @user_agent = user_agent
+ end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ attr_accessor :account_token
+ # Business information about the account.
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :company
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ attr_accessor :tos_acceptance
+
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil
+ )
+ @account_token = account_token
+ @business_profile = business_profile
+ @business_type = business_type
+ @capabilities = capabilities
+ @company = company
+ @default_currency = default_currency
+ @documents = documents
+ @email = email
+ @expand = expand
+ @external_account = external_account
+ @groups = groups
+ @individual = individual
+ @metadata = metadata
+ @settings = settings
+ @tos_acceptance = tos_acceptance
+ end
+ end
+
+ class RetrieveCurrentParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return connected accounts that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ )
+ @object = object
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @country = country
+ @currency = currency
+ @routing_number = routing_number
+ end
+ end
+
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ attr_accessor :fiscal_year_end
+
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil)
+ @amount = amount
+ @currency = currency
+ @fiscal_year_end = fiscal_year_end
+ end
+ end
+
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+
+ def initialize(amount: nil, currency: nil)
+ @amount = amount
+ @currency = currency
+ end
+ end
+
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ attr_accessor :support_url
+ # The business's publicly available website.
+ attr_accessor :url
+
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ )
+ @annual_revenue = annual_revenue
+ @estimated_worker_count = estimated_worker_count
+ @mcc = mcc
+ @monthly_estimated_revenue = monthly_estimated_revenue
+ @name = name
+ @product_description = product_description
+ @support_address = support_address
+ @support_email = support_email
+ @support_phone = support_phone
+ @support_url = support_url
+ @url = url
+ end
+ end
+
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # The acss_debit_payments capability.
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ attr_accessor :transfers
+ # The treasury capability.
+ attr_accessor :treasury
+ # The twint_payments capability.
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ attr_accessor :zip_payments
+
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ )
+ @acss_debit_payments = acss_debit_payments
+ @affirm_payments = affirm_payments
+ @afterpay_clearpay_payments = afterpay_clearpay_payments
+ @alma_payments = alma_payments
+ @amazon_pay_payments = amazon_pay_payments
+ @au_becs_debit_payments = au_becs_debit_payments
+ @bacs_debit_payments = bacs_debit_payments
+ @bancontact_payments = bancontact_payments
+ @bank_transfer_payments = bank_transfer_payments
+ @billie_payments = billie_payments
+ @blik_payments = blik_payments
+ @boleto_payments = boleto_payments
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @cartes_bancaires_payments = cartes_bancaires_payments
+ @cashapp_payments = cashapp_payments
+ @eps_payments = eps_payments
+ @fpx_payments = fpx_payments
+ @gb_bank_transfer_payments = gb_bank_transfer_payments
+ @giropay_payments = giropay_payments
+ @grabpay_payments = grabpay_payments
+ @ideal_payments = ideal_payments
+ @india_international_payments = india_international_payments
+ @jcb_payments = jcb_payments
+ @jp_bank_transfer_payments = jp_bank_transfer_payments
+ @kakao_pay_payments = kakao_pay_payments
+ @klarna_payments = klarna_payments
+ @konbini_payments = konbini_payments
+ @kr_card_payments = kr_card_payments
+ @legacy_payments = legacy_payments
+ @link_payments = link_payments
+ @mobilepay_payments = mobilepay_payments
+ @multibanco_payments = multibanco_payments
+ @mx_bank_transfer_payments = mx_bank_transfer_payments
+ @naver_pay_payments = naver_pay_payments
+ @oxxo_payments = oxxo_payments
+ @p24_payments = p24_payments
+ @pay_by_bank_payments = pay_by_bank_payments
+ @payco_payments = payco_payments
+ @paynow_payments = paynow_payments
+ @promptpay_payments = promptpay_payments
+ @revolut_pay_payments = revolut_pay_payments
+ @samsung_pay_payments = samsung_pay_payments
+ @satispay_payments = satispay_payments
+ @sepa_bank_transfer_payments = sepa_bank_transfer_payments
+ @sepa_debit_payments = sepa_debit_payments
+ @sofort_payments = sofort_payments
+ @swish_payments = swish_payments
+ @tax_reporting_us_1099_k = tax_reporting_us_1099_k
+ @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc
+ @transfers = transfers
+ @treasury = treasury
+ @twint_payments = twint_payments
+ @us_bank_account_ach_payments = us_bank_account_ach_payments
+ @us_bank_transfer_payments = us_bank_transfer_payments
+ @zip_payments = zip_payments
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field address_city
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field cvc
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ attr_accessor :exp_year
+ # Attribute for param field name
+ attr_accessor :name
+ # Attribute for param field number
+ attr_accessor :number
+ # 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.
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ attr_accessor :default_for_currency
+
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ )
+ @object = object
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @number = number
+ @metadata = metadata
+ @default_for_currency = default_for_currency
+ end
+ end
+
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ attr_accessor :object
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field token
+ attr_accessor :token
+
+ def initialize(object: nil, currency: nil, token: nil)
+ @object = object
+ @currency = currency
+ @token = token
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document verifying the business.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # The company's primary address.
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @directors_provided = directors_provided
+ @directorship_declaration = directorship_declaration
+ @executives_provided = executives_provided
+ @export_license_id = export_license_id
+ @export_purpose_code = export_purpose_code
+ @name = name
+ @name_kana = name_kana
+ @name_kanji = name_kanji
+ @owners_provided = owners_provided
+ @ownership_declaration = ownership_declaration
+ @ownership_exemption_reason = ownership_exemption_reason
+ @phone = phone
+ @registration_number = registration_number
+ @structure = structure
+ @tax_id = tax_id
+ @tax_id_registrar = tax_id_registrar
+ @vat_id = vat_id
+ @verification = verification
+ end
+ end
+
+ class Controller < Stripe::RequestParams
+ class Fees < Stripe::RequestParams
+ # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
+ attr_accessor :payer
+
+ def initialize(payer: nil)
+ @payer = payer
+ end
+ end
+
+ class Losses < Stripe::RequestParams
+ # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
+ attr_accessor :payments
+
+ def initialize(payments: nil)
+ @payments = payments
+ end
+ end
+
+ class StripeDashboard < Stripe::RequestParams
+ # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # A hash of configuration for who pays Stripe fees for product usage on this account.
+ attr_accessor :fees
+ # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
+ attr_accessor :losses
+ # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
+ attr_accessor :requirement_collection
+ # A hash of configuration for Stripe-hosted dashboards.
+ attr_accessor :stripe_dashboard
+
+ def initialize(fees: nil, losses: nil, requirement_collection: nil, stripe_dashboard: nil)
+ @fees = fees
+ @losses = losses
+ @requirement_collection = requirement_collection
+ @stripe_dashboard = stripe_dashboard
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ )
+ @bank_account_ownership_verification = bank_account_ownership_verification
+ @company_license = company_license
+ @company_memorandum_of_association = company_memorandum_of_association
+ @company_ministerial_decree = company_ministerial_decree
+ @company_registration_verification = company_registration_verification
+ @company_tax_id_verification = company_tax_id_verification
+ @proof_of_registration = proof_of_registration
+ @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
+ end
+ end
+
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ attr_accessor :payments_pricing
+
+ def initialize(payments_pricing: nil)
+ @payments_pricing = payments_pricing
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ )
+ @director = director
+ @executive = executive
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # The individual's primary address.
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ attr_accessor :dob
+ # The individual's email address.
+ attr_accessor :email
+ # The individual's first name.
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The individual's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ attr_accessor :display_name
+
+ def initialize(display_name: nil)
+ @display_name = display_name
+ end
+ end
+
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ attr_accessor :secondary_color
+
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil)
+ @icon = icon
+ @logo = logo
+ @primary_color = primary_color
+ @secondary_color = secondary_color
+ end
+ end
+
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ attr_accessor :cvc_failure
+
+ def initialize(avs_failure: nil, cvc_failure: nil)
+ @avs_failure = avs_failure
+ @cvc_failure = cvc_failure
+ end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ attr_accessor :statement_descriptor_prefix_kanji
+
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ )
+ @decline_on = decline_on
+ @statement_descriptor_prefix = statement_descriptor_prefix
+ @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana
+ @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji
+ end
+ end
+
+ class Invoices < Stripe::RequestParams
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ attr_accessor :hosted_payment_method_save
+
+ def initialize(hosted_payment_method_save: nil)
+ @hosted_payment_method_save = hosted_payment_method_save
+ end
+ end
+
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ attr_accessor :statement_descriptor_kanji
+
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ )
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_kana = statement_descriptor_kana
+ @statement_descriptor_kanji = statement_descriptor_kanji
+ end
+ end
+
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ attr_accessor :weekly_anchor
+
+ def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
+ @delay_days = delay_days
+ @interval = interval
+ @monthly_anchor = monthly_anchor
+ @weekly_anchor = weekly_anchor
+ end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ attr_accessor :statement_descriptor
+
+ def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil)
+ @debit_negative_balances = debit_negative_balances
+ @schedule = schedule
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ attr_accessor :tos_acceptance
+
+ def initialize(tos_acceptance: nil)
+ @tos_acceptance = tos_acceptance
+ end
+ end
+ # Settings specific to Bacs Direct Debit.
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ attr_accessor :card_payments
+ # Settings specific to the account’s use of Invoices.
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ attr_accessor :treasury
+
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ )
+ @bacs_debit_payments = bacs_debit_payments
+ @branding = branding
+ @card_issuing = card_issuing
+ @card_payments = card_payments
+ @invoices = invoices
+ @payments = payments
+ @payouts = payouts
+ @treasury = treasury
+ end
+ end
+
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ attr_accessor :ip
+ # The user's service agreement type.
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @service_agreement = service_agreement
+ @user_agent = user_agent
+ end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ attr_accessor :account_token
+ # Business information about the account.
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :company
+ # A hash of configuration describing the account controller's attributes.
+ attr_accessor :controller
+ # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
+ attr_accessor :country
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ attr_accessor :tos_acceptance
+ # The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
+ attr_accessor :type
+
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ controller: nil,
+ country: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil,
+ type: nil
+ )
+ @account_token = account_token
+ @business_profile = business_profile
+ @business_type = business_type
+ @capabilities = capabilities
+ @company = company
+ @controller = controller
+ @country = country
+ @default_currency = default_currency
+ @documents = documents
+ @email = email
+ @expand = expand
+ @external_account = external_account
+ @groups = groups
+ @individual = individual
+ @metadata = metadata
+ @settings = settings
+ @tos_acceptance = tos_acceptance
+ @type = type
+ end
+ end
+
+ class RejectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.
+ attr_accessor :reason
+
+ def initialize(expand: nil, reason: nil)
+ @expand = expand
+ @reason = reason
+ end
+ end
+
# With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
# To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
#
diff --git a/lib/stripe/services/account_session_service.rb b/lib/stripe/services/account_session_service.rb
index 2947d1f0..2da90401 100644
--- a/lib/stripe/services/account_session_service.rb
+++ b/lib/stripe/services/account_session_service.rb
@@ -3,6 +3,490 @@
module Stripe
class AccountSessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class AccountManagement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class AccountOnboarding < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Balances < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :standard_payouts
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @edit_payout_schedule = edit_payout_schedule
+ @external_account_collection = external_account_collection
+ @instant_payouts = instant_payouts
+ @standard_payouts = standard_payouts
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class FinancialAccount < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow external accounts to be linked for money transfer.
+ attr_accessor :external_account_collection
+ # Whether to allow sending money.
+ attr_accessor :send_money
+ # Whether to allow transferring balance.
+ attr_accessor :transfer_balance
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil,
+ send_money: nil,
+ transfer_balance: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ @send_money = send_money
+ @transfer_balance = transfer_balance
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class FinancialAccountTransactions < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card spend dispute management features.
+ attr_accessor :card_spend_dispute_management
+
+ def initialize(card_spend_dispute_management: nil)
+ @card_spend_dispute_management = card_spend_dispute_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class IssuingCard < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ attr_accessor :cardholder_management
+ # Whether to allow spend control management features.
+ attr_accessor :spend_control_management
+
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ spend_control_management: nil
+ )
+ @card_management = card_management
+ @card_spend_dispute_management = card_spend_dispute_management
+ @cardholder_management = cardholder_management
+ @spend_control_management = spend_control_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class IssuingCardsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ attr_accessor :cardholder_management
+ # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow spend control management features.
+ attr_accessor :spend_control_management
+
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ disable_stripe_user_authentication: nil,
+ spend_control_management: nil
+ )
+ @card_management = card_management
+ @card_spend_dispute_management = card_spend_dispute_management
+ @cardholder_management = cardholder_management
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @spend_control_management = spend_control_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class NotificationBanner < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @external_account_collection = external_account_collection
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class PaymentDetails < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ attr_accessor :refund_management
+
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ )
+ @capture_payments = capture_payments
+ @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management
+ @dispute_management = dispute_management
+ @refund_management = refund_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Payments < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ attr_accessor :refund_management
+
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ )
+ @capture_payments = capture_payments
+ @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management
+ @dispute_management = dispute_management
+ @refund_management = refund_management
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class Payouts < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ attr_accessor :standard_payouts
+
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ )
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
+ @edit_payout_schedule = edit_payout_schedule
+ @external_account_collection = external_account_collection
+ @instant_payouts = instant_payouts
+ @standard_payouts = standard_payouts
+ end
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class PayoutsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class TaxRegistrations < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class TaxSettings < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ end
+ # Whether the embedded component is enabled.
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+ # Configuration for the account management embedded component.
+ attr_accessor :account_management
+ # Configuration for the account onboarding embedded component.
+ attr_accessor :account_onboarding
+ # Configuration for the balances embedded component.
+ attr_accessor :balances
+ # Configuration for the documents embedded component.
+ attr_accessor :documents
+ # Configuration for the financial account embedded component.
+ attr_accessor :financial_account
+ # Configuration for the financial account transactions embedded component.
+ attr_accessor :financial_account_transactions
+ # Configuration for the issuing card embedded component.
+ attr_accessor :issuing_card
+ # Configuration for the issuing cards list embedded component.
+ attr_accessor :issuing_cards_list
+ # Configuration for the notification banner embedded component.
+ attr_accessor :notification_banner
+ # Configuration for the payment details embedded component.
+ attr_accessor :payment_details
+ # Configuration for the payments embedded component.
+ attr_accessor :payments
+ # Configuration for the payouts embedded component.
+ attr_accessor :payouts
+ # Configuration for the payouts list embedded component.
+ attr_accessor :payouts_list
+ # Configuration for the tax registrations embedded component.
+ attr_accessor :tax_registrations
+ # Configuration for the tax settings embedded component.
+ attr_accessor :tax_settings
+
+ def initialize(
+ account_management: nil,
+ account_onboarding: nil,
+ balances: nil,
+ documents: nil,
+ financial_account: nil,
+ financial_account_transactions: nil,
+ issuing_card: nil,
+ issuing_cards_list: nil,
+ notification_banner: nil,
+ payment_details: nil,
+ payments: nil,
+ payouts: nil,
+ payouts_list: nil,
+ tax_registrations: nil,
+ tax_settings: nil
+ )
+ @account_management = account_management
+ @account_onboarding = account_onboarding
+ @balances = balances
+ @documents = documents
+ @financial_account = financial_account
+ @financial_account_transactions = financial_account_transactions
+ @issuing_card = issuing_card
+ @issuing_cards_list = issuing_cards_list
+ @notification_banner = notification_banner
+ @payment_details = payment_details
+ @payments = payments
+ @payouts = payouts
+ @payouts_list = payouts_list
+ @tax_registrations = tax_registrations
+ @tax_settings = tax_settings
+ end
+ end
+ # The identifier of the account to create an Account Session for.
+ attr_accessor :account
+ # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
+ attr_accessor :components
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(account: nil, components: nil, expand: nil)
+ @account = account
+ @components = components
+ @expand = expand
+ end
+ end
+
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/apple_pay_domain_service.rb b/lib/stripe/services/apple_pay_domain_service.rb
index 8adbb1e9..569e4c5b 100644
--- a/lib/stripe/services/apple_pay_domain_service.rb
+++ b/lib/stripe/services/apple_pay_domain_service.rb
@@ -3,6 +3,57 @@
module Stripe
class ApplePayDomainService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ attr_accessor :domain_name
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ domain_name: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @domain_name = domain_name
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ attr_accessor :domain_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(domain_name: nil, expand: nil)
+ @domain_name = domain_name
+ @expand = expand
+ end
+ end
+
# Create an apple pay domain.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/application_fee_refund_service.rb b/lib/stripe/services/application_fee_refund_service.rb
index 962ea39b..a336ef8f 100644
--- a/lib/stripe/services/application_fee_refund_service.rb
+++ b/lib/stripe/services/application_fee_refund_service.rb
@@ -3,6 +3,60 @@
module Stripe
class ApplicationFeeRefundService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(amount: nil, expand: nil, metadata: nil)
+ @amount = amount
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# Refunds an application fee that has previously been collected but not yet refunded.
# Funds will be refunded to the Stripe account from which the fee was originally collected.
#
diff --git a/lib/stripe/services/application_fee_service.rb b/lib/stripe/services/application_fee_service.rb
index 75e84256..5a40a563 100644
--- a/lib/stripe/services/application_fee_service.rb
+++ b/lib/stripe/services/application_fee_service.rb
@@ -10,6 +10,63 @@ module Stripe
@refunds = Stripe::ApplicationFeeRefundService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return application fees for the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return applications fees that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/apps/secret_service.rb b/lib/stripe/services/apps/secret_service.rb
index c08d5657..75efa94a 100644
--- a/lib/stripe/services/apps/secret_service.rb
+++ b/lib/stripe/services/apps/secret_service.rb
@@ -4,6 +4,122 @@
module Stripe
module Apps
class SecretService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, scope: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @scope = scope
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The Unix timestamp for the expiry time of the secret, after which the secret deletes.
+ attr_accessor :expires_at
+ # A name for the secret that's unique within the scope.
+ attr_accessor :name
+ # The plaintext secret value to be stored.
+ attr_accessor :payload
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+
+ def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @name = name
+ @payload = payload
+ @scope = scope
+ end
+ end
+
+ class FindParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+
+ def initialize(expand: nil, name: nil, scope: nil)
+ @expand = expand
+ @name = name
+ @scope = scope
+ end
+ end
+
+ class DeleteWhereParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ attr_accessor :user
+
+ def initialize(type: nil, user: nil)
+ @type = type
+ @user = user
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ attr_accessor :scope
+
+ def initialize(expand: nil, name: nil, scope: nil)
+ @expand = expand
+ @name = name
+ @scope = scope
+ end
+ end
+
# Create or replace a secret in the secret store.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/balance_service.rb b/lib/stripe/services/balance_service.rb
index 787b4c38..2849e754 100644
--- a/lib/stripe/services/balance_service.rb
+++ b/lib/stripe/services/balance_service.rb
@@ -3,6 +3,15 @@
module Stripe
class BalanceService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieves the current account balance, based on the authentication that was used to make the request.
# For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
def retrieve(params = {}, opts = {})
diff --git a/lib/stripe/services/balance_transaction_service.rb b/lib/stripe/services/balance_transaction_service.rb
index 7f856eb8..1e1e6e15 100644
--- a/lib/stripe/services/balance_transaction_service.rb
+++ b/lib/stripe/services/balance_transaction_service.rb
@@ -3,6 +3,75 @@
module Stripe
class BalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return transactions that were created during the given date interval.
+ attr_accessor :created
+ # Only return transactions in a certain currency. 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).
+ attr_accessor :currency
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
+ attr_accessor :payout
+ # Only returns the original transaction.
+ attr_accessor :source
+ # 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.
+ attr_accessor :starting_after
+ # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
+ attr_accessor :type
+
+ def initialize(
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payout: nil,
+ source: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @created = created
+ @currency = currency
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payout = payout
+ @source = source
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
#
# Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
diff --git a/lib/stripe/services/billing/alert_service.rb b/lib/stripe/services/billing/alert_service.rb
index e076a803..2b02af2c 100644
--- a/lib/stripe/services/billing/alert_service.rb
+++ b/lib/stripe/services/billing/alert_service.rb
@@ -4,6 +4,119 @@
module Stripe
module Billing
class AlertService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Filter results to only include this type of alert.
+ attr_accessor :alert_type
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filter results to only include alerts with the given meter.
+ attr_accessor :meter
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ alert_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ meter: nil,
+ starting_after: nil
+ )
+ @alert_type = alert_type
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @meter = meter
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class UsageThreshold < Stripe::RequestParams
+ class Filter < Stripe::RequestParams
+ # Limit the scope to this usage alert only to this customer.
+ attr_accessor :customer
+ # What type of filter is being applied to this usage alert.
+ attr_accessor :type
+
+ def initialize(customer: nil, type: nil)
+ @customer = customer
+ @type = type
+ end
+ end
+ # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ attr_accessor :filters
+ # Defines at which value the alert will fire.
+ attr_accessor :gte
+ # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
+ attr_accessor :meter
+ # Whether the alert should only fire only once, or once per billing cycle.
+ attr_accessor :recurrence
+
+ def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil)
+ @filters = filters
+ @gte = gte
+ @meter = meter
+ @recurrence = recurrence
+ end
+ end
+ # The type of alert to create.
+ attr_accessor :alert_type
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The title of the alert.
+ attr_accessor :title
+ # The configuration of the usage threshold.
+ attr_accessor :usage_threshold
+
+ def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil)
+ @alert_type = alert_type
+ @expand = expand
+ @title = title
+ @usage_threshold = usage_threshold
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Reactivates this alert, allowing it to trigger again.
def activate(id, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/credit_balance_summary_service.rb b/lib/stripe/services/billing/credit_balance_summary_service.rb
index 8ddc2627..8393d865 100644
--- a/lib/stripe/services/billing/credit_balance_summary_service.rb
+++ b/lib/stripe/services/billing/credit_balance_summary_service.rb
@@ -4,6 +4,54 @@
module Stripe
module Billing
class CreditBalanceSummaryService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ class Filter < Stripe::RequestParams
+ class ApplicabilityScope < Stripe::RequestParams
+ class Price < Stripe::RequestParams
+ # The price ID this credit grant should apply to.
+ attr_accessor :id
+
+ def initialize(id: nil)
+ @id = id
+ end
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ attr_accessor :price_type
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ attr_accessor :prices
+
+ def initialize(price_type: nil, prices: nil)
+ @price_type = price_type
+ @prices = prices
+ end
+ end
+ # The billing credit applicability scope for which to fetch credit balance summary.
+ attr_accessor :applicability_scope
+ # The credit grant for which to fetch credit balance summary.
+ attr_accessor :credit_grant
+ # Specify the type of this filter.
+ attr_accessor :type
+
+ def initialize(applicability_scope: nil, credit_grant: nil, type: nil)
+ @applicability_scope = applicability_scope
+ @credit_grant = credit_grant
+ @type = type
+ end
+ end
+ # The customer for which to fetch credit balance summary.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The filter criteria for the credit balance summary.
+ attr_accessor :filter
+
+ def initialize(customer: nil, expand: nil, filter: nil)
+ @customer = customer
+ @expand = expand
+ @filter = filter
+ end
+ end
+
# Retrieves the credit balance summary for a customer.
def retrieve(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/credit_balance_transaction_service.rb b/lib/stripe/services/billing/credit_balance_transaction_service.rb
index 7bba1bf4..d6faecb9 100644
--- a/lib/stripe/services/billing/credit_balance_transaction_service.rb
+++ b/lib/stripe/services/billing/credit_balance_transaction_service.rb
@@ -4,6 +4,46 @@
module Stripe
module Billing
class CreditBalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The credit grant for which to fetch credit balance transactions.
+ attr_accessor :credit_grant
+ # The customer for which to fetch credit balance transactions.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ credit_grant: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @credit_grant = credit_grant
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieve a list of credit balance transactions.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/credit_grant_service.rb b/lib/stripe/services/billing/credit_grant_service.rb
index ccb7414b..8ee1e448 100644
--- a/lib/stripe/services/billing/credit_grant_service.rb
+++ b/lib/stripe/services/billing/credit_grant_service.rb
@@ -4,6 +4,172 @@
module Stripe
module Billing
class CreditGrantService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Only return credit grants for this customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ class Monetary < Stripe::RequestParams
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
+ attr_accessor :currency
+ # A positive integer representing the amount of the credit grant.
+ attr_accessor :value
+
+ def initialize(currency: nil, value: nil)
+ @currency = currency
+ @value = value
+ end
+ end
+ # The monetary amount.
+ attr_accessor :monetary
+ # Specify the type of this amount. We currently only support `monetary` billing credits.
+ attr_accessor :type
+
+ def initialize(monetary: nil, type: nil)
+ @monetary = monetary
+ @type = type
+ end
+ end
+
+ class ApplicabilityConfig < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ class Price < Stripe::RequestParams
+ # The price ID this credit grant should apply to.
+ attr_accessor :id
+
+ def initialize(id: nil)
+ @id = id
+ end
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ attr_accessor :price_type
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ attr_accessor :prices
+
+ def initialize(price_type: nil, prices: nil)
+ @price_type = price_type
+ @prices = prices
+ end
+ end
+ # Specify the scope of this applicability config.
+ attr_accessor :scope
+
+ def initialize(scope: nil)
+ @scope = scope
+ end
+ end
+ # Amount of this credit grant.
+ attr_accessor :amount
+ # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
+ attr_accessor :applicability_config
+ # The category of this credit grant.
+ attr_accessor :category
+ # ID of the customer to receive the billing credits.
+ attr_accessor :customer
+ # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The time when the billing credits expire. If not specified, the billing credits don't expire.
+ attr_accessor :expires_at
+ # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ attr_accessor :metadata
+ # A descriptive name shown in the Dashboard.
+ attr_accessor :name
+ # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
+ attr_accessor :priority
+
+ def initialize(
+ amount: nil,
+ applicability_config: nil,
+ category: nil,
+ customer: nil,
+ effective_at: nil,
+ expand: nil,
+ expires_at: nil,
+ metadata: nil,
+ name: nil,
+ priority: nil
+ )
+ @amount = amount
+ @applicability_config = applicability_config
+ @category = category
+ @customer = customer
+ @effective_at = effective_at
+ @expand = expand
+ @expires_at = expires_at
+ @metadata = metadata
+ @name = name
+ @priority = priority
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
+ attr_accessor :expires_at
+ # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, expires_at: nil, metadata: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @metadata = metadata
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class VoidGrantParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a credit grant.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/meter_event_adjustment_service.rb b/lib/stripe/services/billing/meter_event_adjustment_service.rb
index f38e0d9a..9697a526 100644
--- a/lib/stripe/services/billing/meter_event_adjustment_service.rb
+++ b/lib/stripe/services/billing/meter_event_adjustment_service.rb
@@ -4,6 +4,32 @@
module Stripe
module Billing
class MeterEventAdjustmentService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Cancel < Stripe::RequestParams
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ attr_accessor :identifier
+
+ def initialize(identifier: nil)
+ @identifier = identifier
+ end
+ end
+ # Specifies which event to cancel.
+ attr_accessor :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ attr_accessor :type
+
+ def initialize(cancel: nil, event_name: nil, expand: nil, type: nil)
+ @cancel = cancel
+ @event_name = event_name
+ @expand = expand
+ @type = type
+ end
+ end
+
# Creates a billing meter event adjustment.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/meter_event_service.rb b/lib/stripe/services/billing/meter_event_service.rb
index bf67a652..60d631cf 100644
--- a/lib/stripe/services/billing/meter_event_service.rb
+++ b/lib/stripe/services/billing/meter_event_service.rb
@@ -4,6 +4,27 @@
module Stripe
module Billing
class MeterEventService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ attr_accessor :payload
+ # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
+ attr_accessor :timestamp
+
+ def initialize(event_name: nil, expand: nil, identifier: nil, payload: nil, timestamp: nil)
+ @event_name = event_name
+ @expand = expand
+ @identifier = identifier
+ @payload = payload
+ @timestamp = timestamp
+ end
+ end
+
# Creates a billing meter event.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/meter_event_summary_service.rb b/lib/stripe/services/billing/meter_event_summary_service.rb
index 0bdcfb37..e1f8b5c9 100644
--- a/lib/stripe/services/billing/meter_event_summary_service.rb
+++ b/lib/stripe/services/billing/meter_event_summary_service.rb
@@ -4,6 +4,45 @@
module Stripe
module Billing
class MeterEventSummaryService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The customer for which to fetch event summaries.
+ attr_accessor :customer
+ # The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
+ attr_accessor :end_time
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
+ attr_accessor :start_time
+ # 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.
+ attr_accessor :starting_after
+ # Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
+ attr_accessor :value_grouping_window
+
+ def initialize(
+ customer: nil,
+ end_time: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ start_time: nil,
+ starting_after: nil,
+ value_grouping_window: nil
+ )
+ @customer = customer
+ @end_time = end_time
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @start_time = start_time
+ @starting_after = starting_after
+ @value_grouping_window = value_grouping_window
+ end
+ end
+
# Retrieve a list of billing meter event summaries.
def list(id, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing/meter_service.rb b/lib/stripe/services/billing/meter_service.rb
index 6d900139..c8fd22b9 100644
--- a/lib/stripe/services/billing/meter_service.rb
+++ b/lib/stripe/services/billing/meter_service.rb
@@ -11,6 +11,136 @@ module Stripe
@event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Filter results to only include meters with the given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CustomerMapping < Stripe::RequestParams
+ # The key in the meter event payload to use for mapping the event to a customer.
+ attr_accessor :event_payload_key
+ # The method for mapping a meter event to a customer. Must be `by_id`.
+ attr_accessor :type
+
+ def initialize(event_payload_key: nil, type: nil)
+ @event_payload_key = event_payload_key
+ @type = type
+ end
+ end
+
+ class DefaultAggregation < Stripe::RequestParams
+ # Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window.
+ attr_accessor :formula
+
+ def initialize(formula: nil)
+ @formula = formula
+ end
+ end
+
+ class ValueSettings < Stripe::RequestParams
+ # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
+ attr_accessor :event_payload_key
+
+ def initialize(event_payload_key: nil)
+ @event_payload_key = event_payload_key
+ end
+ end
+ # Fields that specify how to map a meter event to a customer.
+ attr_accessor :customer_mapping
+ # The default settings to aggregate a meter's events with.
+ attr_accessor :default_aggregation
+ # The meter’s name. Not visible to the customer.
+ attr_accessor :display_name
+ # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
+ attr_accessor :event_name
+ # The time window to pre-aggregate meter events for, if any.
+ attr_accessor :event_time_window
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Fields that specify how to calculate a meter event's value.
+ attr_accessor :value_settings
+
+ def initialize(
+ customer_mapping: nil,
+ default_aggregation: nil,
+ display_name: nil,
+ event_name: nil,
+ event_time_window: nil,
+ expand: nil,
+ value_settings: nil
+ )
+ @customer_mapping = customer_mapping
+ @default_aggregation = default_aggregation
+ @display_name = display_name
+ @event_name = event_name
+ @event_time_window = event_time_window
+ @expand = expand
+ @value_settings = value_settings
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # The meter’s name. Not visible to the customer.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(display_name: nil, expand: nil)
+ @display_name = display_name
+ @expand = expand
+ end
+ end
+
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a billing meter.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing_portal/configuration_service.rb b/lib/stripe/services/billing_portal/configuration_service.rb
index eeca9e99..5460ce61 100644
--- a/lib/stripe/services/billing_portal/configuration_service.rb
+++ b/lib/stripe/services/billing_portal/configuration_service.rb
@@ -4,6 +4,450 @@
module Stripe
module BillingPortal
class ConfigurationService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).
+ attr_accessor :active
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).
+ attr_accessor :is_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ ending_before: nil,
+ expand: nil,
+ is_default: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @ending_before = ending_before
+ @expand = expand
+ @is_default = is_default
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ attr_accessor :terms_of_service_url
+
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil)
+ @headline = headline
+ @privacy_policy_url = privacy_policy_url
+ @terms_of_service_url = terms_of_service_url
+ end
+ end
+
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allowed_updates: nil, enabled: nil)
+ @allowed_updates = allowed_updates
+ @enabled = enabled
+ end
+ end
+
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ attr_accessor :options
+
+ def initialize(enabled: nil, options: nil)
+ @enabled = enabled
+ @options = options
+ end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ attr_accessor :proration_behavior
+
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ )
+ @cancellation_reason = cancellation_reason
+ @enabled = enabled
+ @mode = mode
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ attr_accessor :prices
+ # The product id.
+ attr_accessor :product
+
+ def initialize(prices: nil, product: nil)
+ @prices = prices
+ @product = product
+ end
+ end
+
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ attr_accessor :conditions
+
+ def initialize(conditions: nil)
+ @conditions = conditions
+ end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ attr_accessor :schedule_at_period_end
+
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ )
+ @default_allowed_updates = default_allowed_updates
+ @enabled = enabled
+ @products = products
+ @proration_behavior = proration_behavior
+ @schedule_at_period_end = schedule_at_period_end
+ end
+ end
+ # Information about updating the customer details in the portal.
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ attr_accessor :subscription_update
+
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ )
+ @customer_update = customer_update
+ @invoice_history = invoice_history
+ @payment_method_update = payment_method_update
+ @subscription_cancel = subscription_cancel
+ @subscription_update = subscription_update
+ end
+ end
+
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+ # The business information shown to customers in the portal.
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ attr_accessor :login_page
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ )
+ @business_profile = business_profile
+ @default_return_url = default_return_url
+ @expand = expand
+ @features = features
+ @login_page = login_page
+ @metadata = metadata
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ attr_accessor :terms_of_service_url
+
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil)
+ @headline = headline
+ @privacy_policy_url = privacy_policy_url
+ @terms_of_service_url = terms_of_service_url
+ end
+ end
+
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allowed_updates: nil, enabled: nil)
+ @allowed_updates = allowed_updates
+ @enabled = enabled
+ end
+ end
+
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ attr_accessor :options
+
+ def initialize(enabled: nil, options: nil)
+ @enabled = enabled
+ @options = options
+ end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ attr_accessor :proration_behavior
+
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ )
+ @cancellation_reason = cancellation_reason
+ @enabled = enabled
+ @mode = mode
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ attr_accessor :prices
+ # The product id.
+ attr_accessor :product
+
+ def initialize(prices: nil, product: nil)
+ @prices = prices
+ @product = product
+ end
+ end
+
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ attr_accessor :conditions
+
+ def initialize(conditions: nil)
+ @conditions = conditions
+ end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ attr_accessor :schedule_at_period_end
+
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ )
+ @default_allowed_updates = default_allowed_updates
+ @enabled = enabled
+ @products = products
+ @proration_behavior = proration_behavior
+ @schedule_at_period_end = schedule_at_period_end
+ end
+ end
+ # Information about updating the customer details in the portal.
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ attr_accessor :subscription_update
+
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ )
+ @customer_update = customer_update
+ @invoice_history = invoice_history
+ @payment_method_update = payment_method_update
+ @subscription_cancel = subscription_cancel
+ @subscription_update = subscription_update
+ end
+ end
+
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ #
+ # Set to `false` to deactivate the `login_page.url`.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+ # Whether the configuration is active and can be used to create portal sessions.
+ attr_accessor :active
+ # The business information shown to customers in the portal.
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ attr_accessor :login_page
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ active: nil,
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ )
+ @active = active
+ @business_profile = business_profile
+ @default_return_url = default_return_url
+ @expand = expand
+ @features = features
+ @login_page = login_page
+ @metadata = metadata
+ end
+ end
+
# Creates a configuration that describes the functionality and behavior of a PortalSession
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/billing_portal/session_service.rb b/lib/stripe/services/billing_portal/session_service.rb
index 7bb21bfd..9ac0f765 100644
--- a/lib/stripe/services/billing_portal/session_service.rb
+++ b/lib/stripe/services/billing_portal/session_service.rb
@@ -4,6 +4,179 @@
module Stripe
module BillingPortal
class SessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class FlowData < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the flow is completed.
+ attr_accessor :custom_message
+
+ def initialize(custom_message: nil)
+ @custom_message = custom_message
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # The URL the customer will be redirected to after the flow is completed.
+ attr_accessor :return_url
+
+ def initialize(return_url: nil)
+ @return_url = return_url
+ end
+ end
+ # Configuration when `after_completion.type=hosted_confirmation`.
+ attr_accessor :hosted_confirmation
+ # Configuration when `after_completion.type=redirect`.
+ attr_accessor :redirect
+ # The specified behavior after the flow is completed.
+ attr_accessor :type
+
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
+ @hosted_confirmation = hosted_confirmation
+ @redirect = redirect
+ @type = type
+ end
+ end
+
+ class SubscriptionCancel < Stripe::RequestParams
+ class Retention < Stripe::RequestParams
+ class CouponOffer < Stripe::RequestParams
+ # The ID of the coupon to be offered.
+ attr_accessor :coupon
+
+ def initialize(coupon: nil)
+ @coupon = coupon
+ end
+ end
+ # Configuration when `retention.type=coupon_offer`.
+ attr_accessor :coupon_offer
+ # Type of retention strategy to use with the customer.
+ attr_accessor :type
+
+ def initialize(coupon_offer: nil, type: nil)
+ @coupon_offer = coupon_offer
+ @type = type
+ end
+ end
+ # Specify a retention strategy to be used in the cancellation flow.
+ attr_accessor :retention
+ # The ID of the subscription to be canceled.
+ attr_accessor :subscription
+
+ def initialize(retention: nil, subscription: nil)
+ @retention = retention
+ @subscription = subscription
+ end
+ end
+
+ class SubscriptionUpdate < Stripe::RequestParams
+ # The ID of the subscription to be updated.
+ attr_accessor :subscription
+
+ def initialize(subscription: nil)
+ @subscription = subscription
+ end
+ end
+
+ class SubscriptionUpdateConfirm < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this subscription update.
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this subscription update.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, promotion_code: nil)
+ @coupon = coupon
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
+ attr_accessor :id
+ # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
+ attr_accessor :price
+ # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
+ attr_accessor :quantity
+
+ def initialize(id: nil, price: nil, quantity: nil)
+ @id = id
+ @price = price
+ @quantity = quantity
+ end
+ end
+ # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ attr_accessor :discounts
+ # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
+ attr_accessor :items
+ # The ID of the subscription to be updated.
+ attr_accessor :subscription
+
+ def initialize(discounts: nil, items: nil, subscription: nil)
+ @discounts = discounts
+ @items = items
+ @subscription = subscription
+ end
+ end
+ # Behavior after the flow is completed.
+ attr_accessor :after_completion
+ # Configuration when `flow_data.type=subscription_cancel`.
+ attr_accessor :subscription_cancel
+ # Configuration when `flow_data.type=subscription_update`.
+ attr_accessor :subscription_update
+ # Configuration when `flow_data.type=subscription_update_confirm`.
+ attr_accessor :subscription_update_confirm
+ # Type of flow that the customer will go through.
+ attr_accessor :type
+
+ def initialize(
+ after_completion: nil,
+ subscription_cancel: nil,
+ subscription_update: nil,
+ subscription_update_confirm: nil,
+ type: nil
+ )
+ @after_completion = after_completion
+ @subscription_cancel = subscription_cancel
+ @subscription_update = subscription_update
+ @subscription_update_confirm = subscription_update_confirm
+ @type = type
+ end
+ end
+ # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
+ attr_accessor :configuration
+ # The ID of an existing customer.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
+ attr_accessor :flow_data
+ # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
+ attr_accessor :locale
+ # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
+ attr_accessor :on_behalf_of
+ # The default URL to redirect customers to when they click on the portal's link to return to your website.
+ attr_accessor :return_url
+
+ def initialize(
+ configuration: nil,
+ customer: nil,
+ expand: nil,
+ flow_data: nil,
+ locale: nil,
+ on_behalf_of: nil,
+ return_url: nil
+ )
+ @configuration = configuration
+ @customer = customer
+ @expand = expand
+ @flow_data = flow_data
+ @locale = locale
+ @on_behalf_of = on_behalf_of
+ @return_url = return_url
+ end
+ end
+
# Creates a session of the customer portal.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/charge_service.rb b/lib/stripe/services/charge_service.rb
index 4a236f21..161a0d36 100644
--- a/lib/stripe/services/charge_service.rb
+++ b/lib/stripe/services/charge_service.rb
@@ -3,6 +3,408 @@
module Stripe
class ChargeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return charges that were created during the given date interval.
+ attr_accessor :created
+ # Only return charges for the customer specified by this customer ID.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+ # Only return charges for this transfer group, limited to 100.
+ attr_accessor :transfer_group
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil,
+ transfer_group: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ @transfer_group = transfer_group
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Destination < Stripe::RequestParams
+ # ID of an existing, connected Stripe account.
+ attr_accessor :account
+ # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
+ attr_accessor :amount
+
+ def initialize(account: nil, amount: nil)
+ @account = account
+ @amount = amount
+ end
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # Attribute for param field application_fee
+ attr_accessor :application_fee
+ # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
+ attr_accessor :application_fee_amount
+ # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
+ attr_accessor :capture
+ # 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).
+ attr_accessor :currency
+ # The ID of an existing customer that will be charged in this request.
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ attr_accessor :description
+ # Attribute for param field destination
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
+ attr_accessor :on_behalf_of
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ attr_accessor :shipping
+ # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.
+ attr_accessor :source
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ capture: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ shipping: nil,
+ source: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @application_fee = application_fee
+ @application_fee_amount = application_fee_amount
+ @capture = capture
+ @currency = currency
+ @customer = customer
+ @description = description
+ @destination = destination
+ @expand = expand
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @radar_options = radar_options
+ @receipt_email = receipt_email
+ @shipping = shipping
+ @source = source
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class FraudDetails < Stripe::RequestParams
+ # Either `safe` or `fraudulent`.
+ attr_accessor :user_report
+
+ def initialize(user_report: nil)
+ @user_report = user_report
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
+ attr_accessor :fraud_details
+ # 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`.
+ attr_accessor :metadata
+ # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ attr_accessor :shipping
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_accessor :transfer_group
+
+ def initialize(
+ customer: nil,
+ description: nil,
+ expand: nil,
+ fraud_details: nil,
+ metadata: nil,
+ receipt_email: nil,
+ shipping: nil,
+ transfer_group: nil
+ )
+ @customer = customer
+ @description = description
+ @expand = expand
+ @fraud_details = fraud_details
+ @metadata = metadata
+ @receipt_email = receipt_email
+ @shipping = shipping
+ @transfer_group = transfer_group
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # The amount to capture, which must be less than or equal to the original amount.
+ attr_accessor :amount
+ # An application fee to add on to this charge.
+ attr_accessor :application_fee
+ # An application fee amount to add on to this charge, which must be less than or equal to the original amount.
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
+ attr_accessor :receipt_email
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ receipt_email: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @application_fee = application_fee
+ @application_fee_amount = application_fee_amount
+ @expand = expand
+ @receipt_email = receipt_email
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
#
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
diff --git a/lib/stripe/services/checkout/session_line_item_service.rb b/lib/stripe/services/checkout/session_line_item_service.rb
index f1a5a56b..968002bc 100644
--- a/lib/stripe/services/checkout/session_line_item_service.rb
+++ b/lib/stripe/services/checkout/session_line_item_service.rb
@@ -4,6 +4,24 @@
module Stripe
module Checkout
class SessionLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# When retrieving a Checkout Session, 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.
def list(session, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb
index 20221eb8..2b373fa9 100644
--- a/lib/stripe/services/checkout/session_service.rb
+++ b/lib/stripe/services/checkout/session_service.rb
@@ -11,6 +11,2400 @@ module Stripe
@line_items = Stripe::Checkout::SessionLineItemService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CustomerDetails < Stripe::RequestParams
+ # Customer's email address.
+ attr_accessor :email
+
+ def initialize(email: nil)
+ @email = email
+ end
+ end
+ # Only return Checkout Sessions that were created during the given date interval.
+ attr_accessor :created
+ # Only return the Checkout Sessions for the Customer specified.
+ attr_accessor :customer
+ # Only return the Checkout Sessions for the Customer details specified.
+ attr_accessor :customer_details
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return the Checkout Session for the PaymentIntent specified.
+ attr_accessor :payment_intent
+ # Only return the Checkout Sessions for the Payment Link specified.
+ attr_accessor :payment_link
+ # 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.
+ attr_accessor :starting_after
+ # Only return the Checkout Sessions matching the given status.
+ attr_accessor :status
+ # Only return the Checkout Session for the subscription specified.
+ attr_accessor :subscription
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ customer_details: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ payment_link: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ )
+ @created = created
+ @customer = customer
+ @customer_details = customer_details
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @payment_link = payment_link
+ @starting_after = starting_after
+ @status = status
+ @subscription = subscription
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AdaptivePricing < Stripe::RequestParams
+ # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class AfterExpiration < Stripe::RequestParams
+ class Recovery < Stripe::RequestParams
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
+ attr_accessor :allow_promotion_codes
+ # If `true`, a recovery URL will be generated to recover this Checkout Session if it
+ # expires before a successful transaction is completed. It will be attached to the
+ # Checkout Session object upon expiration.
+ attr_accessor :enabled
+
+ def initialize(allow_promotion_codes: nil, enabled: nil)
+ @allow_promotion_codes = allow_promotion_codes
+ @enabled = enabled
+ end
+ end
+ # Configure a Checkout Session that can be used to recover an expired session.
+ attr_accessor :recovery
+
+ def initialize(recovery: nil)
+ @recovery = recovery
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ attr_accessor :position
+
+ def initialize(position: nil)
+ @position = position
+ end
+ end
+ # 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.
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ attr_accessor :terms_of_service
+
+ def initialize(
+ payment_method_reuse_agreement: nil,
+ promotions: nil,
+ terms_of_service: nil
+ )
+ @payment_method_reuse_agreement = payment_method_reuse_agreement
+ @promotions = promotions
+ @terms_of_service = terms_of_service
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_accessor :label
+ # 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.
+ attr_accessor :value
+
+ def initialize(label: nil, value: nil)
+ @label = label
+ @value = value
+ end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_accessor :options
+
+ def initialize(default_value: nil, options: nil)
+ @default_value = default_value
+ @options = options
+ end
+ end
+
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_accessor :custom
+ # The type of the label.
+ attr_accessor :type
+
+ def initialize(custom: nil, type: nil)
+ @custom = custom
+ @type = type
+ end
+ end
+
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+ # Configuration for `type=dropdown` fields.
+ attr_accessor :dropdown
+ # 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.
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ attr_accessor :text
+ # The type of the field.
+ attr_accessor :type
+
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ )
+ @dropdown = dropdown
+ @key = key
+ @label = label
+ @numeric = numeric
+ @optional = optional
+ @text = text
+ @type = type
+ end
+ end
+
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_accessor :terms_of_service_acceptance
+
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ )
+ @after_submit = after_submit
+ @shipping_address = shipping_address
+ @submit = submit
+ @terms_of_service_acceptance = terms_of_service_acceptance
+ end
+ end
+
+ class CustomerUpdate < Stripe::RequestParams
+ # Describes whether Checkout saves the billing address onto `customer.address`.
+ # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
+ attr_accessor :address
+ # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
+ attr_accessor :name
+ # Describes whether Checkout saves shipping information onto `customer.shipping`.
+ # To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
+ attr_accessor :shipping
+
+ def initialize(address: nil, name: nil, shipping: nil)
+ @address = address
+ @name = name
+ @shipping = shipping
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this Session.
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this Session.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, promotion_code: nil)
+ @coupon = coupon
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+
+ def initialize(amount_tax_display: nil)
+ @amount_tax_display = amount_tax_display
+ end
+ end
+ # The account tax IDs associated with the invoice.
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @custom_fields = custom_fields
+ @description = description
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @rendering_options = rendering_options
+ end
+ end
+ # Set to `true` to enable invoice creation.
+ attr_accessor :enabled
+ # Parameters passed when creating invoices for payment-mode Checkout Sessions.
+ attr_accessor :invoice_data
+
+ def initialize(enabled: nil, invoice_data: nil)
+ @enabled = enabled
+ @invoice_data = invoice_data
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
+ attr_accessor :maximum
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
+ attr_accessor :adjustable_quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
+ attr_accessor :dynamic_tax_rates
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
+ attr_accessor :quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
+ attr_accessor :tax_rates
+
+ def initialize(
+ adjustable_quantity: nil,
+ dynamic_tax_rates: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @adjustable_quantity = adjustable_quantity
+ @dynamic_tax_rates = dynamic_tax_rates
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # 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.
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @price = price
+ @quantity = quantity
+ end
+ end
+
+ class PaymentIntentData < Stripe::RequestParams
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. For details,
+ # see the PaymentIntents [use case for connected
+ # accounts](/docs/payments/connected-accounts).
+ attr_accessor :on_behalf_of
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the
+ # customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,
+ # Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ attr_accessor :setup_future_usage
+ # Shipping information for this payment.
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # The parameters used to automatically create a Transfer when the payment succeeds.
+ # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+ # 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.
+ attr_accessor :transfer_group
+
+ def initialize(
+ application_fee_amount: nil,
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @application_fee_amount = application_fee_amount
+ @capture_method = capture_method
+ @description = description
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @receipt_email = receipt_email
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout.
+ attr_accessor :allow_redisplay
+
+ def initialize(allow_redisplay: nil)
+ @allow_redisplay = allow_redisplay
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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). This is only accepted for Checkout Sessions in `setup` mode.
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(
+ currency: nil,
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @currency = currency
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ # Setting to true enables installments for this Checkout Session.
+ # Setting to false will prevent any installment plan from applying to a payment.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Restrictions < Stripe::RequestParams
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
+ attr_accessor :brands_blocked
+
+ def initialize(brands_blocked: nil)
+ @brands_blocked = brands_blocked
+ end
+ end
+ # Installment options for card payments
+ attr_accessor :installments
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # Restrictions to apply to the card payment method. For example, you can block specific card brands.
+ attr_accessor :restrictions
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+
+ def initialize(
+ installments: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ restrictions: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil
+ )
+ @installments = installments
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @restrictions = restrictions
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+
+ def initialize(expires_after_seconds: nil)
+ @expires_after_seconds = expires_after_seconds
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
+ attr_accessor :reference
+
+ def initialize(reference: nil)
+ @reference = reference
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(permissions: nil, prefetch: nil)
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # contains details about the AU Becs Debit payment method options.
+ attr_accessor :au_becs_debit
+ # contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # contains details about the Card payment method options.
+ attr_accessor :card
+ # contains details about the Cashapp Pay payment method options.
+ attr_accessor :cashapp
+ # contains details about the Customer Balance payment method options.
+ attr_accessor :customer_balance
+ # contains details about the EPS payment method options.
+ attr_accessor :eps
+ # contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # contains details about the Korean card payment method options.
+ attr_accessor :kr_card
+ # contains details about the Link payment method options.
+ attr_accessor :link
+ # contains details about the Mobilepay payment method options.
+ attr_accessor :mobilepay
+ # contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # contains details about the P24 payment method options.
+ attr_accessor :p24
+ # contains details about the Pay By Bank payment method options.
+ attr_accessor :pay_by_bank
+ # contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # contains details about the Pix payment method options.
+ attr_accessor :pix
+ # contains details about the RevolutPay payment method options.
+ attr_accessor :revolut_pay
+ # contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # contains details about the Sepa Debit payment method options.
+ attr_accessor :sepa_debit
+ # contains details about the Sofort payment method options.
+ attr_accessor :sofort
+ # contains details about the Swish payment method options.
+ attr_accessor :swish
+ # contains details about the Us Bank Account payment method options.
+ attr_accessor :us_bank_account
+ # contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ us_bank_account: nil,
+ wechat_pay: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @boleto = boleto
+ @card = card
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ end
+ end
+
+ class Permissions < Stripe::RequestParams
+ # Determines which entity is allowed to update the shipping details.
+ #
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ #
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ attr_accessor :update_shipping_details
+
+ def initialize(update_shipping_details: nil)
+ @update_shipping_details = update_shipping_details
+ end
+ end
+
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ #
+ # Can only be set in `payment` and `subscription` mode.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class SavedPaymentMethodOptions < Stripe::RequestParams
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
+ attr_accessor :allow_redisplay_filters
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
+ attr_accessor :payment_method_save
+
+ def initialize(allow_redisplay_filters: nil, payment_method_save: nil)
+ @allow_redisplay_filters = allow_redisplay_filters
+ @payment_method_save = payment_method_save
+ end
+ end
+
+ class SetupIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account for which the setup is intended.
+ attr_accessor :on_behalf_of
+
+ def initialize(description: nil, metadata: nil, on_behalf_of: nil)
+ @description = description
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ end
+ end
+
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ attr_accessor :allowed_countries
+
+ def initialize(allowed_countries: nil)
+ @allowed_countries = allowed_countries
+ end
+ end
+
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(issuer: nil)
+ @issuer = issuer
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # 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. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
+ attr_accessor :billing_cycle_anchor
+ # The tax rates that will apply to any subscription item that does not have
+ # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
+ # from the subscription.
+ attr_accessor :default_tax_rates
+ # 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 the [customer portal](https://stripe.com/docs/customer-management).
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # 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`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer
+ # will get before being charged for the first time. Has to be at least
+ # 48 hours in the future.
+ attr_accessor :trial_end
+ # Integer representing the number of trial period days before the
+ # customer is charged for the first time. Has to be at least 1.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ application_fee_percent: nil,
+ billing_cycle_anchor: nil,
+ default_tax_rates: nil,
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @application_fee_percent = application_fee_percent
+ @billing_cycle_anchor = billing_cycle_anchor
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @transfer_data = transfer_data
+ @trial_end = trial_end
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ attr_accessor :required
+
+ def initialize(enabled: nil, required: nil)
+ @enabled = enabled
+ @required = required
+ end
+ end
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ attr_accessor :adaptive_pricing
+ # Configure actions after a Checkout Session has expired.
+ attr_accessor :after_expiration
+ # Enables user redeemable promotion codes.
+ attr_accessor :allow_promotion_codes
+ # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
+ attr_accessor :automatic_tax
+ # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
+ attr_accessor :billing_address_collection
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
+ attr_accessor :cancel_url
+ # A unique string to reference the Checkout Session. This can be a
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
+ # session with your internal systems.
+ attr_accessor :client_reference_id
+ # Configure fields for the Checkout Session to gather active consent from customers.
+ attr_accessor :consent_collection
+ # 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). Required in `setup` mode when `payment_method_types` is not set.
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ attr_accessor :custom_text
+ # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card
+ # payment method will be used to prefill the email, name, card details, and billing address
+ # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
+ # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
+ #
+ # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
+ # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
+ #
+ # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.
+ #
+ # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
+ attr_accessor :customer
+ # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
+ #
+ # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
+ # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
+ #
+ # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
+ # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
+ #
+ # Can only be set in `payment` and `setup` mode.
+ attr_accessor :customer_creation
+ # If provided, this value will be used when the Customer object is created.
+ # If not provided, customers will be asked to enter their email address.
+ # Use this parameter to prefill customer data if you already have an email
+ # on file. To access information about the customer once a session is
+ # complete, use the `customer` field.
+ attr_accessor :customer_email
+ # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
+ attr_accessor :customer_update
+ # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
+ attr_accessor :expires_at
+ # Generate a post-purchase Invoice for one-time payments.
+ attr_accessor :invoice_creation
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+ #
+ # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
+ attr_accessor :line_items
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
+ attr_accessor :locale
+ # 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`.
+ attr_accessor :metadata
+ # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.
+ attr_accessor :mode
+ # 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).
+ #
+ # There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
+ #
+ # For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ attr_accessor :payment_method_collection
+ # The ID of the payment method configuration to use with this Checkout session.
+ attr_accessor :payment_method_configuration
+ # This parameter allows you to set some attributes on the payment method created during a Checkout session.
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration.
+ attr_accessor :payment_method_options
+ # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
+ #
+ # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
+ #
+ # Read more about the supported payment methods and their requirements in our [payment
+ # method details guide](/docs/payments/checkout/payment-methods).
+ #
+ # If multiple payment methods are passed, Checkout will dynamically reorder them to
+ # prioritize the most relevant payment methods based on the customer's location and
+ # other characteristics.
+ attr_accessor :payment_method_types
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ #
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
+ attr_accessor :permissions
+ # Controls phone number collection settings for the session.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts
+ # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
+ attr_accessor :phone_number_collection
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
+ attr_accessor :redirect_on_completion
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
+ # and redirect-based payment methods are enabled on the session.
+ attr_accessor :return_url
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+ attr_accessor :saved_payment_method_options
+ # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
+ attr_accessor :setup_intent_data
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ attr_accessor :shipping_options
+ # Describes the type of transaction being performed by Checkout in order
+ # to customize relevant text on the page, such as the submit button.
+ # `submit_type` can only be specified on Checkout Sessions in
+ # `payment` or `subscription` mode. If blank or `auto`, `pay` is used.
+ attr_accessor :submit_type
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
+ attr_accessor :subscription_data
+ # The URL to which Stripe should send customers when payment or setup
+ # is complete.
+ # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
+ # information from the successful Checkout Session on your page, read the
+ # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
+ attr_accessor :success_url
+ # Controls tax ID collection during checkout.
+ attr_accessor :tax_id_collection
+ # The UI mode of the Session. Defaults to `hosted`.
+ attr_accessor :ui_mode
+
+ def initialize(
+ adaptive_pricing: nil,
+ after_expiration: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ cancel_url: nil,
+ client_reference_id: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer: nil,
+ customer_creation: nil,
+ customer_email: nil,
+ customer_update: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ locale: nil,
+ metadata: nil,
+ mode: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ permissions: nil,
+ phone_number_collection: nil,
+ redirect_on_completion: nil,
+ return_url: nil,
+ saved_payment_method_options: nil,
+ setup_intent_data: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ success_url: nil,
+ tax_id_collection: nil,
+ ui_mode: nil
+ )
+ @adaptive_pricing = adaptive_pricing
+ @after_expiration = after_expiration
+ @allow_promotion_codes = allow_promotion_codes
+ @automatic_tax = automatic_tax
+ @billing_address_collection = billing_address_collection
+ @cancel_url = cancel_url
+ @client_reference_id = client_reference_id
+ @consent_collection = consent_collection
+ @currency = currency
+ @custom_fields = custom_fields
+ @custom_text = custom_text
+ @customer = customer
+ @customer_creation = customer_creation
+ @customer_email = customer_email
+ @customer_update = customer_update
+ @discounts = discounts
+ @expand = expand
+ @expires_at = expires_at
+ @invoice_creation = invoice_creation
+ @line_items = line_items
+ @locale = locale
+ @metadata = metadata
+ @mode = mode
+ @optional_items = optional_items
+ @payment_intent_data = payment_intent_data
+ @payment_method_collection = payment_method_collection
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @permissions = permissions
+ @phone_number_collection = phone_number_collection
+ @redirect_on_completion = redirect_on_completion
+ @return_url = return_url
+ @saved_payment_method_options = saved_payment_method_options
+ @setup_intent_data = setup_intent_data
+ @shipping_address_collection = shipping_address_collection
+ @shipping_options = shipping_options
+ @submit_type = submit_type
+ @subscription_data = subscription_data
+ @success_url = success_url
+ @tax_id_collection = tax_id_collection
+ @ui_mode = ui_mode
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CollectedInformation < Stripe::RequestParams
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The address of the customer
+ attr_accessor :address
+ # The name of customer
+ attr_accessor :name
+
+ def initialize(address: nil, name: nil)
+ @address = address
+ @name = name
+ end
+ end
+ # The shipping details to apply to this Session.
+ attr_accessor :shipping_details
+
+ def initialize(shipping_details: nil)
+ @shipping_details = shipping_details
+ end
+ end
+
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+ # Information about the customer collected within the Checkout Session.
+ attr_accessor :collected_information
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ attr_accessor :shipping_options
+
+ def initialize(
+ collected_information: nil,
+ expand: nil,
+ metadata: nil,
+ shipping_options: nil
+ )
+ @collected_information = collected_information
+ @expand = expand
+ @metadata = metadata
+ @shipping_options = shipping_options
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a Checkout Session object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/climate/order_service.rb b/lib/stripe/services/climate/order_service.rb
index ee37d3a8..2e9de55e 100644
--- a/lib/stripe/services/climate/order_service.rb
+++ b/lib/stripe/services/climate/order_service.rb
@@ -4,6 +4,108 @@
module Stripe
module Climate
class OrderService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ attr_accessor :public_name
+
+ def initialize(public_name: nil)
+ @public_name = public_name
+ end
+ end
+ # Requested amount of carbon removal units. Either this or `metric_tons` must be specified.
+ attr_accessor :amount
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ attr_accessor :beneficiary
+ # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Requested number of tons for the order. Either this or `amount` must be specified.
+ attr_accessor :metric_tons
+ # Unique identifier of the Climate product.
+ attr_accessor :product
+
+ def initialize(
+ amount: nil,
+ beneficiary: nil,
+ currency: nil,
+ expand: nil,
+ metadata: nil,
+ metric_tons: nil,
+ product: nil
+ )
+ @amount = amount
+ @beneficiary = beneficiary
+ @currency = currency
+ @expand = expand
+ @metadata = metadata
+ @metric_tons = metric_tons
+ @product = product
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ attr_accessor :public_name
+
+ def initialize(public_name: nil)
+ @public_name = public_name
+ end
+ end
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ attr_accessor :beneficiary
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(beneficiary: nil, expand: nil, metadata: nil)
+ @beneficiary = beneficiary
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
diff --git a/lib/stripe/services/climate/product_service.rb b/lib/stripe/services/climate/product_service.rb
index 0b01b853..9d363227 100644
--- a/lib/stripe/services/climate/product_service.rb
+++ b/lib/stripe/services/climate/product_service.rb
@@ -4,6 +4,33 @@
module Stripe
module Climate
class ProductService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Lists all available Climate product objects.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/climate/supplier_service.rb b/lib/stripe/services/climate/supplier_service.rb
index 362caf10..08d868cf 100644
--- a/lib/stripe/services/climate/supplier_service.rb
+++ b/lib/stripe/services/climate/supplier_service.rb
@@ -4,6 +4,33 @@
module Stripe
module Climate
class SupplierService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Lists all available Climate supplier objects.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/confirmation_token_service.rb b/lib/stripe/services/confirmation_token_service.rb
index 18f8e56e..c1abc0c2 100644
--- a/lib/stripe/services/confirmation_token_service.rb
+++ b/lib/stripe/services/confirmation_token_service.rb
@@ -3,6 +3,15 @@
module Stripe
class ConfirmationTokenService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieves an existing ConfirmationToken object
def retrieve(confirmation_token, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/country_spec_service.rb b/lib/stripe/services/country_spec_service.rb
index 39ff260c..4a00c3ed 100644
--- a/lib/stripe/services/country_spec_service.rb
+++ b/lib/stripe/services/country_spec_service.rb
@@ -3,6 +3,33 @@
module Stripe
class CountrySpecService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Lists all Country Spec objects available in the API.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/coupon_service.rb b/lib/stripe/services/coupon_service.rb
index 23544cbd..0074ad5f 100644
--- a/lib/stripe/services/coupon_service.rb
+++ b/lib/stripe/services/coupon_service.rb
@@ -3,6 +3,154 @@
module Stripe
class CouponService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ attr_accessor :amount_off
+
+ def initialize(amount_off: nil)
+ @amount_off = amount_off
+ end
+ end
+ # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ attr_accessor :name
+
+ def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil)
+ @currency_options = currency_options
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AppliesTo < Stripe::RequestParams
+ # An array of Product IDs that this Coupon will apply to.
+ attr_accessor :products
+
+ def initialize(products: nil)
+ @products = products
+ end
+ end
+
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ attr_accessor :amount_off
+
+ def initialize(amount_off: nil)
+ @amount_off = amount_off
+ end
+ end
+ # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
+ attr_accessor :amount_off
+ # A hash containing directions for what this Coupon will apply discounts to.
+ attr_accessor :applies_to
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
+ attr_accessor :currency
+ # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
+ attr_accessor :duration
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.
+ attr_accessor :id
+ # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
+ attr_accessor :max_redemptions
+ # 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`.
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ attr_accessor :name
+ # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
+ attr_accessor :percent_off
+ # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
+ attr_accessor :redeem_by
+
+ def initialize(
+ amount_off: nil,
+ applies_to: nil,
+ currency: nil,
+ currency_options: nil,
+ duration: nil,
+ expand: nil,
+ id: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ name: nil,
+ percent_off: nil,
+ redeem_by: nil
+ )
+ @amount_off = amount_off
+ @applies_to = applies_to
+ @currency = currency
+ @currency_options = currency_options
+ @duration = duration
+ @expand = expand
+ @id = id
+ @max_redemptions = max_redemptions
+ @metadata = metadata
+ @name = name
+ @percent_off = percent_off
+ @redeem_by = redeem_by
+ end
+ end
+
# You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
#
# A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
diff --git a/lib/stripe/services/credit_note_line_item_service.rb b/lib/stripe/services/credit_note_line_item_service.rb
index 1424621f..84bce2aa 100644
--- a/lib/stripe/services/credit_note_line_item_service.rb
+++ b/lib/stripe/services/credit_note_line_item_service.rb
@@ -3,6 +3,24 @@
module Stripe
class CreditNoteLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list(credit_note, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/credit_note_preview_lines_service.rb b/lib/stripe/services/credit_note_preview_lines_service.rb
index 392dd619..1ac23581 100644
--- a/lib/stripe/services/credit_note_preview_lines_service.rb
+++ b/lib/stripe/services/credit_note_preview_lines_service.rb
@@ -3,6 +3,158 @@
module Stripe
class CreditNotePreviewLinesService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate = tax_rate
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @invoice_line_item = invoice_line_item
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ @type = type
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ attr_accessor :refund
+
+ def initialize(amount_refunded: nil, refund: nil)
+ @amount_refunded = amount_refunded
+ @refund = refund
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ attr_accessor :email_type
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the invoice.
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Line items that make up the credit note.
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ attr_accessor :shipping_cost
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil,
+ starting_after: nil
+ )
+ @amount = amount
+ @credit_amount = credit_amount
+ @effective_at = effective_at
+ @email_type = email_type
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @lines = lines
+ @memo = memo
+ @metadata = metadata
+ @out_of_band_amount = out_of_band_amount
+ @reason = reason
+ @refund_amount = refund_amount
+ @refunds = refunds
+ @shipping_cost = shipping_cost
+ @starting_after = starting_after
+ end
+ end
+
# When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/credit_note_service.rb b/lib/stripe/services/credit_note_service.rb
index f0a61281..1ea2cf09 100644
--- a/lib/stripe/services/credit_note_service.rb
+++ b/lib/stripe/services/credit_note_service.rb
@@ -11,6 +11,371 @@ module Stripe
@preview_lines = Stripe::CreditNotePreviewLinesService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return credit notes that were created during the given date interval.
+ attr_accessor :created
+ # Only return credit notes for the customer specified by this customer ID.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return credit notes for the invoice specified by this invoice ID.
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate = tax_rate
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @invoice_line_item = invoice_line_item
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ @type = type
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ attr_accessor :refund
+
+ def initialize(amount_refunded: nil, refund: nil)
+ @amount_refunded = amount_refunded
+ @refund = refund
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the invoice.
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ attr_accessor :shipping_cost
+
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ )
+ @amount = amount
+ @credit_amount = credit_amount
+ @effective_at = effective_at
+ @email_type = email_type
+ @expand = expand
+ @invoice = invoice
+ @lines = lines
+ @memo = memo
+ @metadata = metadata
+ @out_of_band_amount = out_of_band_amount
+ @reason = reason
+ @refund_amount = refund_amount
+ @refunds = refunds
+ @shipping_cost = shipping_cost
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Credit note memo.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, memo: nil, metadata: nil)
+ @expand = expand
+ @memo = memo
+ @metadata = metadata
+ end
+ end
+
+ class PreviewParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate = tax_rate
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @invoice_line_item = invoice_line_item
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ @type = type
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ attr_accessor :refund
+
+ def initialize(amount_refunded: nil, refund: nil)
+ @amount_refunded = amount_refunded
+ @refund = refund
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the invoice.
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ attr_accessor :memo
+ # 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`.
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ attr_accessor :shipping_cost
+
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ )
+ @amount = amount
+ @credit_amount = credit_amount
+ @effective_at = effective_at
+ @email_type = email_type
+ @expand = expand
+ @invoice = invoice
+ @lines = lines
+ @memo = memo
+ @metadata = metadata
+ @out_of_band_amount = out_of_band_amount
+ @reason = reason
+ @refund_amount = refund_amount
+ @refunds = refunds
+ @shipping_cost = shipping_cost
+ end
+ end
+
+ class VoidCreditNoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
# its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
# in any combination of the following:
diff --git a/lib/stripe/services/customer_balance_transaction_service.rb b/lib/stripe/services/customer_balance_transaction_service.rb
index ad76a3fd..4a7bd9c8 100644
--- a/lib/stripe/services/customer_balance_transaction_service.rb
+++ b/lib/stripe/services/customer_balance_transaction_service.rb
@@ -3,6 +3,69 @@
module Stripe
class CustomerBalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.
+ attr_accessor :amount
+ # 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(amount: nil, currency: nil, description: nil, expand: nil, metadata: nil)
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(description: nil, expand: nil, metadata: nil)
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance).
def create(customer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/customer_cash_balance_service.rb b/lib/stripe/services/customer_cash_balance_service.rb
index ad87c9b7..44c21b20 100644
--- a/lib/stripe/services/customer_cash_balance_service.rb
+++ b/lib/stripe/services/customer_cash_balance_service.rb
@@ -3,6 +3,35 @@
module Stripe
class CustomerCashBalanceService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ attr_accessor :reconciliation_mode
+
+ def initialize(reconciliation_mode: nil)
+ @reconciliation_mode = reconciliation_mode
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A hash of settings for this cash balance.
+ attr_accessor :settings
+
+ def initialize(expand: nil, settings: nil)
+ @expand = expand
+ @settings = settings
+ end
+ end
+
# Retrieves a customer's cash balance.
def retrieve(customer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/customer_cash_balance_transaction_service.rb b/lib/stripe/services/customer_cash_balance_transaction_service.rb
index e1d3be5b..fa7b07df 100644
--- a/lib/stripe/services/customer_cash_balance_transaction_service.rb
+++ b/lib/stripe/services/customer_cash_balance_transaction_service.rb
@@ -3,6 +3,33 @@
module Stripe
class CustomerCashBalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
def list(customer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/customer_funding_instructions_service.rb b/lib/stripe/services/customer_funding_instructions_service.rb
index 310b9250..e529b7b0 100644
--- a/lib/stripe/services/customer_funding_instructions_service.rb
+++ b/lib/stripe/services/customer_funding_instructions_service.rb
@@ -3,6 +3,48 @@
module Stripe
class CustomerFundingInstructionsService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The type of the `bank_transfer`
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Additional parameters for `bank_transfer` funding types
+ attr_accessor :bank_transfer
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The `funding_type` to get the instructions for.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @currency = currency
+ @expand = expand
+ @funding_type = funding_type
+ end
+ end
+
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
# funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
diff --git a/lib/stripe/services/customer_payment_method_service.rb b/lib/stripe/services/customer_payment_method_service.rb
index 344d0a02..e3a9c75b 100644
--- a/lib/stripe/services/customer_payment_method_service.rb
+++ b/lib/stripe/services/customer_payment_method_service.rb
@@ -3,6 +3,46 @@
module Stripe
class CustomerPaymentMethodService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ attr_accessor :type
+
+ def initialize(
+ allow_redisplay: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @allow_redisplay = allow_redisplay
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of PaymentMethods for a given Customer
def list(customer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/customer_payment_source_service.rb b/lib/stripe/services/customer_payment_source_service.rb
index a623acc2..462d3804 100644
--- a/lib/stripe/services/customer_payment_source_service.rb
+++ b/lib/stripe/services/customer_payment_source_service.rb
@@ -3,6 +3,185 @@
module Stripe
class CustomerPaymentSourceService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filter sources according to a particular object type.
+ attr_accessor :object
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, object: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @object = object
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Please refer to full [documentation](https://stripe.com/docs/api) instead.
+ attr_accessor :source
+ # Attribute for param field validate
+ attr_accessor :validate
+
+ def initialize(expand: nil, metadata: nil, source: nil, validate: nil)
+ @expand = expand
+ @metadata = metadata
+ @source = source
+ @validate = validate
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Owner's address.
+ attr_accessor :address
+ # Owner's email address.
+ attr_accessor :email
+ # Owner's full name.
+ attr_accessor :name
+ # Owner's phone number.
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+ # The name of the person or business that owns the bank account.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. This can be either `individual` or `company`.
+ attr_accessor :account_holder_type
+ # City/District/Suburb/Town/Village.
+ attr_accessor :address_city
+ # Billing address country, if provided when creating card.
+ attr_accessor :address_country
+ # Address line 1 (Street address/PO Box/Company name).
+ attr_accessor :address_line1
+ # Address line 2 (Apartment/Suite/Unit/Building).
+ attr_accessor :address_line2
+ # State/County/Province/Region.
+ attr_accessor :address_state
+ # ZIP or postal code.
+ attr_accessor :address_zip
+ # Two digit number representing the card’s expiration month.
+ attr_accessor :exp_month
+ # Four digit number representing the card’s expiration year.
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Cardholder name.
+ attr_accessor :name
+ # Attribute for param field owner
+ attr_accessor :owner
+
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ metadata: nil,
+ name: nil,
+ owner: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ @owner = owner
+ end
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class VerifyParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ attr_accessor :amounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amounts: nil, expand: nil)
+ @amounts = amounts
+ @expand = expand
+ end
+ end
+
# When you create a new credit card, you must specify a customer or recipient on which to create it.
#
# If the card's owner has no default card, then the new card will become the default.
diff --git a/lib/stripe/services/customer_service.rb b/lib/stripe/services/customer_service.rb
index a9dbf1aa..ca142f17 100644
--- a/lib/stripe/services/customer_service.rb
+++ b/lib/stripe/services/customer_service.rb
@@ -16,6 +16,583 @@ module Stripe
@funding_instructions = Stripe::CustomerFundingInstructionsService.new(@requestor)
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ attr_accessor :reconciliation_mode
+
+ def initialize(reconciliation_mode: nil)
+ @reconciliation_mode = reconciliation_mode
+ end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ attr_accessor :settings
+
+ def initialize(settings: nil)
+ @settings = settings
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ attr_accessor :template
+
+ def initialize(amount_tax_display: nil, template: nil)
+ @amount_tax_display = amount_tax_display
+ @template = template
+ end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ )
+ @custom_fields = custom_fields
+ @default_payment_method = default_payment_method
+ @footer = footer
+ @rendering_options = rendering_options
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Customer shipping address.
+ attr_accessor :address
+ # Customer name.
+ attr_accessor :name
+ # Customer phone (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`.
+ attr_accessor :validate_location
+
+ def initialize(ip_address: nil, validate_location: nil)
+ @ip_address = ip_address
+ @validate_location = validate_location
+ end
+ end
+ # The customer's address.
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ attr_accessor :cash_balance
+ # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.
+ #
+ # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
+ #
+ # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.
+ attr_accessor :default_source
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ attr_accessor :invoice_settings
+ # 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`.
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ attr_accessor :next_invoice_sequence
+ # The customer's phone number.
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ attr_accessor :shipping
+ # Attribute for param field source
+ attr_accessor :source
+ # Tax details about the customer.
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ attr_accessor :tax_exempt
+ # Attribute for param field validate
+ attr_accessor :validate
+
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ default_source: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ validate: nil
+ )
+ @address = address
+ @balance = balance
+ @cash_balance = cash_balance
+ @default_source = default_source
+ @description = description
+ @email = email
+ @expand = expand
+ @invoice_prefix = invoice_prefix
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @name = name
+ @next_invoice_sequence = next_invoice_sequence
+ @phone = phone
+ @preferred_locales = preferred_locales
+ @shipping = shipping
+ @source = source
+ @tax = tax
+ @tax_exempt = tax_exempt
+ @validate = validate
+ end
+ end
+
+ class DeleteDiscountParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return customers that were created during the given date interval.
+ attr_accessor :created
+ # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
+ attr_accessor :email
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
+ attr_accessor :test_clock
+
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ test_clock: nil
+ )
+ @created = created
+ @email = email
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @test_clock = test_clock
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ attr_accessor :reconciliation_mode
+
+ def initialize(reconciliation_mode: nil)
+ @reconciliation_mode = reconciliation_mode
+ end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ attr_accessor :settings
+
+ def initialize(settings: nil)
+ @settings = settings
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ attr_accessor :template
+
+ def initialize(amount_tax_display: nil, template: nil)
+ @amount_tax_display = amount_tax_display
+ @template = template
+ end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ )
+ @custom_fields = custom_fields
+ @default_payment_method = default_payment_method
+ @footer = footer
+ @rendering_options = rendering_options
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Customer shipping address.
+ attr_accessor :address
+ # Customer name.
+ attr_accessor :name
+ # Customer phone (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.
+ attr_accessor :validate_location
+
+ def initialize(ip_address: nil, validate_location: nil)
+ @ip_address = ip_address
+ @validate_location = validate_location
+ end
+ end
+
+ class TaxIdDatum < Stripe::RequestParams
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(type: nil, value: nil)
+ @type = type
+ @value = value
+ end
+ end
+ # The customer's address.
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ attr_accessor :cash_balance
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ attr_accessor :invoice_settings
+ # 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`.
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ attr_accessor :next_invoice_sequence
+ # Attribute for param field payment_method
+ attr_accessor :payment_method
+ # The customer's phone number.
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ attr_accessor :shipping
+ # Attribute for param field source
+ attr_accessor :source
+ # Tax details about the customer.
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ attr_accessor :tax_id_data
+ # ID of the test clock to attach to the customer.
+ attr_accessor :test_clock
+ # Attribute for param field validate
+ attr_accessor :validate
+
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ payment_method: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ tax_id_data: nil,
+ test_clock: nil,
+ validate: nil
+ )
+ @address = address
+ @balance = balance
+ @cash_balance = cash_balance
+ @description = description
+ @email = email
+ @expand = expand
+ @invoice_prefix = invoice_prefix
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @name = name
+ @next_invoice_sequence = next_invoice_sequence
+ @payment_method = payment_method
+ @phone = phone
+ @preferred_locales = preferred_locales
+ @shipping = shipping
+ @source = source
+ @tax = tax
+ @tax_exempt = tax_exempt
+ @tax_id_data = tax_id_data
+ @test_clock = test_clock
+ @validate = validate
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
# Creates a new customer object.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/customers", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/customer_session_service.rb b/lib/stripe/services/customer_session_service.rb
index 064c4c92..50bd2212 100644
--- a/lib/stripe/services/customer_session_service.rb
+++ b/lib/stripe/services/customer_session_service.rb
@@ -3,6 +3,102 @@
module Stripe
class CustomerSessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class BuyButton < Stripe::RequestParams
+ # Whether the buy button is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class PaymentElement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
+ #
+ # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
+ attr_accessor :payment_method_allow_redisplay_filters
+ # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
+ attr_accessor :payment_method_redisplay
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
+ attr_accessor :payment_method_redisplay_limit
+ # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
+ #
+ # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
+ attr_accessor :payment_method_remove
+ # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
+ #
+ # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
+ attr_accessor :payment_method_save
+ # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
+ #
+ # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
+ attr_accessor :payment_method_save_usage
+
+ def initialize(
+ payment_method_allow_redisplay_filters: nil,
+ payment_method_redisplay: nil,
+ payment_method_redisplay_limit: nil,
+ payment_method_remove: nil,
+ payment_method_save: nil,
+ payment_method_save_usage: nil
+ )
+ @payment_method_allow_redisplay_filters = payment_method_allow_redisplay_filters
+ @payment_method_redisplay = payment_method_redisplay
+ @payment_method_redisplay_limit = payment_method_redisplay_limit
+ @payment_method_remove = payment_method_remove
+ @payment_method_save = payment_method_save
+ @payment_method_save_usage = payment_method_save_usage
+ end
+ end
+ # Whether the Payment Element is enabled.
+ attr_accessor :enabled
+ # This hash defines whether the Payment Element supports certain features.
+ attr_accessor :features
+
+ def initialize(enabled: nil, features: nil)
+ @enabled = enabled
+ @features = features
+ end
+ end
+
+ class PricingTable < Stripe::RequestParams
+ # Whether the pricing table is enabled.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+ # Configuration for buy button.
+ attr_accessor :buy_button
+ # Configuration for the Payment Element.
+ attr_accessor :payment_element
+ # Configuration for the pricing table.
+ attr_accessor :pricing_table
+
+ def initialize(buy_button: nil, payment_element: nil, pricing_table: nil)
+ @buy_button = buy_button
+ @payment_element = payment_element
+ @pricing_table = pricing_table
+ end
+ end
+ # Configuration for each component. Exactly 1 component must be enabled.
+ attr_accessor :components
+ # The ID of an existing customer for which to create the Customer Session.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(components: nil, customer: nil, expand: nil)
+ @components = components
+ @customer = customer
+ @expand = expand
+ end
+ end
+
# Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/customer_tax_id_service.rb b/lib/stripe/services/customer_tax_id_service.rb
index 7ba64d8d..f3707aa6 100644
--- a/lib/stripe/services/customer_tax_id_service.rb
+++ b/lib/stripe/services/customer_tax_id_service.rb
@@ -3,6 +3,51 @@
module Stripe
class CustomerTaxIdService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(expand: nil, type: nil, value: nil)
+ @expand = expand
+ @type = type
+ @value = value
+ end
+ end
+
# Creates a new tax_id object for a customer.
def create(customer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/dispute_service.rb b/lib/stripe/services/dispute_service.rb
index b9748bbf..ce23b5ce 100644
--- a/lib/stripe/services/dispute_service.rb
+++ b/lib/stripe/services/dispute_service.rb
@@ -3,6 +3,380 @@
module Stripe
class DisputeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return disputes associated to the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return disputes that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class EnhancedEvidence < Stripe::RequestParams
+ class VisaCompellingEvidence3 < Stripe::RequestParams
+ class DisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ attr_accessor :customer_purchase_ip
+ # Categorization of disputed payment.
+ attr_accessor :merchandise_or_services
+ # A description of the product or service that was sold.
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :shipping_address
+
+ def initialize(
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ merchandise_or_services: nil,
+ product_description: nil,
+ shipping_address: nil
+ )
+ @customer_account_id = customer_account_id
+ @customer_device_fingerprint = customer_device_fingerprint
+ @customer_device_id = customer_device_id
+ @customer_email_address = customer_email_address
+ @customer_purchase_ip = customer_purchase_ip
+ @merchandise_or_services = merchandise_or_services
+ @product_description = product_description
+ @shipping_address = shipping_address
+ end
+ end
+
+ class PriorUndisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
+ attr_accessor :charge
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ attr_accessor :customer_purchase_ip
+ # A description of the product or service that was sold.
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :shipping_address
+
+ def initialize(
+ charge: nil,
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ product_description: nil,
+ shipping_address: nil
+ )
+ @charge = charge
+ @customer_account_id = customer_account_id
+ @customer_device_fingerprint = customer_device_fingerprint
+ @customer_device_id = customer_device_id
+ @customer_email_address = customer_email_address
+ @customer_purchase_ip = customer_purchase_ip
+ @product_description = product_description
+ @shipping_address = shipping_address
+ end
+ end
+ # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :disputed_transaction
+ # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :prior_undisputed_transactions
+
+ def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil)
+ @disputed_transaction = disputed_transaction
+ @prior_undisputed_transactions = prior_undisputed_transactions
+ end
+ end
+
+ class VisaCompliance < Stripe::RequestParams
+ # A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
+ attr_accessor :fee_acknowledged
+
+ def initialize(fee_acknowledged: nil)
+ @fee_acknowledged = fee_acknowledged
+ end
+ end
+ # Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
+ attr_accessor :visa_compelling_evidence_3
+ # Evidence provided for Visa compliance evidence submission.
+ attr_accessor :visa_compliance
+
+ def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil)
+ @visa_compelling_evidence_3 = visa_compelling_evidence_3
+ @visa_compliance = visa_compliance
+ end
+ end
+ # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000.
+ attr_accessor :access_activity_log
+ # The billing address provided by the customer.
+ attr_accessor :billing_address
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
+ attr_accessor :cancellation_policy
+ # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ attr_accessor :cancellation_policy_disclosure
+ # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000.
+ attr_accessor :cancellation_rebuttal
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
+ attr_accessor :customer_communication
+ # The email address of the customer.
+ attr_accessor :customer_email_address
+ # The name of the customer.
+ attr_accessor :customer_name
+ # The IP address that the customer used when making the purchase.
+ attr_accessor :customer_purchase_ip
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
+ attr_accessor :customer_signature
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
+ attr_accessor :duplicate_charge_documentation
+ # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000.
+ attr_accessor :duplicate_charge_explanation
+ # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
+ attr_accessor :duplicate_charge_id
+ # Additional evidence for qualifying evidence programs.
+ attr_accessor :enhanced_evidence
+ # A description of the product or service that was sold. Has a maximum character count of 20,000.
+ attr_accessor :product_description
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
+ attr_accessor :receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
+ attr_accessor :refund_policy
+ # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ attr_accessor :refund_policy_disclosure
+ # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000.
+ attr_accessor :refund_refusal_explanation
+ # The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
+ attr_accessor :service_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ attr_accessor :service_documentation
+ # The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ attr_accessor :shipping_address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ attr_accessor :shipping_carrier
+ # The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ attr_accessor :shipping_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ attr_accessor :shipping_documentation
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :shipping_tracking_number
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ attr_accessor :uncategorized_file
+ # Any additional evidence or statements. Has a maximum character count of 20,000.
+ attr_accessor :uncategorized_text
+
+ def initialize(
+ access_activity_log: nil,
+ billing_address: nil,
+ cancellation_policy: nil,
+ cancellation_policy_disclosure: nil,
+ cancellation_rebuttal: nil,
+ customer_communication: nil,
+ customer_email_address: nil,
+ customer_name: nil,
+ customer_purchase_ip: nil,
+ customer_signature: nil,
+ duplicate_charge_documentation: nil,
+ duplicate_charge_explanation: nil,
+ duplicate_charge_id: nil,
+ enhanced_evidence: nil,
+ product_description: nil,
+ receipt: nil,
+ refund_policy: nil,
+ refund_policy_disclosure: nil,
+ refund_refusal_explanation: nil,
+ service_date: nil,
+ service_documentation: nil,
+ shipping_address: nil,
+ shipping_carrier: nil,
+ shipping_date: nil,
+ shipping_documentation: nil,
+ shipping_tracking_number: nil,
+ uncategorized_file: nil,
+ uncategorized_text: nil
+ )
+ @access_activity_log = access_activity_log
+ @billing_address = billing_address
+ @cancellation_policy = cancellation_policy
+ @cancellation_policy_disclosure = cancellation_policy_disclosure
+ @cancellation_rebuttal = cancellation_rebuttal
+ @customer_communication = customer_communication
+ @customer_email_address = customer_email_address
+ @customer_name = customer_name
+ @customer_purchase_ip = customer_purchase_ip
+ @customer_signature = customer_signature
+ @duplicate_charge_documentation = duplicate_charge_documentation
+ @duplicate_charge_explanation = duplicate_charge_explanation
+ @duplicate_charge_id = duplicate_charge_id
+ @enhanced_evidence = enhanced_evidence
+ @product_description = product_description
+ @receipt = receipt
+ @refund_policy = refund_policy
+ @refund_policy_disclosure = refund_policy_disclosure
+ @refund_refusal_explanation = refund_refusal_explanation
+ @service_date = service_date
+ @service_documentation = service_documentation
+ @shipping_address = shipping_address
+ @shipping_carrier = shipping_carrier
+ @shipping_date = shipping_date
+ @shipping_documentation = shipping_documentation
+ @shipping_tracking_number = shipping_tracking_number
+ @uncategorized_file = uncategorized_file
+ @uncategorized_text = uncategorized_text
+ end
+ end
+ # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
+ attr_accessor :submit
+
+ def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil)
+ @evidence = evidence
+ @expand = expand
+ @metadata = metadata
+ @submit = submit
+ end
+ end
+
+ class CloseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
#
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
diff --git a/lib/stripe/services/entitlements/active_entitlement_service.rb b/lib/stripe/services/entitlements/active_entitlement_service.rb
index 2481067e..8c442941 100644
--- a/lib/stripe/services/entitlements/active_entitlement_service.rb
+++ b/lib/stripe/services/entitlements/active_entitlement_service.rb
@@ -4,6 +4,42 @@
module Stripe
module Entitlements
class ActiveEntitlementService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieve a list of active entitlements for a customer
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/entitlements/feature_service.rb b/lib/stripe/services/entitlements/feature_service.rb
index 05b0daed..5b9375a3 100644
--- a/lib/stripe/services/entitlements/feature_service.rb
+++ b/lib/stripe/services/entitlements/feature_service.rb
@@ -4,6 +4,82 @@
module Stripe
module Entitlements
class FeatureService < StripeService
+ class ListParams < Stripe::RequestParams
+ # If set, filter results to only include features with the given archive status.
+ attr_accessor :archived
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # If set, filter results to only include features with the given lookup_key.
+ attr_accessor :lookup_key
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ archived: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_key: nil,
+ starting_after: nil
+ )
+ @archived = archived
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @lookup_key = lookup_key
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ attr_accessor :lookup_key
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ attr_accessor :name
+
+ def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil)
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ attr_accessor :name
+
+ def initialize(active: nil, expand: nil, metadata: nil, name: nil)
+ @active = active
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+
# Creates a feature
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/ephemeral_key_service.rb b/lib/stripe/services/ephemeral_key_service.rb
index b58c18cf..dafc0906 100644
--- a/lib/stripe/services/ephemeral_key_service.rb
+++ b/lib/stripe/services/ephemeral_key_service.rb
@@ -3,6 +3,42 @@
module Stripe
class EphemeralKeyService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The ID of the Customer you'd like to modify using the resulting ephemeral key.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The ID of the Issuing Card you'd like to access using the resulting ephemeral key.
+ attr_accessor :issuing_card
+ # A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information.
+ attr_accessor :nonce
+ # The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key
+ attr_accessor :verification_session
+
+ def initialize(
+ customer: nil,
+ expand: nil,
+ issuing_card: nil,
+ nonce: nil,
+ verification_session: nil
+ )
+ @customer = customer
+ @expand = expand
+ @issuing_card = issuing_card
+ @nonce = nonce
+ @verification_session = verification_session
+ end
+ end
+
# Creates a short-lived API key for a given resource.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/event_service.rb b/lib/stripe/services/event_service.rb
index a6a75eb8..7707f43c 100644
--- a/lib/stripe/services/event_service.rb
+++ b/lib/stripe/services/event_service.rb
@@ -3,6 +3,71 @@
module Stripe
class EventService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return events that were created during the given date interval.
+ attr_accessor :created
+ # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
+ attr_accessor :delivery_success
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.
+ attr_accessor :type
+ # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.
+ attr_accessor :types
+
+ def initialize(
+ created: nil,
+ delivery_success: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ types: nil
+ )
+ @created = created
+ @delivery_success = delivery_success
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ @types = types
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
def list(params = {}, opts = {})
request(method: :get, path: "/v1/events", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/exchange_rate_service.rb b/lib/stripe/services/exchange_rate_service.rb
index 86205a38..302b4244 100644
--- a/lib/stripe/services/exchange_rate_service.rb
+++ b/lib/stripe/services/exchange_rate_service.rb
@@ -3,6 +3,33 @@
module Stripe
class ExchangeRateService < StripeService
+ class ListParams < Stripe::RequestParams
+ # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.
+ attr_accessor :limit
+ # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/file_link_service.rb b/lib/stripe/services/file_link_service.rb
index d06ca20b..045a28c9 100644
--- a/lib/stripe/services/file_link_service.rb
+++ b/lib/stripe/services/file_link_service.rb
@@ -3,6 +3,100 @@
module Stripe
class FileLinkService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return links that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Filter links by their expiration status. By default, Stripe returns all links.
+ attr_accessor :expired
+ # Only return links for the given file.
+ attr_accessor :file
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ expired: nil,
+ file: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @expired = expired
+ @file = file
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The link isn't usable after this future timestamp.
+ attr_accessor :expires_at
+ # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ attr_accessor :file
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @file = file
+ @metadata = metadata
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
+ attr_accessor :expires_at
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, expires_at: nil, metadata: nil)
+ @expand = expand
+ @expires_at = expires_at
+ @metadata = metadata
+ end
+ end
+
# Creates a new file link object.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/file_links", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/file_service.rb b/lib/stripe/services/file_service.rb
index 7afc7422..6304b84c 100644
--- a/lib/stripe/services/file_service.rb
+++ b/lib/stripe/services/file_service.rb
@@ -3,6 +3,95 @@
module Stripe
class FileService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return files that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
+ attr_accessor :purpose
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ purpose: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @purpose = purpose
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class FileLinkData < Stripe::RequestParams
+ # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ attr_accessor :create
+ # The link isn't available after this future timestamp.
+ attr_accessor :expires_at
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(create: nil, expires_at: nil, metadata: nil)
+ @create = create
+ @expires_at = expires_at
+ @metadata = metadata
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.
+ attr_accessor :file
+ # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
+ attr_accessor :file_link_data
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ attr_accessor :purpose
+
+ def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil)
+ @expand = expand
+ @file = file
+ @file_link_data = file_link_data
+ @purpose = purpose
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
#
# All of Stripe's officially supported Client libraries support sending multipart/form-data.
diff --git a/lib/stripe/services/financial_connections/account_owner_service.rb b/lib/stripe/services/financial_connections/account_owner_service.rb
index 5d9de861..06e6b94c 100644
--- a/lib/stripe/services/financial_connections/account_owner_service.rb
+++ b/lib/stripe/services/financial_connections/account_owner_service.rb
@@ -4,6 +4,33 @@
module Stripe
module FinancialConnections
class AccountOwnerService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The ID of the ownership object to fetch owners from.
+ attr_accessor :ownership
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ ownership: nil,
+ starting_after: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @ownership = ownership
+ @starting_after = starting_after
+ end
+ end
+
# Lists all owners for a given Account
def list(account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/financial_connections/account_service.rb b/lib/stripe/services/financial_connections/account_service.rb
index 4b0834ad..02981388 100644
--- a/lib/stripe/services/financial_connections/account_service.rb
+++ b/lib/stripe/services/financial_connections/account_service.rb
@@ -11,6 +11,102 @@ module Stripe
@owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved.
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved.
+ attr_accessor :customer
+
+ def initialize(account: nil, customer: nil)
+ @account = account
+ @customer = customer
+ end
+ end
+ # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
+ attr_accessor :account_holder
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # If present, only return accounts that were collected as part of the given session.
+ attr_accessor :session
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ account_holder: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ session: nil,
+ starting_after: nil
+ )
+ @account_holder = account_holder
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @session = session
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class DisconnectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RefreshParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The list of account features that you would like to refresh.
+ attr_accessor :features
+
+ def initialize(expand: nil, features: nil)
+ @expand = expand
+ @features = features
+ end
+ end
+
+ class SubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The list of account features to which you would like to subscribe.
+ attr_accessor :features
+
+ def initialize(expand: nil, features: nil)
+ @expand = expand
+ @features = features
+ end
+ end
+
+ class UnsubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The list of account features from which you would like to unsubscribe.
+ attr_accessor :features
+
+ def initialize(expand: nil, features: nil)
+ @expand = expand
+ @features = features
+ end
+ end
+
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
def disconnect(account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/financial_connections/session_service.rb b/lib/stripe/services/financial_connections/session_service.rb
index 89726e8c..350264ea 100644
--- a/lib/stripe/services/financial_connections/session_service.rb
+++ b/lib/stripe/services/financial_connections/session_service.rb
@@ -4,6 +4,74 @@
module Stripe
module FinancialConnections
class SessionService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
+ attr_accessor :customer
+ # Type of account holder to collect accounts for.
+ attr_accessor :type
+
+ def initialize(account: nil, customer: nil, type: nil)
+ @account = account
+ @customer = customer
+ @type = type
+ end
+ end
+
+ class Filters < Stripe::RequestParams
+ # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ attr_accessor :account_subcategories
+ # List of countries from which to collect accounts.
+ attr_accessor :countries
+
+ def initialize(account_subcategories: nil, countries: nil)
+ @account_subcategories = account_subcategories
+ @countries = countries
+ end
+ end
+ # The account holder to link accounts for.
+ attr_accessor :account_holder
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Filters to restrict the kinds of accounts to collect.
+ attr_accessor :filters
+ # List of data features that you would like to request access to.
+ #
+ # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(
+ account_holder: nil,
+ expand: nil,
+ filters: nil,
+ permissions: nil,
+ prefetch: nil,
+ return_url: nil
+ )
+ @account_holder = account_holder
+ @expand = expand
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
# To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/financial_connections/transaction_service.rb b/lib/stripe/services/financial_connections/transaction_service.rb
index b28cc90e..1e2c0085 100644
--- a/lib/stripe/services/financial_connections/transaction_service.rb
+++ b/lib/stripe/services/financial_connections/transaction_service.rb
@@ -4,6 +4,76 @@
module Stripe
module FinancialConnections
class TransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class TransactedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class TransactionRefresh < Stripe::RequestParams
+ # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
+ attr_accessor :after
+
+ def initialize(after: nil)
+ @after = after
+ end
+ end
+ # The ID of the Financial Connections Account whose transactions will be retrieved.
+ attr_accessor :account
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
+ attr_accessor :transacted_at
+ # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
+ attr_accessor :transaction_refresh
+
+ def initialize(
+ account: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transacted_at: nil,
+ transaction_refresh: nil
+ )
+ @account = account
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @transacted_at = transacted_at
+ @transaction_refresh = transaction_refresh
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of Financial Connections Transaction objects.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/forwarding/request_service.rb b/lib/stripe/services/forwarding/request_service.rb
index c9b3ec23..24a41732 100644
--- a/lib/stripe/services/forwarding/request_service.rb
+++ b/lib/stripe/services/forwarding/request_service.rb
@@ -4,6 +4,112 @@
module Stripe
module Forwarding
class RequestService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Return results where the `created` field is greater than this value.
+ attr_accessor :gt
+ # Return results where the `created` field is greater than or equal to this value.
+ attr_accessor :gte
+ # Return results where the `created` field is less than this value.
+ attr_accessor :lt
+ # Return results where the `created` field is less than or equal to this value.
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.
+ attr_accessor :created
+ # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Request < Stripe::RequestParams
+ class Header < Stripe::RequestParams
+ # The header name.
+ attr_accessor :name
+ # The header value.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+ # The body payload to send to the destination endpoint.
+ attr_accessor :body
+ # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ attr_accessor :headers
+
+ def initialize(body: nil, headers: nil)
+ @body = body
+ @headers = headers
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ attr_accessor :payment_method
+ # The field kinds to be replaced in the forwarded request.
+ attr_accessor :replacements
+ # The request body and headers to be sent to the destination endpoint.
+ attr_accessor :request
+ # The destination URL for the forwarded request. Must be supported by the config.
+ attr_accessor :url
+
+ def initialize(
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ replacements: nil,
+ request: nil,
+ url: nil
+ )
+ @expand = expand
+ @metadata = metadata
+ @payment_method = payment_method
+ @replacements = replacements
+ @request = request
+ @url = url
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a ForwardingRequest object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/identity/verification_report_service.rb b/lib/stripe/services/identity/verification_report_service.rb
index 6598452f..e5e15803 100644
--- a/lib/stripe/services/identity/verification_report_service.rb
+++ b/lib/stripe/services/identity/verification_report_service.rb
@@ -4,6 +4,71 @@
module Stripe
module Identity
class VerificationReportService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_accessor :client_reference_id
+ # Only return VerificationReports that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return VerificationReports of this type
+ attr_accessor :type
+ # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.
+ attr_accessor :verification_session
+
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ verification_session: nil
+ )
+ @client_reference_id = client_reference_id
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ @verification_session = verification_session
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# List all verification reports.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/identity/verification_session_service.rb b/lib/stripe/services/identity/verification_session_service.rb
index c3680539..b242c31f 100644
--- a/lib/stripe/services/identity/verification_session_service.rb
+++ b/lib/stripe/services/identity/verification_session_service.rb
@@ -4,6 +4,237 @@
module Stripe
module Identity
class VerificationSessionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_accessor :client_reference_id
+ # Only return VerificationSessions that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Attribute for param field related_customer
+ attr_accessor :related_customer
+ # 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.
+ attr_accessor :starting_after
+ # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
+ attr_accessor :status
+
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ related_customer: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @client_reference_id = client_reference_id
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @related_customer = related_customer
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ attr_accessor :require_matching_selfie
+
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ )
+ @allowed_types = allowed_types
+ @require_id_number = require_id_number
+ @require_live_capture = require_live_capture
+ @require_matching_selfie = require_matching_selfie
+ end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ attr_accessor :email
+ # Phone number of user being verified
+ attr_accessor :phone
+
+ def initialize(email: nil, phone: nil)
+ @email = email
+ @phone = phone
+ end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ attr_accessor :client_reference_id
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ attr_accessor :provided_details
+ # Customer ID
+ attr_accessor :related_customer
+ # The URL that the user will be redirected to upon completing the verification flow.
+ attr_accessor :return_url
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
+ attr_accessor :type
+ # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
+ attr_accessor :verification_flow
+
+ def initialize(
+ client_reference_id: nil,
+ expand: nil,
+ metadata: nil,
+ options: nil,
+ provided_details: nil,
+ related_customer: nil,
+ return_url: nil,
+ type: nil,
+ verification_flow: nil
+ )
+ @client_reference_id = client_reference_id
+ @expand = expand
+ @metadata = metadata
+ @options = options
+ @provided_details = provided_details
+ @related_customer = related_customer
+ @return_url = return_url
+ @type = type
+ @verification_flow = verification_flow
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ attr_accessor :require_matching_selfie
+
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ )
+ @allowed_types = allowed_types
+ @require_id_number = require_id_number
+ @require_live_capture = require_live_capture
+ @require_matching_selfie = require_matching_selfie
+ end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ attr_accessor :email
+ # Phone number of user being verified
+ attr_accessor :phone
+
+ def initialize(email: nil, phone: nil)
+ @email = email
+ @phone = phone
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ attr_accessor :provided_details
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ attr_accessor :type
+
+ def initialize(expand: nil, metadata: nil, options: nil, provided_details: nil, type: nil)
+ @expand = expand
+ @metadata = metadata
+ @options = options
+ @provided_details = provided_details
+ @type = type
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RedactParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
#
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
diff --git a/lib/stripe/services/invoice_item_service.rb b/lib/stripe/services/invoice_item_service.rb
index 9c69a620..a3b95a83 100644
--- a/lib/stripe/services/invoice_item_service.rb
+++ b/lib/stripe/services/invoice_item_service.rb
@@ -3,6 +3,340 @@
module Stripe
class InvoiceItemService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @tax_rates = tax_rates
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return invoice items that were created during the given date interval.
+ attr_accessor :created
+ # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.
+ attr_accessor :pending
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ pending: nil,
+ starting_after: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @pending = pending
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # The ID of the customer who will be billed when this invoice item is billed.
+ attr_accessor :customer
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.
+ attr_accessor :discountable
+ # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
+ attr_accessor :invoice
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ attr_accessor :quantity
+ # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
+ attr_accessor :subscription
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ invoice: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @currency = currency
+ @customer = customer
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @expand = expand
+ @invoice = invoice
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @subscription = subscription
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @tax_rates = tax_rates
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
# Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/invoice_line_item_service.rb b/lib/stripe/services/invoice_line_item_service.rb
index e8edbbc5..0b174fa7 100644
--- a/lib/stripe/services/invoice_line_item_service.rb
+++ b/lib/stripe/services/invoice_line_item_service.rb
@@ -3,6 +3,227 @@
module Stripe
class InvoiceLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @country = country
+ @description = description
+ @display_name = display_name
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @jurisdiction_level = jurisdiction_level
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(amount: nil, tax_rate_data: nil, taxability_reason: nil, taxable_amount: nil)
+ @amount = amount
+ @tax_rate_data = tax_rate_data
+ @taxability_reason = taxability_reason
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ end
+ end
+
# When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list(invoice, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/invoice_payment_service.rb b/lib/stripe/services/invoice_payment_service.rb
index 918868f4..805ec34c 100644
--- a/lib/stripe/services/invoice_payment_service.rb
+++ b/lib/stripe/services/invoice_payment_service.rb
@@ -3,6 +3,61 @@
module Stripe
class InvoicePaymentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Payment < Stripe::RequestParams
+ # Attribute for param field payment_intent
+ attr_accessor :payment_intent
+ # Attribute for param field type
+ attr_accessor :type
+
+ def initialize(payment_intent: nil, type: nil)
+ @payment_intent = payment_intent
+ @type = type
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field invoice
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Attribute for param field payment
+ attr_accessor :payment
+ # 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.
+ attr_accessor :starting_after
+ # Attribute for param field status
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ payment: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @invoice = invoice
+ @limit = limit
+ @payment = payment
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/invoice_rendering_template_service.rb b/lib/stripe/services/invoice_rendering_template_service.rb
index d263f0a9..d8823e1a 100644
--- a/lib/stripe/services/invoice_rendering_template_service.rb
+++ b/lib/stripe/services/invoice_rendering_template_service.rb
@@ -3,6 +3,57 @@
module Stripe
class InvoiceRenderingTemplateService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Attribute for param field status
+ attr_accessor :status
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil, status: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field version
+ attr_accessor :version
+
+ def initialize(expand: nil, version: nil)
+ @expand = expand
+ @version = version
+ end
+ end
+
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UnarchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
def archive(template, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb
index 469bd800..9453d17b 100644
--- a/lib/stripe/services/invoice_service.rb
+++ b/lib/stripe/services/invoice_service.rb
@@ -10,6 +10,2653 @@ module Stripe
@line_items = Stripe::InvoiceLineItemService.new(@requestor)
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(installments: nil, request_three_d_secure: nil)
+ @installments = installments
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+
+ def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil)
+ @default_mandate = default_mandate
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ end
+ end
+
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ attr_accessor :page_size
+
+ def initialize(page_size: nil)
+ @page_size = page_size
+ end
+ end
+ # 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.
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ attr_accessor :template_version
+
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil)
+ @amount_tax_display = amount_tax_display
+ @pdf = pdf
+ @template = template
+ @template_version = template_version
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address
+ attr_accessor :address
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension)
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
+ attr_accessor :collection_method
+ # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
+ attr_accessor :custom_fields
+ # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ attr_accessor :description
+ # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ attr_accessor :payment_settings
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ attr_accessor :statement_descriptor
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
+ attr_accessor :transfer_data
+
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ custom_fields: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @application_fee_amount = application_fee_amount
+ @auto_advance = auto_advance
+ @automatic_tax = automatic_tax
+ @automatically_finalizes_at = automatically_finalizes_at
+ @collection_method = collection_method
+ @custom_fields = custom_fields
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @due_date = due_date
+ @effective_at = effective_at
+ @expand = expand
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @number = number
+ @on_behalf_of = on_behalf_of
+ @payment_settings = payment_settings
+ @rendering = rendering
+ @shipping_cost = shipping_cost
+ @shipping_details = shipping_details
+ @statement_descriptor = statement_descriptor
+ @transfer_data = transfer_data
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class DueDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
+ attr_accessor :collection_method
+ # Only return invoices that were created during the given date interval.
+ attr_accessor :created
+ # Only return invoices for the customer specified by this customer ID.
+ attr_accessor :customer
+ # Attribute for param field due_date
+ attr_accessor :due_date
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
+ attr_accessor :status
+ # Only return invoices for the subscription specified by this subscription ID.
+ attr_accessor :subscription
+
+ def initialize(
+ collection_method: nil,
+ created: nil,
+ customer: nil,
+ due_date: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ )
+ @collection_method = collection_method
+ @created = created
+ @customer = customer
+ @due_date = due_date
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @subscription = subscription
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class FromInvoice < Stripe::RequestParams
+ # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
+ attr_accessor :action
+ # The `id` of the invoice that will be cloned.
+ attr_accessor :invoice
+
+ def initialize(action: nil, invoice: nil)
+ @action = action
+ @invoice = invoice
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(installments: nil, request_three_d_secure: nil)
+ @installments = installments
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+
+ def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil)
+ @default_mandate = default_mandate
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ end
+ end
+
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ attr_accessor :page_size
+
+ def initialize(page_size: nil)
+ @page_size = page_size
+ end
+ end
+ # 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.
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ attr_accessor :template_version
+
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil)
+ @amount_tax_display = amount_tax_display
+ @pdf = pdf
+ @template = template
+ @template_version = template_version
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+ # The ID of the shipping rate to use for this order.
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ attr_accessor :shipping_rate_data
+
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
+ @shipping_rate = shipping_rate
+ @shipping_rate_data = shipping_rate_data
+ end
+ end
+
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address
+ attr_accessor :address
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension)
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # The currency to create this invoice in. Defaults to that of `customer` if not specified.
+ attr_accessor :currency
+ # A list of up to 4 custom fields to be displayed on the invoice.
+ attr_accessor :custom_fields
+ # The ID of the customer who will be billed.
+ attr_accessor :customer
+ # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ attr_accessor :description
+ # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ attr_accessor :footer
+ # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ attr_accessor :from_invoice
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ attr_accessor :payment_settings
+ # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
+ attr_accessor :pending_invoice_items_behavior
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ attr_accessor :statement_descriptor
+ # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
+ attr_accessor :subscription
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
+ attr_accessor :transfer_data
+
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ currency: nil,
+ custom_fields: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ from_invoice: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ pending_invoice_items_behavior: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ subscription: nil,
+ transfer_data: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @application_fee_amount = application_fee_amount
+ @auto_advance = auto_advance
+ @automatic_tax = automatic_tax
+ @automatically_finalizes_at = automatically_finalizes_at
+ @collection_method = collection_method
+ @currency = currency
+ @custom_fields = custom_fields
+ @customer = customer
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @due_date = due_date
+ @effective_at = effective_at
+ @expand = expand
+ @footer = footer
+ @from_invoice = from_invoice
+ @issuer = issuer
+ @metadata = metadata
+ @number = number
+ @on_behalf_of = on_behalf_of
+ @payment_settings = payment_settings
+ @pending_invoice_items_behavior = pending_invoice_items_behavior
+ @rendering = rendering
+ @shipping_cost = shipping_cost
+ @shipping_details = shipping_details
+ @statement_descriptor = statement_descriptor
+ @subscription = subscription
+ @transfer_data = transfer_data
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class AddLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @country = country
+ @description = description
+ @display_name = display_name
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @jurisdiction_level = jurisdiction_level
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ )
+ @amount = amount
+ @tax_rate_data = tax_rate_data
+ @taxability_reason = taxability_reason
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
+ attr_accessor :invoice_item
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoice_item: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @invoice_item = invoice_item
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :invoice_metadata
+ # The line items to add.
+ attr_accessor :lines
+
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil)
+ @expand = expand
+ @invoice_metadata = invoice_metadata
+ @lines = lines
+ end
+ end
+
+ class FinalizeInvoiceParams < Stripe::RequestParams
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ attr_accessor :auto_advance
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(auto_advance: nil, expand: nil)
+ @auto_advance = auto_advance
+ @expand = expand
+ end
+ end
+
+ class MarkUncollectibleParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class PayParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
+ #
+ # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
+ attr_accessor :forgive
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
+ attr_accessor :mandate
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
+ attr_accessor :off_session
+ # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
+ attr_accessor :paid_out_of_band
+ # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
+ attr_accessor :payment_method
+ # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
+ attr_accessor :source
+
+ def initialize(
+ expand: nil,
+ forgive: nil,
+ mandate: nil,
+ off_session: nil,
+ paid_out_of_band: nil,
+ payment_method: nil,
+ source: nil
+ )
+ @expand = expand
+ @forgive = forgive
+ @mandate = mandate
+ @off_session = off_session
+ @paid_out_of_band = paid_out_of_band
+ @payment_method = payment_method
+ @source = source
+ end
+ end
+
+ class RemoveLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
+ attr_accessor :behavior
+ # ID of an existing line item to remove from this invoice.
+ attr_accessor :id
+
+ def initialize(behavior: nil, id: nil)
+ @behavior = behavior
+ @id = id
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :invoice_metadata
+ # The line items to remove.
+ attr_accessor :lines
+
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil)
+ @expand = expand
+ @invoice_metadata = invoice_metadata
+ @lines = lines
+ end
+ end
+
+ class SendInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
+ @description = description
+ @images = images
+ @metadata = metadata
+ @name = name
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @product_data = product_data
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ attr_accessor :price
+
+ def initialize(price: nil)
+ @price = price
+ end
+ end
+
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @country = country
+ @description = description
+ @display_name = display_name
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @jurisdiction_level = jurisdiction_level
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ attr_accessor :taxable_amount
+
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ )
+ @amount = amount
+ @tax_rate_data = tax_rate_data
+ @taxability_reason = taxability_reason
+ @taxable_amount = taxable_amount
+ end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ attr_accessor :discounts
+ # ID of an existing line item on the invoice.
+ attr_accessor :id
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ )
+ @amount = amount
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @id = id
+ @metadata = metadata
+ @period = period
+ @price_data = price_data
+ @pricing = pricing
+ @quantity = quantity
+ @tax_amounts = tax_amounts
+ @tax_rates = tax_rates
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ attr_accessor :invoice_metadata
+ # The line items to update.
+ attr_accessor :lines
+
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil)
+ @expand = expand
+ @invoice_metadata = invoice_metadata
+ @lines = lines
+ end
+ end
+
+ class VoidInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreatePreviewParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Customer shipping address.
+ attr_accessor :address
+ # Customer name.
+ attr_accessor :name
+ # Customer phone (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ attr_accessor :ip_address
+
+ def initialize(ip_address: nil)
+ @ip_address = ip_address
+ end
+ end
+
+ class TaxId < Stripe::RequestParams
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(type: nil, value: nil)
+ @type = type
+ @value = value
+ end
+ end
+ # The customer's address.
+ attr_accessor :address
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ attr_accessor :shipping
+ # Tax details about the customer.
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ attr_accessor :tax_ids
+
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil)
+ @address = address
+ @shipping = shipping
+ @tax = tax
+ @tax_exempt = tax_exempt
+ @tax_ids = tax_ids
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ attr_accessor :start
+
+ def initialize(end_: nil, start: nil)
+ @end = end_
+ @start = start
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
+ attr_accessor :amount
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
+ attr_accessor :currency
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ attr_accessor :description
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
+ attr_accessor :discountable
+ # The coupons to redeem into discounts for the invoice item in the preview.
+ attr_accessor :discounts
+ # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
+ attr_accessor :invoiceitem
+ # 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`.
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ attr_accessor :period
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Non-negative integer. The quantity of units for the invoice item.
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+ # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoiceitem: nil,
+ metadata: nil,
+ period: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @discountable = discountable
+ @discounts = discounts
+ @invoiceitem = invoiceitem
+ @metadata = metadata
+ @period = period
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @tax_rates = tax_rates
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class ScheduleDetails < Stripe::RequestParams
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ attr_accessor :trial_end
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @currency = currency
+ @default_payment_method = default_payment_method
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @end_date = end_date
+ @invoice_settings = invoice_settings
+ @items = items
+ @iterations = iterations
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @start_date = start_date
+ @transfer_data = transfer_data
+ @trial = trial
+ @trial_end = trial_end
+ end
+ end
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_accessor :end_behavior
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ attr_accessor :phases
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
+ attr_accessor :proration_behavior
+
+ def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
+ @end_behavior = end_behavior
+ @phases = phases
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class SubscriptionDetails < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Subscription item to update.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @clear_usage = clear_usage
+ @deleted = deleted
+ @discounts = discounts
+ @id = id
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ attr_accessor :cancel_at_period_end
+ # This simulates the subscription being canceled or expired immediately.
+ attr_accessor :cancel_now
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # A list of up to 20 subscription items, each with an attached price.
+ attr_accessor :items
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
+ attr_accessor :proration_date
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
+ attr_accessor :resume_at
+ # Date a subscription is intended to start (can be future or past).
+ attr_accessor :start_date
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
+ attr_accessor :trial_end
+
+ def initialize(
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancel_now: nil,
+ default_tax_rates: nil,
+ items: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ resume_at: nil,
+ start_date: nil,
+ trial_end: nil
+ )
+ @billing_cycle_anchor = billing_cycle_anchor
+ @cancel_at = cancel_at
+ @cancel_at_period_end = cancel_at_period_end
+ @cancel_now = cancel_now
+ @default_tax_rates = default_tax_rates
+ @items = items
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @resume_at = resume_at
+ @start_date = start_date
+ @trial_end = trial_end
+ end
+ end
+ # Settings for automatic tax lookup for this invoice preview.
+ attr_accessor :automatic_tax
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
+ attr_accessor :currency
+ # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ attr_accessor :customer
+ # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ attr_accessor :customer_details
+ # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
+ attr_accessor :invoice_items
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ attr_accessor :on_behalf_of
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
+ attr_accessor :preview_mode
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
+ attr_accessor :schedule
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
+ attr_accessor :schedule_details
+ # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
+ attr_accessor :subscription
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
+ attr_accessor :subscription_details
+
+ def initialize(
+ automatic_tax: nil,
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_items: nil,
+ issuer: nil,
+ on_behalf_of: nil,
+ preview_mode: nil,
+ schedule: nil,
+ schedule_details: nil,
+ subscription: nil,
+ subscription_details: nil
+ )
+ @automatic_tax = automatic_tax
+ @currency = currency
+ @customer = customer
+ @customer_details = customer_details
+ @discounts = discounts
+ @expand = expand
+ @invoice_items = invoice_items
+ @issuer = issuer
+ @on_behalf_of = on_behalf_of
+ @preview_mode = preview_mode
+ @schedule = schedule
+ @schedule_details = schedule_details
+ @subscription = subscription
+ @subscription_details = subscription_details
+ end
+ end
+
# Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
def add_lines(invoice, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/authorization_service.rb b/lib/stripe/services/issuing/authorization_service.rb
index 51b435f3..77c99384 100644
--- a/lib/stripe/services/issuing/authorization_service.rb
+++ b/lib/stripe/services/issuing/authorization_service.rb
@@ -4,6 +4,110 @@
module Stripe
module Issuing
class AuthorizationService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return authorizations that belong to the given card.
+ attr_accessor :card
+ # Only return authorizations that belong to the given cardholder.
+ attr_accessor :cardholder
+ # Only return authorizations that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.
+ attr_accessor :status
+
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @card = card
+ @cardholder = cardholder
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class ApproveParams < Stripe::RequestParams
+ # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(amount: nil, expand: nil, metadata: nil)
+ @amount = amount
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class DeclineParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
def approve(authorization, params = {}, opts = {})
diff --git a/lib/stripe/services/issuing/card_service.rb b/lib/stripe/services/issuing/card_service.rb
index c2d96dae..dec1bf0f 100644
--- a/lib/stripe/services/issuing/card_service.rb
+++ b/lib/stripe/services/issuing/card_service.rb
@@ -4,6 +4,461 @@
module Stripe
module Issuing
class CardService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return cards belonging to the Cardholder with the provided ID.
+ attr_accessor :cardholder
+ # Only return cards that were issued during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Only return cards that have the given expiration month.
+ attr_accessor :exp_month
+ # Only return cards that have the given expiration year.
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return cards that have the given last four digits.
+ attr_accessor :last4
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Attribute for param field personalization_design
+ attr_accessor :personalization_design
+ # 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.
+ attr_accessor :starting_after
+ # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
+ attr_accessor :status
+ # Only return cards that have the given type. One of `virtual` or `physical`.
+ attr_accessor :type
+
+ def initialize(
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ last4: nil,
+ limit: nil,
+ personalization_design: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ )
+ @cardholder = cardholder
+ @created = created
+ @ending_before = ending_before
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @expand = expand
+ @last4 = last4
+ @limit = limit
+ @personalization_design = personalization_design
+ @starting_after = starting_after
+ @status = status
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ attr_accessor :encrypted_number
+
+ def initialize(encrypted_number: nil)
+ @encrypted_number = encrypted_number
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ attr_accessor :mode
+
+ def initialize(mode: nil)
+ @mode = mode
+ end
+ end
+
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ attr_accessor :eori_number
+
+ def initialize(eori_number: nil)
+ @eori_number = eori_number
+ end
+ end
+ # The address that the card is shipped to.
+ attr_accessor :address
+ # Address validation settings.
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ attr_accessor :require_signature
+ # Shipment service.
+ attr_accessor :service
+ # Packaging options.
+ attr_accessor :type
+
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ )
+ @address = address
+ @address_validation = address_validation
+ @customs = customs
+ @name = name
+ @phone_number = phone_number
+ @require_signature = require_signature
+ @service = service
+ @type = type
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ attr_accessor :spending_limits
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ end
+ end
+ # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
+ attr_accessor :cardholder
+ # The currency for the card.
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field financial_account
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The personalization design object belonging to this card.
+ attr_accessor :personalization_design
+ # The desired PIN for this card.
+ attr_accessor :pin
+ # The card this is meant to be a replacement for (if any).
+ attr_accessor :replacement_for
+ # If `replacement_for` is specified, this should indicate why that card is being replaced.
+ attr_accessor :replacement_reason
+ # The second line to print on the card. Max length: 24 characters.
+ attr_accessor :second_line
+ # The address where the card will be shipped.
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ attr_accessor :status
+ # The type of card to issue. Possible values are `physical` or `virtual`.
+ attr_accessor :type
+
+ def initialize(
+ cardholder: nil,
+ currency: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ replacement_for: nil,
+ replacement_reason: nil,
+ second_line: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ )
+ @cardholder = cardholder
+ @currency = currency
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @personalization_design = personalization_design
+ @pin = pin
+ @replacement_for = replacement_for
+ @replacement_reason = replacement_reason
+ @second_line = second_line
+ @shipping = shipping
+ @spending_controls = spending_controls
+ @status = status
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ attr_accessor :encrypted_number
+
+ def initialize(encrypted_number: nil)
+ @encrypted_number = encrypted_number
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ attr_accessor :mode
+
+ def initialize(mode: nil)
+ @mode = mode
+ end
+ end
+
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ attr_accessor :eori_number
+
+ def initialize(eori_number: nil)
+ @eori_number = eori_number
+ end
+ end
+ # The address that the card is shipped to.
+ attr_accessor :address
+ # Address validation settings.
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ attr_accessor :require_signature
+ # Shipment service.
+ attr_accessor :service
+ # Packaging options.
+ attr_accessor :type
+
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ )
+ @address = address
+ @address_validation = address_validation
+ @customs = customs
+ @name = name
+ @phone_number = phone_number
+ @require_signature = require_signature
+ @service = service
+ @type = type
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ attr_accessor :spending_limits
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ end
+ end
+ # Reason why the `status` of this card is `canceled`.
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Attribute for param field personalization_design
+ attr_accessor :personalization_design
+ # The desired new PIN for this card.
+ attr_accessor :pin
+ # Updated shipping information for the card.
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
+ attr_accessor :status
+
+ def initialize(
+ cancellation_reason: nil,
+ expand: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil
+ )
+ @cancellation_reason = cancellation_reason
+ @expand = expand
+ @metadata = metadata
+ @personalization_design = personalization_design
+ @pin = pin
+ @shipping = shipping
+ @spending_controls = spending_controls
+ @status = status
+ end
+ end
+
# Creates an Issuing Card object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/cardholder_service.rb b/lib/stripe/services/issuing/cardholder_service.rb
index 790670bb..a01fedab 100644
--- a/lib/stripe/services/issuing/cardholder_service.rb
+++ b/lib/stripe/services/issuing/cardholder_service.rb
@@ -4,6 +4,531 @@
module Stripe
module Issuing
class CardholderService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return cardholders that were created during the given date interval.
+ attr_accessor :created
+ # Only return cardholders that have the given email address.
+ attr_accessor :email
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return cardholders that have the given phone number.
+ attr_accessor :phone_number
+ # 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.
+ attr_accessor :starting_after
+ # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.
+ attr_accessor :status
+ # Only return cardholders that have the given type. One of `individual` or `company`.
+ attr_accessor :type
+
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ phone_number: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ )
+ @created = created
+ @email = email
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @phone_number = phone_number
+ @starting_after = starting_after
+ @status = status
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The cardholder’s billing address.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ attr_accessor :user_terms_acceptance
+
+ def initialize(user_terms_acceptance: nil)
+ @user_terms_acceptance = user_terms_acceptance
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ attr_accessor :verification
+
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ )
+ @card_issuing = card_issuing
+ @dob = dob
+ @first_name = first_name
+ @last_name = last_name
+ @verification = verification
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ attr_accessor :spending_limits_currency
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ @spending_limits_currency = spending_limits_currency
+ end
+ end
+ # The cardholder's billing address.
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ attr_accessor :company
+ # The cardholder's email address.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
+ attr_accessor :name
+ # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.
+ attr_accessor :status
+ # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ attr_accessor :type
+
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ name: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ )
+ @billing = billing
+ @company = company
+ @email = email
+ @expand = expand
+ @individual = individual
+ @metadata = metadata
+ @name = name
+ @phone_number = phone_number
+ @preferred_locales = preferred_locales
+ @spending_controls = spending_controls
+ @status = status
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The cardholder’s billing address.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ attr_accessor :user_terms_acceptance
+
+ def initialize(user_terms_acceptance: nil)
+ @user_terms_acceptance = user_terms_acceptance
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ attr_accessor :verification
+
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ )
+ @card_issuing = card_issuing
+ @dob = dob
+ @first_name = first_name
+ @last_name = last_name
+ @verification = verification
+ end
+ end
+
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ attr_accessor :interval
+
+ def initialize(amount: nil, categories: nil, interval: nil)
+ @amount = amount
+ @categories = categories
+ @interval = interval
+ end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ attr_accessor :spending_limits_currency
+
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ )
+ @allowed_categories = allowed_categories
+ @allowed_merchant_countries = allowed_merchant_countries
+ @blocked_categories = blocked_categories
+ @blocked_merchant_countries = blocked_merchant_countries
+ @spending_limits = spending_limits
+ @spending_limits_currency = spending_limits_currency
+ end
+ end
+ # The cardholder's billing address.
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ attr_accessor :company
+ # The cardholder's email address.
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ attr_accessor :individual
+ # 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`.
+ attr_accessor :metadata
+ # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards.
+ attr_accessor :status
+
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil
+ )
+ @billing = billing
+ @company = company
+ @email = email
+ @expand = expand
+ @individual = individual
+ @metadata = metadata
+ @phone_number = phone_number
+ @preferred_locales = preferred_locales
+ @spending_controls = spending_controls
+ @status = status
+ end
+ end
+
# Creates a new Issuing Cardholder object that can be issued cards.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/dispute_service.rb b/lib/stripe/services/issuing/dispute_service.rb
index 310fded8..d172a921 100644
--- a/lib/stripe/services/issuing/dispute_service.rb
+++ b/lib/stripe/services/issuing/dispute_service.rb
@@ -4,6 +4,639 @@
module Stripe
module Issuing
class DisputeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return Issuing disputes that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Select Issuing disputes with the given status.
+ attr_accessor :status
+ # Select the Issuing dispute for the given transaction.
+ attr_accessor :transaction
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ transaction: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @transaction = transaction
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_policy_provided = cancellation_policy_provided
+ @cancellation_reason = cancellation_reason
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ attr_accessor :original_transaction
+
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ )
+ @additional_documentation = additional_documentation
+ @card_statement = card_statement
+ @cash_receipt = cash_receipt
+ @check_image = check_image
+ @explanation = explanation
+ @original_transaction = original_transaction
+ end
+ end
+
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @received_at = received_at
+ @return_description = return_description
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_reason = cancellation_reason
+ @explanation = explanation
+ @received_at = received_at
+ end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ attr_accessor :service_not_as_described
+
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ )
+ @canceled = canceled
+ @duplicate = duplicate
+ @fraudulent = fraudulent
+ @merchandise_not_as_described = merchandise_not_as_described
+ @no_valid_authorization = no_valid_authorization
+ @not_received = not_received
+ @other = other
+ @reason = reason
+ @service_not_as_described = service_not_as_described
+ end
+ end
+
+ class Treasury < Stripe::RequestParams
+ # The ID of the ReceivedDebit to initiate an Issuings dispute for.
+ attr_accessor :received_debit
+
+ def initialize(received_debit: nil)
+ @received_debit = received_debit
+ end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
+ attr_accessor :transaction
+ # Params for disputes related to Treasury FinancialAccounts
+ attr_accessor :treasury
+
+ def initialize(
+ amount: nil,
+ evidence: nil,
+ expand: nil,
+ metadata: nil,
+ transaction: nil,
+ treasury: nil
+ )
+ @amount = amount
+ @evidence = evidence
+ @expand = expand
+ @metadata = metadata
+ @transaction = transaction
+ @treasury = treasury
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_policy_provided = cancellation_policy_provided
+ @cancellation_reason = cancellation_reason
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ attr_accessor :original_transaction
+
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ )
+ @additional_documentation = additional_documentation
+ @card_statement = card_statement
+ @cash_receipt = cash_receipt
+ @check_image = check_image
+ @explanation = explanation
+ @original_transaction = original_transaction
+ end
+ end
+
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ attr_accessor :returned_at
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @received_at = received_at
+ @return_description = return_description
+ @return_status = return_status
+ @returned_at = returned_at
+ end
+ end
+
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+
+ def initialize(additional_documentation: nil, explanation: nil)
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ end
+ end
+
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @expected_at = expected_at
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ attr_accessor :product_type
+
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ )
+ @additional_documentation = additional_documentation
+ @explanation = explanation
+ @product_description = product_description
+ @product_type = product_type
+ end
+ end
+
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ attr_accessor :explanation
+ # Date when the product was received.
+ attr_accessor :received_at
+
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ )
+ @additional_documentation = additional_documentation
+ @canceled_at = canceled_at
+ @cancellation_reason = cancellation_reason
+ @explanation = explanation
+ @received_at = received_at
+ end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ attr_accessor :service_not_as_described
+
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ )
+ @canceled = canceled
+ @duplicate = duplicate
+ @fraudulent = fraudulent
+ @merchandise_not_as_described = merchandise_not_as_described
+ @no_valid_authorization = no_valid_authorization
+ @not_received = not_received
+ @other = other
+ @reason = reason
+ @service_not_as_described = service_not_as_described
+ end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil)
+ @amount = amount
+ @evidence = evidence
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class SubmitParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/personalization_design_service.rb b/lib/stripe/services/issuing/personalization_design_service.rb
index 2dd92fe9..34de42f6 100644
--- a/lib/stripe/services/issuing/personalization_design_service.rb
+++ b/lib/stripe/services/issuing/personalization_design_service.rb
@@ -4,6 +4,199 @@
module Stripe
module Issuing
class PersonalizationDesignService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Preferences < Stripe::RequestParams
+ # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default.
+ attr_accessor :is_default
+ # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts.
+ attr_accessor :is_platform_default
+
+ def initialize(is_default: nil, is_platform_default: nil)
+ @is_default = is_default
+ @is_platform_default = is_platform_default
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return personalization designs with the given lookup keys.
+ attr_accessor :lookup_keys
+ # Only return personalization designs with the given preferences.
+ attr_accessor :preferences
+ # 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.
+ attr_accessor :starting_after
+ # Only return personalization designs with the given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ preferences: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @lookup_keys = lookup_keys
+ @preferences = preferences
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ attr_accessor :header_title
+
+ def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil)
+ @footer_body = footer_body
+ @footer_title = footer_title
+ @header_body = header_body
+ @header_title = header_title
+ end
+ end
+
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ attr_accessor :is_default
+
+ def initialize(is_default: nil)
+ @is_default = is_default
+ end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # Friendly display name.
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ attr_accessor :transfer_lookup_key
+
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ )
+ @card_logo = card_logo
+ @carrier_text = carrier_text
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @name = name
+ @physical_bundle = physical_bundle
+ @preferences = preferences
+ @transfer_lookup_key = transfer_lookup_key
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ attr_accessor :header_title
+
+ def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil)
+ @footer_body = footer_body
+ @footer_title = footer_title
+ @header_body = header_body
+ @header_title = header_title
+ end
+ end
+
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ attr_accessor :is_default
+
+ def initialize(is_default: nil)
+ @is_default = is_default
+ end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # Friendly display name. Providing an empty string will set the field to null.
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ attr_accessor :transfer_lookup_key
+
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ )
+ @card_logo = card_logo
+ @carrier_text = carrier_text
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @name = name
+ @physical_bundle = physical_bundle
+ @preferences = preferences
+ @transfer_lookup_key = transfer_lookup_key
+ end
+ end
+
# Creates a personalization design object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/physical_bundle_service.rb b/lib/stripe/services/issuing/physical_bundle_service.rb
index 60e0d404..ad55f1ad 100644
--- a/lib/stripe/services/issuing/physical_bundle_service.rb
+++ b/lib/stripe/services/issuing/physical_bundle_service.rb
@@ -4,6 +4,46 @@
module Stripe
module Issuing
class PhysicalBundleService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return physical bundles with the given status.
+ attr_accessor :status
+ # Only return physical bundles with the given type.
+ attr_accessor :type
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/token_service.rb b/lib/stripe/services/issuing/token_service.rb
index 1a081f27..421c1b95 100644
--- a/lib/stripe/services/issuing/token_service.rb
+++ b/lib/stripe/services/issuing/token_service.rb
@@ -4,6 +4,79 @@
module Stripe
module Issuing
class TokenService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # The Issuing card identifier to list tokens for.
+ attr_accessor :card
+ # Only return Issuing tokens that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Select Issuing tokens with the given status.
+ attr_accessor :status
+
+ def initialize(
+ card: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @card = card
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Specifies which status the token should be updated to.
+ attr_accessor :status
+
+ def initialize(expand: nil, status: nil)
+ @expand = expand
+ @status = status
+ end
+ end
+
# Lists all Issuing Token objects for a given card.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/issuing/transaction_service.rb b/lib/stripe/services/issuing/transaction_service.rb
index 3d51e640..62576153 100644
--- a/lib/stripe/services/issuing/transaction_service.rb
+++ b/lib/stripe/services/issuing/transaction_service.rb
@@ -4,6 +4,83 @@
module Stripe
module Issuing
class TransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return transactions that belong to the given card.
+ attr_accessor :card
+ # Only return transactions that belong to the given cardholder.
+ attr_accessor :cardholder
+ # Only return transactions that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return transactions that have the given type. One of `capture` or `refund`.
+ attr_accessor :type
+
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @card = card
+ @cardholder = cardholder
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/mandate_service.rb b/lib/stripe/services/mandate_service.rb
index 57e00ce1..69a6d041 100644
--- a/lib/stripe/services/mandate_service.rb
+++ b/lib/stripe/services/mandate_service.rb
@@ -3,6 +3,15 @@
module Stripe
class MandateService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieves a Mandate object.
def retrieve(mandate, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/payment_intent_service.rb b/lib/stripe/services/payment_intent_service.rb
index 1ff6c370..3e43dfc2 100644
--- a/lib/stripe/services/payment_intent_service.rb
+++ b/lib/stripe/services/payment_intent_service.rb
@@ -3,6 +3,7060 @@
module Stripe
class PaymentIntentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return PaymentIntents for the customer that this customer ID specifies.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this PaymentIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allow_redirects: nil, enabled: nil)
+ @allow_redirects = allow_redirects
+ @enabled = enabled
+ end
+ end
+
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(code: nil, setup_future_usage: nil)
+ @code = code
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @exemption_indicator = exemption_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ )
+ @capture_method = capture_method
+ @cvc_token = cvc_token
+ @installments = installments
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @require_cvc_recollection = require_cvc_recollection
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ attr_accessor :requested_priority
+
+ def initialize(requested_priority: nil)
+ @requested_priority = requested_priority
+ end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ attr_accessor :routing
+
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ )
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization_support = request_incremental_authorization_support
+ @routing = routing
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ )
+ @confirmation_number = confirmation_number
+ @expires_after_days = expires_after_days
+ @expires_at = expires_at
+ @product_description = product_description
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @persistent_token = persistent_token
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
+ @expires_after_seconds = expires_after_seconds
+ @expires_at = expires_at
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(reference: nil, setup_future_usage: nil)
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @preferred_settlement_speed = preferred_settlement_speed
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @card_present = card_present
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ # The amount is capped at the total transaction amount and if no amount is set,
+ # the full amount is transferred.
+ #
+ # If you intend to collect a fee and you need a more robust reporting experience, using
+ # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount)
+ # might be a better fit for your integration.
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
+ attr_accessor :automatic_payment_methods
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
+ attr_accessor :confirm
+ # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ attr_accessor :confirmation_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # 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).
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :mandate
+ # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :mandate_data
+ # 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`.
+ attr_accessor :metadata
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :off_session
+ # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent.
+ #
+ # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ attr_accessor :radar_options
+ # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # 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. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a Transfer.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ attr_accessor :transfer_group
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ automatic_payment_methods: nil,
+ capture_method: nil,
+ confirm: nil,
+ confirmation_method: nil,
+ confirmation_token: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil,
+ use_stripe_sdk: nil
+ )
+ @amount = amount
+ @application_fee_amount = application_fee_amount
+ @automatic_payment_methods = automatic_payment_methods
+ @capture_method = capture_method
+ @confirm = confirm
+ @confirmation_method = confirmation_method
+ @confirmation_token = confirmation_token
+ @currency = currency
+ @customer = customer
+ @description = description
+ @error_on_requires_action = error_on_requires_action
+ @expand = expand
+ @mandate = mandate
+ @mandate_data = mandate_data
+ @metadata = metadata
+ @off_session = off_session
+ @on_behalf_of = on_behalf_of
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @radar_options = radar_options
+ @receipt_email = receipt_email
+ @return_url = return_url
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.
+ attr_accessor :client_secret
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(client_secret: nil, expand: nil)
+ @client_secret = client_secret
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(code: nil, setup_future_usage: nil)
+ @code = code
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @exemption_indicator = exemption_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ )
+ @capture_method = capture_method
+ @cvc_token = cvc_token
+ @installments = installments
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @require_cvc_recollection = require_cvc_recollection
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ attr_accessor :requested_priority
+
+ def initialize(requested_priority: nil)
+ @requested_priority = requested_priority
+ end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ attr_accessor :routing
+
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ )
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization_support = request_incremental_authorization_support
+ @routing = routing
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ )
+ @confirmation_number = confirmation_number
+ @expires_after_days = expires_after_days
+ @expires_at = expires_at
+ @product_description = product_description
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @persistent_token = persistent_token
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
+ @expires_after_seconds = expires_after_seconds
+ @expires_at = expires_at
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(reference: nil, setup_future_usage: nil)
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @preferred_settlement_speed = preferred_settlement_speed
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @card_present = card_present
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # 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).
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration for this PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ capture_method: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @application_fee_amount = application_fee_amount
+ @capture_method = capture_method
+ @currency = currency
+ @customer = customer
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @receipt_email = receipt_email
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ @transfer_group = transfer_group
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class ApplyCustomerBalanceParams < Stripe::RequestParams
+ # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter.
+ #
+ # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent.
+ #
+ # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amount: nil, currency: nil, expand: nil)
+ @amount = amount
+ @currency = currency
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(cancellation_reason: nil, expand: nil)
+ @cancellation_reason = cancellation_reason
+ @expand = expand
+ end
+ end
+
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided.
+ attr_accessor :amount_to_capture
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents.
+ attr_accessor :final_capture
+ # 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`.
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a transfer after the payment
+ # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+
+ def initialize(
+ amount_to_capture: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ final_capture: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil
+ )
+ @amount_to_capture = amount_to_capture
+ @application_fee_amount = application_fee_amount
+ @expand = expand
+ @final_capture = final_capture
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_data = transfer_data
+ end
+ end
+
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(code: nil, setup_future_usage: nil)
+ @code = code
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ attr_accessor :type
+
+ def initialize(count: nil, interval: nil, type: nil)
+ @count = count
+ @interval = interval
+ @type = type
+ end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ attr_accessor :plan
+
+ def initialize(enabled: nil, plan: nil)
+ @enabled = enabled
+ @plan = plan
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @exemption_indicator = exemption_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ )
+ @capture_method = capture_method
+ @cvc_token = cvc_token
+ @installments = installments
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization = request_incremental_authorization
+ @request_multicapture = request_multicapture
+ @request_overcapture = request_overcapture
+ @request_three_d_secure = request_three_d_secure
+ @require_cvc_recollection = require_cvc_recollection
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ attr_accessor :requested_priority
+
+ def initialize(requested_priority: nil)
+ @requested_priority = requested_priority
+ end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ attr_accessor :routing
+
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ )
+ @request_extended_authorization = request_extended_authorization
+ @request_incremental_authorization_support = request_incremental_authorization_support
+ @routing = routing
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @requested_address_types = requested_address_types
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ )
+ @confirmation_number = confirmation_number
+ @expires_after_days = expires_after_days
+ @expires_at = expires_at
+ @product_description = product_description
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @persistent_token = persistent_token
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(setup_future_usage: nil, target_date: nil)
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
+ @expires_after_days = expires_after_days
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
+ @setup_future_usage = setup_future_usage
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ )
+ @capture_method = capture_method
+ @preferred_locale = preferred_locale
+ @reference = reference
+ @risk_correlation_id = risk_correlation_id
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
+ @expires_after_seconds = expires_after_seconds
+ @expires_at = expires_at
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ attr_accessor :setup_future_usage
+
+ def initialize(capture_method: nil, setup_future_usage: nil)
+ @capture_method = capture_method
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ attr_accessor :capture_method
+
+ def initialize(capture_method: nil)
+ @capture_method = capture_method
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
+ @mandate_options = mandate_options
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(preferred_language: nil, setup_future_usage: nil)
+ @preferred_language = preferred_language
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(reference: nil, setup_future_usage: nil)
+ @reference = reference
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ attr_accessor :target_date
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @preferred_settlement_speed = preferred_settlement_speed
+ @setup_future_usage = setup_future_usage
+ @target_date = target_date
+ @verification_method = verification_method
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
+ @app_id = app_id
+ @client = client
+ @setup_future_usage = setup_future_usage
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+
+ def initialize(setup_future_usage: nil)
+ @setup_future_usage = setup_future_usage
+ end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @card_present = card_present
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment.
+ attr_accessor :mandate
+ # Attribute for param field mandate_data
+ attr_accessor :mandate_data
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
+ attr_accessor :off_session
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ attr_accessor :radar_options
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ attr_accessor :receipt_email
+ # 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ attr_accessor :shipping
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ capture_method: nil,
+ confirmation_token: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ off_session: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ use_stripe_sdk: nil
+ )
+ @capture_method = capture_method
+ @confirmation_token = confirmation_token
+ @error_on_requires_action = error_on_requires_action
+ @expand = expand
+ @mandate = mandate
+ @mandate_data = mandate_data
+ @off_session = off_session
+ @payment_method = payment_method
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @radar_options = radar_options
+ @receipt_email = receipt_email
+ @return_url = return_url
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class IncrementAuthorizationParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+
+ def initialize(amount: nil)
+ @amount = amount
+ end
+ end
+ # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :application_fee_amount
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Text that appears on the customer's statement as the statement descriptor for a non-card or 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).
+ attr_accessor :statement_descriptor
+ # The parameters used to automatically create a transfer after the payment is captured.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ attr_accessor :transfer_data
+
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ )
+ @amount = amount
+ @application_fee_amount = application_fee_amount
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ @transfer_data = transfer_data
+ end
+ end
+
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil)
+ @amounts = amounts
+ @descriptor_code = descriptor_code
+ @expand = expand
+ end
+ end
+
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
def apply_customer_balance(intent, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/payment_link_line_item_service.rb b/lib/stripe/services/payment_link_line_item_service.rb
index f121b574..7a614b2f 100644
--- a/lib/stripe/services/payment_link_line_item_service.rb
+++ b/lib/stripe/services/payment_link_line_item_service.rb
@@ -3,6 +3,24 @@
module Stripe
class PaymentLinkLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# 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.
def list(payment_link, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/payment_link_service.rb b/lib/stripe/services/payment_link_service.rb
index d01e6360..e8f70ce9 100644
--- a/lib/stripe/services/payment_link_service.rb
+++ b/lib/stripe/services/payment_link_service.rb
@@ -10,6 +10,1282 @@ module Stripe
@line_items = Stripe::PaymentLinkLineItemService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
+ attr_accessor :active
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(active: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @active = active
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ attr_accessor :custom_message
+
+ def initialize(custom_message: nil)
+ @custom_message = custom_message
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # 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.
+ attr_accessor :url
+
+ def initialize(url: nil)
+ @url = url
+ end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ attr_accessor :type
+
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
+ @hosted_confirmation = hosted_confirmation
+ @redirect = redirect
+ @type = type
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ attr_accessor :position
+
+ def initialize(position: nil)
+ @position = position
+ end
+ end
+ # 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.
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ attr_accessor :terms_of_service
+
+ def initialize(payment_method_reuse_agreement: nil, promotions: nil, terms_of_service: nil)
+ @payment_method_reuse_agreement = payment_method_reuse_agreement
+ @promotions = promotions
+ @terms_of_service = terms_of_service
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_accessor :label
+ # 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.
+ attr_accessor :value
+
+ def initialize(label: nil, value: nil)
+ @label = label
+ @value = value
+ end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_accessor :options
+
+ def initialize(default_value: nil, options: nil)
+ @default_value = default_value
+ @options = options
+ end
+ end
+
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_accessor :custom
+ # The type of the label.
+ attr_accessor :type
+
+ def initialize(custom: nil, type: nil)
+ @custom = custom
+ @type = type
+ end
+ end
+
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+ # Configuration for `type=dropdown` fields.
+ attr_accessor :dropdown
+ # 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.
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ attr_accessor :text
+ # The type of the field.
+ attr_accessor :type
+
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ )
+ @dropdown = dropdown
+ @key = key
+ @label = label
+ @numeric = numeric
+ @optional = optional
+ @text = text
+ @type = type
+ end
+ end
+
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_accessor :terms_of_service_acceptance
+
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ )
+ @after_submit = after_submit
+ @shipping_address = shipping_address
+ @submit = submit
+ @terms_of_service_acceptance = terms_of_service_acceptance
+ end
+ end
+
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+
+ def initialize(amount_tax_display: nil)
+ @amount_tax_display = amount_tax_display
+ end
+ end
+ # The account tax IDs associated with the invoice.
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @custom_fields = custom_fields
+ @description = description
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @rendering_options = rendering_options
+ end
+ end
+ # Whether the feature is enabled
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ attr_accessor :invoice_data
+
+ def initialize(enabled: nil, invoice_data: nil)
+ @enabled = enabled
+ @invoice_data = invoice_data
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ attr_accessor :price
+ # The quantity of the line item being purchased.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @price = price
+ @quantity = quantity
+ end
+ end
+
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # 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.
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @price = price
+ @quantity = quantity
+ end
+ end
+
+ class PaymentIntentData < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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.
+ attr_accessor :metadata
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ attr_accessor :setup_future_usage
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ attr_accessor :transfer_group
+
+ def initialize(
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ setup_future_usage: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ )
+ @capture_method = capture_method
+ @description = description
+ @metadata = metadata
+ @setup_future_usage = setup_future_usage
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_group = transfer_group
+ end
+ end
+
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ attr_accessor :limit
+
+ def initialize(limit: nil)
+ @limit = limit
+ end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ attr_accessor :completed_sessions
+
+ def initialize(completed_sessions: nil)
+ @completed_sessions = completed_sessions
+ end
+ end
+
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ attr_accessor :allowed_countries
+
+ def initialize(allowed_countries: nil)
+ @allowed_countries = allowed_countries
+ end
+ end
+
+ class ShippingOption < Stripe::RequestParams
+ # The ID of the Shipping Rate to use for this shipping option.
+ attr_accessor :shipping_rate
+
+ def initialize(shipping_rate: nil)
+ @shipping_rate = shipping_rate
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(issuer: nil)
+ @issuer = issuer
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # 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.
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # 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.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @description = description
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ attr_accessor :required
+
+ def initialize(enabled: nil, required: nil)
+ @enabled = enabled
+ @required = required
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ attr_accessor :destination
+
+ def initialize(amount: nil, destination: nil)
+ @amount = amount
+ @destination = destination
+ end
+ end
+ # Behavior after the purchase is complete.
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ attr_accessor :allow_promotion_codes
+ # 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.
+ attr_accessor :application_fee_amount
+ # 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.
+ attr_accessor :application_fee_percent
+ # Configuration for automatic tax collection.
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ attr_accessor :billing_address_collection
+ # Configure fields to gather active consent from customers.
+ attr_accessor :consent_collection
+ # 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.
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ attr_accessor :custom_text
+ # 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).
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ attr_accessor :line_items
+ # 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.
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ attr_accessor :on_behalf_of
+ # 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).
+ # 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.
+ # There is a maximum of 20 combined line items and optional items.
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ attr_accessor :payment_method_collection
+ # 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)).
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ attr_accessor :shipping_options
+ # 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`).
+ attr_accessor :submit_type
+ # 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`.
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ attr_accessor :tax_id_collection
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ attr_accessor :transfer_data
+
+ def initialize(
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil,
+ transfer_data: nil
+ )
+ @after_completion = after_completion
+ @allow_promotion_codes = allow_promotion_codes
+ @application_fee_amount = application_fee_amount
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_address_collection = billing_address_collection
+ @consent_collection = consent_collection
+ @currency = currency
+ @custom_fields = custom_fields
+ @custom_text = custom_text
+ @customer_creation = customer_creation
+ @expand = expand
+ @inactive_message = inactive_message
+ @invoice_creation = invoice_creation
+ @line_items = line_items
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @optional_items = optional_items
+ @payment_intent_data = payment_intent_data
+ @payment_method_collection = payment_method_collection
+ @payment_method_types = payment_method_types
+ @phone_number_collection = phone_number_collection
+ @restrictions = restrictions
+ @shipping_address_collection = shipping_address_collection
+ @shipping_options = shipping_options
+ @submit_type = submit_type
+ @subscription_data = subscription_data
+ @tax_id_collection = tax_id_collection
+ @transfer_data = transfer_data
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ attr_accessor :custom_message
+
+ def initialize(custom_message: nil)
+ @custom_message = custom_message
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # 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.
+ attr_accessor :url
+
+ def initialize(url: nil)
+ @url = url
+ end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ attr_accessor :type
+
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
+ @hosted_confirmation = hosted_confirmation
+ @redirect = redirect
+ @type = type
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ attr_accessor :label
+ # 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.
+ attr_accessor :value
+
+ def initialize(label: nil, value: nil)
+ @label = label
+ @value = value
+ end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ attr_accessor :options
+
+ def initialize(default_value: nil, options: nil)
+ @default_value = default_value
+ @options = options
+ end
+ end
+
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ attr_accessor :custom
+ # The type of the label.
+ attr_accessor :type
+
+ def initialize(custom: nil, type: nil)
+ @custom = custom
+ @type = type
+ end
+ end
+
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ attr_accessor :minimum_length
+
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
+ @default_value = default_value
+ @maximum_length = maximum_length
+ @minimum_length = minimum_length
+ end
+ end
+ # Configuration for `type=dropdown` fields.
+ attr_accessor :dropdown
+ # 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.
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ attr_accessor :text
+ # The type of the field.
+ attr_accessor :type
+
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ )
+ @dropdown = dropdown
+ @key = key
+ @label = label
+ @numeric = numeric
+ @optional = optional
+ @text = text
+ @type = type
+ end
+ end
+
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ attr_accessor :message
+
+ def initialize(message: nil)
+ @message = message
+ end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ attr_accessor :terms_of_service_acceptance
+
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ )
+ @after_submit = after_submit
+ @shipping_address = shipping_address
+ @submit = submit
+ @terms_of_service_acceptance = terms_of_service_acceptance
+ end
+ end
+
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ attr_accessor :value
+
+ def initialize(name: nil, value: nil)
+ @name = name
+ @value = value
+ end
+ end
+
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ attr_accessor :amount_tax_display
+
+ def initialize(amount_tax_display: nil)
+ @amount_tax_display = amount_tax_display
+ end
+ end
+ # The account tax IDs associated with the invoice.
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+ # 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`.
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ attr_accessor :rendering_options
+
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ )
+ @account_tax_ids = account_tax_ids
+ @custom_fields = custom_fields
+ @description = description
+ @footer = footer
+ @issuer = issuer
+ @metadata = metadata
+ @rendering_options = rendering_options
+ end
+ end
+ # Whether the feature is enabled
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ attr_accessor :invoice_data
+
+ def initialize(enabled: nil, invoice_data: nil)
+ @enabled = enabled
+ @invoice_data = invoice_data
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ attr_accessor :maximum
+ # 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.
+ attr_accessor :minimum
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ attr_accessor :adjustable_quantity
+ # The ID of an existing line item on the payment link.
+ attr_accessor :id
+ # The quantity of the line item being purchased.
+ attr_accessor :quantity
+
+ def initialize(adjustable_quantity: nil, id: nil, quantity: nil)
+ @adjustable_quantity = adjustable_quantity
+ @id = id
+ @quantity = quantity
+ end
+ end
+
+ class PaymentIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # 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.
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ attr_accessor :statement_descriptor
+ # 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.
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ attr_accessor :transfer_group
+
+ def initialize(
+ description: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ )
+ @description = description
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ @statement_descriptor_suffix = statement_descriptor_suffix
+ @transfer_group = transfer_group
+ end
+ end
+
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ attr_accessor :limit
+
+ def initialize(limit: nil)
+ @limit = limit
+ end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ attr_accessor :completed_sessions
+
+ def initialize(completed_sessions: nil)
+ @completed_sessions = completed_sessions
+ end
+ end
+
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ attr_accessor :allowed_countries
+
+ def initialize(allowed_countries: nil)
+ @allowed_countries = allowed_countries
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(issuer: nil)
+ @issuer = issuer
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # 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.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @invoice_settings = invoice_settings
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ attr_accessor :required
+
+ def initialize(enabled: nil, required: nil)
+ @enabled = enabled
+ @required = required
+ end
+ end
+ # 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.
+ attr_accessor :active
+ # Behavior after the purchase is complete.
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ attr_accessor :allow_promotion_codes
+ # Configuration for automatic tax collection.
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ attr_accessor :billing_address_collection
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ attr_accessor :custom_text
+ # 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).
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ attr_accessor :line_items
+ # 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.
+ attr_accessor :metadata
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ attr_accessor :payment_method_collection
+ # 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).
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ attr_accessor :shipping_address_collection
+ # 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`).
+ attr_accessor :submit_type
+ # 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`.
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ attr_accessor :tax_id_collection
+
+ def initialize(
+ active: nil,
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil
+ )
+ @active = active
+ @after_completion = after_completion
+ @allow_promotion_codes = allow_promotion_codes
+ @automatic_tax = automatic_tax
+ @billing_address_collection = billing_address_collection
+ @custom_fields = custom_fields
+ @custom_text = custom_text
+ @customer_creation = customer_creation
+ @expand = expand
+ @inactive_message = inactive_message
+ @invoice_creation = invoice_creation
+ @line_items = line_items
+ @metadata = metadata
+ @payment_intent_data = payment_intent_data
+ @payment_method_collection = payment_method_collection
+ @payment_method_types = payment_method_types
+ @phone_number_collection = phone_number_collection
+ @restrictions = restrictions
+ @shipping_address_collection = shipping_address_collection
+ @submit_type = submit_type
+ @subscription_data = subscription_data
+ @tax_id_collection = tax_id_collection
+ end
+ end
+
# Creates a payment link.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/payment_method_configuration_service.rb b/lib/stripe/services/payment_method_configuration_service.rb
index ca67c4dd..1f31aa6b 100644
--- a/lib/stripe/services/payment_method_configuration_service.rb
+++ b/lib/stripe/services/payment_method_configuration_service.rb
@@ -3,6 +3,2010 @@
module Stripe
class PaymentMethodConfigurationService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The Connect application to filter by.
+ attr_accessor :application
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ application: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @application = application
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ attr_accessor :acss_debit
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ attr_accessor :multibanco
+ # Configuration name.
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ attr_accessor :p24
+ # Configuration's parent configuration. Specify to create a child configuration.
+ attr_accessor :parent
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ parent: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @apple_pay = apple_pay
+ @apple_pay_later = apple_pay_later
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @cartes_bancaires = cartes_bancaires
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @expand = expand
+ @fpx = fpx
+ @giropay = giropay
+ @google_pay = google_pay
+ @grabpay = grabpay
+ @ideal = ideal
+ @jcb = jcb
+ @klarna = klarna
+ @konbini = konbini
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @name = name
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @parent = parent
+ @pay_by_bank = pay_by_bank
+ @paynow = paynow
+ @paypal = paypal
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ attr_accessor :preference
+
+ def initialize(preference: nil)
+ @preference = preference
+ end
+ end
+ # Whether or not the payment method should be displayed.
+ attr_accessor :display_preference
+
+ def initialize(display_preference: nil)
+ @display_preference = display_preference
+ end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ attr_accessor :acss_debit
+ # Whether the configuration can be used for new payments.
+ attr_accessor :active
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ attr_accessor :multibanco
+ # Configuration name.
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ attr_accessor :p24
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ active: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @active = active
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @apple_pay = apple_pay
+ @apple_pay_later = apple_pay_later
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @cartes_bancaires = cartes_bancaires
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @expand = expand
+ @fpx = fpx
+ @giropay = giropay
+ @google_pay = google_pay
+ @grabpay = grabpay
+ @ideal = ideal
+ @jcb = jcb
+ @klarna = klarna
+ @konbini = konbini
+ @link = link
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @name = name
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @paynow = paynow
+ @paypal = paypal
+ @promptpay = promptpay
+ @revolut_pay = revolut_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
# Creates a payment method configuration
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/payment_method_domain_service.rb b/lib/stripe/services/payment_method_domain_service.rb
index 9721dc80..c37b26d6 100644
--- a/lib/stripe/services/payment_method_domain_service.rb
+++ b/lib/stripe/services/payment_method_domain_service.rb
@@ -3,6 +3,82 @@
module Stripe
class PaymentMethodDomainService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ domain_name: nil,
+ enabled: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @domain_name = domain_name
+ @enabled = enabled
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(domain_name: nil, enabled: nil, expand: nil)
+ @domain_name = domain_name
+ @enabled = enabled
+ @expand = expand
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(enabled: nil, expand: nil)
+ @enabled = enabled
+ @expand = expand
+ end
+ end
+
+ class ValidateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a payment method domain.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/payment_method_service.rb b/lib/stripe/services/payment_method_service.rb
index 22980664..5b6a73f9 100644
--- a/lib/stripe/services/payment_method_service.rb
+++ b/lib/stripe/services/payment_method_service.rb
@@ -3,6 +3,814 @@
module Stripe
class PaymentMethodService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose PaymentMethods will be retrieved.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ attr_accessor :type
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ attr_accessor :preferred
+
+ def initialize(preferred: nil)
+ @preferred = preferred
+ end
+ end
+ # The card's CVC. It is highly recommended to always include this value.
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ attr_accessor :number
+ # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
+ attr_accessor :token
+
+ def initialize(
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ networks: nil,
+ number: nil,
+ token: nil
+ )
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @networks = networks
+ @number = number
+ @token = token
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
+ attr_accessor :card
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # The `Customer` to whom the original PaymentMethod is attached.
+ attr_accessor :customer
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # The PaymentMethod to share.
+ attr_accessor :payment_method
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ payment_method: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @card = card
+ @cashapp = cashapp
+ @customer = customer
+ @customer_balance = customer_balance
+ @eps = eps
+ @expand = expand
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @payment_method = payment_method
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ attr_accessor :preferred
+
+ def initialize(preferred: nil)
+ @preferred = preferred
+ end
+ end
+ # Two-digit number representing the card's expiration month.
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ attr_accessor :networks
+
+ def initialize(exp_month: nil, exp_year: nil, networks: nil)
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @networks = networks
+ end
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Bank account holder type.
+ attr_accessor :account_holder_type
+ # Bank account type.
+ attr_accessor :account_type
+
+ def initialize(account_holder_type: nil, account_type: nil)
+ @account_holder_type = account_holder_type
+ @account_type = account_type
+ end
+ end
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `card` PaymentMethod, this hash contains the user's card details.
+ attr_accessor :card
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ allow_redisplay: nil,
+ billing_details: nil,
+ card: nil,
+ expand: nil,
+ link: nil,
+ metadata: nil,
+ pay_by_bank: nil,
+ us_bank_account: nil
+ )
+ @allow_redisplay = allow_redisplay
+ @billing_details = billing_details
+ @card = card
+ @expand = expand
+ @link = link
+ @metadata = metadata
+ @pay_by_bank = pay_by_bank
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class AttachParams < Stripe::RequestParams
+ # The ID of the customer to which to attach the PaymentMethod.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(customer: nil, expand: nil)
+ @customer = customer
+ @expand = expand
+ end
+ end
+
+ class DetachParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Attaches a PaymentMethod object to a Customer.
#
# To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
diff --git a/lib/stripe/services/payout_service.rb b/lib/stripe/services/payout_service.rb
index 28219a53..323bbcb3 100644
--- a/lib/stripe/services/payout_service.rb
+++ b/lib/stripe/services/payout_service.rb
@@ -3,6 +3,165 @@
module Stripe
class PayoutService < StripeService
+ class ListParams < Stripe::RequestParams
+ class ArrivalDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return payouts that are expected to arrive during the given date interval.
+ attr_accessor :arrival_date
+ # Only return payouts that were created during the given date interval.
+ attr_accessor :created
+ # The ID of an external account - only return payouts sent to this external account.
+ attr_accessor :destination
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.
+ attr_accessor :status
+
+ def initialize(
+ arrival_date: nil,
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @arrival_date = arrival_date
+ @created = created
+ @destination = destination
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents representing how much to payout.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency.
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ attr_accessor :method
+ # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
+ attr_accessor :source_type
+ # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ method: nil,
+ source_type: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @destination = destination
+ @expand = expand
+ @metadata = metadata
+ @method = method
+ @source_type = source_type
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
def cancel(payout, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/plan_service.rb b/lib/stripe/services/plan_service.rb
index 7170239c..98b638ee 100644
--- a/lib/stripe/services/plan_service.rb
+++ b/lib/stripe/services/plan_service.rb
@@ -3,6 +3,255 @@
module Stripe
class PlanService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Whether the plan is currently available for new subscriptions.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # A brief description of the plan, hidden from customers.
+ attr_accessor :nickname
+ # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
+ attr_accessor :product
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_accessor :trial_period_days
+
+ def initialize(
+ active: nil,
+ expand: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ trial_period_days: nil
+ )
+ @active = active
+ @expand = expand
+ @metadata = metadata
+ @nickname = nickname
+ @product = product
+ @trial_period_days = trial_period_days
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return plans for the given product.
+ attr_accessor :product
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ product: nil,
+ starting_after: nil
+ )
+ @active = active
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @product = product
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_accessor :unit_label
+
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ )
+ @active = active
+ @id = id
+ @metadata = metadata
+ @name = name
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @unit_label = unit_label
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+
+ class TransformUsage < Stripe::RequestParams
+ # Divide usage by this number.
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ attr_accessor :round
+
+ def initialize(divide_by: nil, round: nil)
+ @divide_by = divide_by
+ @round = round
+ end
+ end
+ # Whether the plan is currently available for new subscriptions. Defaults to `true`.
+ attr_accessor :active
+ # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
+ attr_accessor :amount
+ # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.
+ attr_accessor :amount_decimal
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ attr_accessor :billing_scheme
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
+ attr_accessor :id
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+ # 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`.
+ attr_accessor :metadata
+ # The meter tracking the usage of a metered price
+ attr_accessor :meter
+ # A brief description of the plan, hidden from customers.
+ attr_accessor :nickname
+ # Attribute for param field product
+ attr_accessor :product
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ attr_accessor :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ attr_accessor :transform_usage
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ attr_accessor :usage_type
+
+ def initialize(
+ active: nil,
+ amount: nil,
+ amount_decimal: nil,
+ billing_scheme: nil,
+ currency: nil,
+ expand: nil,
+ id: nil,
+ interval: nil,
+ interval_count: nil,
+ metadata: nil,
+ meter: nil,
+ nickname: nil,
+ product: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transform_usage: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ )
+ @active = active
+ @amount = amount
+ @amount_decimal = amount_decimal
+ @billing_scheme = billing_scheme
+ @currency = currency
+ @expand = expand
+ @id = id
+ @interval = interval
+ @interval_count = interval_count
+ @metadata = metadata
+ @meter = meter
+ @nickname = nickname
+ @product = product
+ @tiers = tiers
+ @tiers_mode = tiers_mode
+ @transform_usage = transform_usage
+ @trial_period_days = trial_period_days
+ @usage_type = usage_type
+ end
+ end
+
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/plans", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/price_service.rb b/lib/stripe/services/price_service.rb
index b6d48806..4d45cfd5 100644
--- a/lib/stripe/services/price_service.rb
+++ b/lib/stripe/services/price_service.rb
@@ -3,6 +3,499 @@
module Stripe
class PriceService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Filter by billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # Filter by the price's meter.
+ attr_accessor :meter
+ # Filter by the usage type for this price. Can be either `metered` or `licensed`.
+ attr_accessor :usage_type
+
+ def initialize(interval: nil, meter: nil, usage_type: nil)
+ @interval = interval
+ @meter = meter
+ @usage_type = usage_type
+ end
+ end
+ # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return prices for the given currency.
+ attr_accessor :currency
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
+ attr_accessor :lookup_keys
+ # Only return prices for the given product.
+ attr_accessor :product
+ # Only return prices with these recurring fields.
+ attr_accessor :recurring
+ # 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.
+ attr_accessor :starting_after
+ # Only return prices of type `recurring` or `one_time`.
+ attr_accessor :type
+
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ product: nil,
+ recurring: nil,
+ starting_after: nil,
+ type: nil
+ )
+ @active = active
+ @created = created
+ @currency = currency
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @lookup_keys = lookup_keys
+ @product = product
+ @recurring = recurring
+ @starting_after = starting_after
+ @type = type
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @custom_unit_amount = custom_unit_amount
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class ProductData < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_accessor :unit_label
+
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ )
+ @active = active
+ @id = id
+ @metadata = metadata
+ @name = name
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @unit_label = unit_label
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+ # The meter tracking the usage of a metered price
+ attr_accessor :meter
+ # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ attr_accessor :usage_type
+
+ def initialize(
+ interval: nil,
+ interval_count: nil,
+ meter: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ )
+ @interval = interval
+ @interval_count = interval_count
+ @meter = meter
+ @trial_period_days = trial_period_days
+ @usage_type = usage_type
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+
+ class TransformQuantity < Stripe::RequestParams
+ # Divide usage by this number.
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ attr_accessor :round
+
+ def initialize(divide_by: nil, round: nil)
+ @divide_by = divide_by
+ @round = round
+ end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ attr_accessor :active
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ attr_accessor :billing_scheme
+ # 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).
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ attr_accessor :nickname
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # These fields can be used to create a new product that this price will belong to.
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `usage_type`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ attr_accessor :tiers_mode
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ attr_accessor :transfer_lookup_key
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ attr_accessor :transform_quantity
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ active: nil,
+ billing_scheme: nil,
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transfer_lookup_key: nil,
+ transform_quantity: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @active = active
+ @billing_scheme = billing_scheme
+ @currency = currency
+ @currency_options = currency_options
+ @custom_unit_amount = custom_unit_amount
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @nickname = nickname
+ @product = product
+ @product_data = product_data
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @tiers_mode = tiers_mode
+ @transfer_lookup_key = transfer_lookup_key
+ @transform_quantity = transform_quantity
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @custom_unit_amount = custom_unit_amount
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ attr_accessor :active
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ attr_accessor :lookup_key
+ # 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`.
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ attr_accessor :nickname
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ attr_accessor :transfer_lookup_key
+
+ def initialize(
+ active: nil,
+ currency_options: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ tax_behavior: nil,
+ transfer_lookup_key: nil
+ )
+ @active = active
+ @currency_options = currency_options
+ @expand = expand
+ @lookup_key = lookup_key
+ @metadata = metadata
+ @nickname = nickname
+ @tax_behavior = tax_behavior
+ @transfer_lookup_key = transfer_lookup_key
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
# Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/prices", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/product_feature_service.rb b/lib/stripe/services/product_feature_service.rb
index 1215a3ff..b12e91f5 100644
--- a/lib/stripe/services/product_feature_service.rb
+++ b/lib/stripe/services/product_feature_service.rb
@@ -3,6 +3,48 @@
module Stripe
class ProductFeatureService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.
+ attr_accessor :entitlement_feature
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(entitlement_feature: nil, expand: nil)
+ @entitlement_feature = entitlement_feature
+ @expand = expand
+ end
+ end
+
# Creates a product_feature, which represents a feature attachment to a product
def create(product, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/product_service.rb b/lib/stripe/services/product_service.rb
index 04b7b96e..761323b9 100644
--- a/lib/stripe/services/product_service.rb
+++ b/lib/stripe/services/product_service.rb
@@ -10,6 +10,431 @@ module Stripe
@features = Stripe::ProductFeatureService.new(@requestor)
end
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ attr_accessor :name
+
+ def initialize(name: nil)
+ @name = name
+ end
+ end
+
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :width
+
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
+ @height = height
+ @length = length
+ @weight = weight
+ @width = width
+ end
+ end
+ # Whether the product is available for purchase.
+ attr_accessor :active
+ # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ attr_accessor :default_price
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ attr_accessor :marketing_features
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ attr_accessor :url
+
+ def initialize(
+ active: nil,
+ default_price: nil,
+ description: nil,
+ expand: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil,
+ url: nil
+ )
+ @active = active
+ @default_price = default_price
+ @description = description
+ @expand = expand
+ @images = images
+ @marketing_features = marketing_features
+ @metadata = metadata
+ @name = name
+ @package_dimensions = package_dimensions
+ @shippable = shippable
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @unit_label = unit_label
+ @url = url
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return products that are active or inactive (e.g., pass `false` to list all inactive products).
+ attr_accessor :active
+ # Only return products that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).
+ attr_accessor :ids
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return products that can be shipped (i.e., physical, not digital products).
+ attr_accessor :shippable
+ # 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.
+ attr_accessor :starting_after
+ # Only return products of this type.
+ attr_accessor :type
+ # Only return products with the given url.
+ attr_accessor :url
+
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ ids: nil,
+ limit: nil,
+ shippable: nil,
+ starting_after: nil,
+ type: nil,
+ url: nil
+ )
+ @active = active
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @ids = ids
+ @limit = limit
+ @shippable = shippable
+ @starting_after = starting_after
+ @type = type
+ @url = url
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DefaultPriceData < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ attr_accessor :up_to
+
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ )
+ @flat_amount = flat_amount
+ @flat_amount_decimal = flat_amount_decimal
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ @up_to = up_to
+ end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @custom_unit_amount = custom_unit_amount
+ @tax_behavior = tax_behavior
+ @tiers = tiers
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ attr_accessor :preset
+
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
+ @enabled = enabled
+ @maximum = maximum
+ @minimum = minimum
+ @preset = preset
+ end
+ end
+
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ attr_accessor :custom_unit_amount
+ # 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`.
+ attr_accessor :metadata
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ metadata: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @currency_options = currency_options
+ @custom_unit_amount = custom_unit_amount
+ @metadata = metadata
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ attr_accessor :name
+
+ def initialize(name: nil)
+ @name = name
+ end
+ end
+
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ attr_accessor :width
+
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
+ @height = height
+ @length = length
+ @weight = weight
+ @width = width
+ end
+ end
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ attr_accessor :active
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
+ attr_accessor :default_price_data
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
+ attr_accessor :id
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ attr_accessor :marketing_features
+ # 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`.
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. Only used for subscription payments.
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+ # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
+ attr_accessor :type
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ attr_accessor :url
+
+ def initialize(
+ active: nil,
+ default_price_data: nil,
+ description: nil,
+ expand: nil,
+ id: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ type: nil,
+ unit_label: nil,
+ url: nil
+ )
+ @active = active
+ @default_price_data = default_price_data
+ @description = description
+ @expand = expand
+ @id = id
+ @images = images
+ @marketing_features = marketing_features
+ @metadata = metadata
+ @name = name
+ @package_dimensions = package_dimensions
+ @shippable = shippable
+ @statement_descriptor = statement_descriptor
+ @tax_code = tax_code
+ @type = type
+ @unit_label = unit_label
+ @url = url
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
# Creates a new product object.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/products", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/promotion_code_service.rb b/lib/stripe/services/promotion_code_service.rb
index 2054ecaf..65d18a34 100644
--- a/lib/stripe/services/promotion_code_service.rb
+++ b/lib/stripe/services/promotion_code_service.rb
@@ -3,6 +3,184 @@
module Stripe
class PromotionCodeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Filter promotion codes by whether they are active.
+ attr_accessor :active
+ # Only return promotion codes that have this case-insensitive code.
+ attr_accessor :code
+ # Only return promotion codes for this coupon.
+ attr_accessor :coupon
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return promotion codes that are restricted to this customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @code = code
+ @coupon = coupon
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_accessor :minimum_amount
+
+ def initialize(minimum_amount: nil)
+ @minimum_amount = minimum_amount
+ end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+ # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ attr_accessor :first_time_transaction
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_accessor :minimum_amount
+ # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ attr_accessor :minimum_amount_currency
+
+ def initialize(
+ currency_options: nil,
+ first_time_transaction: nil,
+ minimum_amount: nil,
+ minimum_amount_currency: nil
+ )
+ @currency_options = currency_options
+ @first_time_transaction = first_time_transaction
+ @minimum_amount = minimum_amount
+ @minimum_amount_currency = minimum_amount_currency
+ end
+ end
+ # Whether the promotion code is currently active.
+ attr_accessor :active
+ # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ #
+ # If left blank, we will generate one automatically.
+ attr_accessor :code
+ # The coupon for this promotion code.
+ attr_accessor :coupon
+ # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
+ attr_accessor :expires_at
+ # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.
+ attr_accessor :max_redemptions
+ # 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`.
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ attr_accessor :restrictions
+
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ customer: nil,
+ expand: nil,
+ expires_at: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ restrictions: nil
+ )
+ @active = active
+ @code = code
+ @coupon = coupon
+ @customer = customer
+ @expand = expand
+ @expires_at = expires_at
+ @max_redemptions = max_redemptions
+ @metadata = metadata
+ @restrictions = restrictions
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ attr_accessor :minimum_amount
+
+ def initialize(minimum_amount: nil)
+ @minimum_amount = minimum_amount
+ end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(currency_options: nil)
+ @currency_options = currency_options
+ end
+ end
+ # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ attr_accessor :restrictions
+
+ def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil)
+ @active = active
+ @expand = expand
+ @metadata = metadata
+ @restrictions = restrictions
+ end
+ end
+
# A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/quote_computed_upfront_line_items_service.rb b/lib/stripe/services/quote_computed_upfront_line_items_service.rb
index b32ef79c..9e6e4d4c 100644
--- a/lib/stripe/services/quote_computed_upfront_line_items_service.rb
+++ b/lib/stripe/services/quote_computed_upfront_line_items_service.rb
@@ -3,6 +3,24 @@
module Stripe
class QuoteComputedUpfrontLineItemsService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
def list(quote, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/quote_line_item_service.rb b/lib/stripe/services/quote_line_item_service.rb
index 0d97a1e0..b74a3dd0 100644
--- a/lib/stripe/services/quote_line_item_service.rb
+++ b/lib/stripe/services/quote_line_item_service.rb
@@ -3,6 +3,24 @@
module Stripe
class QuoteLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# When retrieving a quote, 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.
def list(quote, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/quote_service.rb b/lib/stripe/services/quote_service.rb
index b127edfb..0abefd80 100644
--- a/lib/stripe/services/quote_service.rb
+++ b/lib/stripe/services/quote_service.rb
@@ -11,6 +11,617 @@ module Stripe
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose quotes will be retrieved.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The status of the quote.
+ attr_accessor :status
+ # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
+ attr_accessor :test_clock
+
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ )
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ @test_clock = test_clock
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class FromQuote < Stripe::RequestParams
+ # Whether this quote is a revision of the previous quote.
+ attr_accessor :is_revision
+ # The `id` of the quote that will be cloned.
+ attr_accessor :quote
+
+ def initialize(is_revision: nil, quote: nil)
+ @is_revision = is_revision
+ @quote = quote
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(days_until_due: nil, issuer: nil)
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The discounts applied to this line item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # The quantity of the line item.
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ attr_accessor :trial_period_days
+
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
+ @description = description
+ @effective_date = effective_date
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, amount_percent: nil, destination: nil)
+ @amount = amount
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :application_fee_amount
+ # 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.
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :description
+ # The discounts applied to the quote.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :footer
+ # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
+ attr_accessor :from_quote
+ # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ attr_accessor :line_items
+ # 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`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ attr_accessor :subscription_data
+ # ID of the test clock to attach to the quote.
+ attr_accessor :test_clock
+ # The data with which to automatically create a Transfer for each of the invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ from_quote: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ test_clock: nil,
+ transfer_data: nil
+ )
+ @application_fee_amount = application_fee_amount
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @collection_method = collection_method
+ @customer = customer
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @expires_at = expires_at
+ @footer = footer
+ @from_quote = from_quote
+ @header = header
+ @invoice_settings = invoice_settings
+ @line_items = line_items
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @subscription_data = subscription_data
+ @test_clock = test_clock
+ @transfer_data = transfer_data
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(days_until_due: nil, issuer: nil)
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The discounts applied to this line item.
+ attr_accessor :discounts
+ # The ID of an existing line item on the quote.
+ attr_accessor :id
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # The quantity of the line item.
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ id: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @id = id
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ attr_accessor :trial_period_days
+
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
+ @description = description
+ @effective_date = effective_date
+ @metadata = metadata
+ @trial_period_days = trial_period_days
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount: nil, amount_percent: nil, destination: nil)
+ @amount = amount
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ attr_accessor :application_fee_amount
+ # 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.
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF.
+ attr_accessor :description
+ # The discounts applied to the quote.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF.
+ attr_accessor :footer
+ # A header that will be displayed on the quote PDF.
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ attr_accessor :line_items
+ # 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`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ attr_accessor :subscription_data
+ # The data with which to automatically create a Transfer for each of the invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ transfer_data: nil
+ )
+ @application_fee_amount = application_fee_amount
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @collection_method = collection_method
+ @customer = customer
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @expires_at = expires_at
+ @footer = footer
+ @header = header
+ @invoice_settings = invoice_settings
+ @line_items = line_items
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @subscription_data = subscription_data
+ @transfer_data = transfer_data
+ end
+ end
+
+ class AcceptParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FinalizeQuoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+
+ def initialize(expand: nil, expires_at: nil)
+ @expand = expand
+ @expires_at = expires_at
+ end
+ end
+
+ class PdfParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Accepts the specified quote.
def accept(quote, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/radar/early_fraud_warning_service.rb b/lib/stripe/services/radar/early_fraud_warning_service.rb
index 12742f2c..3d957004 100644
--- a/lib/stripe/services/radar/early_fraud_warning_service.rb
+++ b/lib/stripe/services/radar/early_fraud_warning_service.rb
@@ -4,6 +4,67 @@
module Stripe
module Radar
class EarlyFraudWarningService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return early fraud warnings for the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return early fraud warnings that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of early fraud warnings.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/radar/value_list_item_service.rb b/lib/stripe/services/radar/value_list_item_service.rb
index 62b260bd..cfd9a7eb 100644
--- a/lib/stripe/services/radar/value_list_item_service.rb
+++ b/lib/stripe/services/radar/value_list_item_service.rb
@@ -4,6 +4,85 @@
module Stripe
module Radar
class ValueListItemService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return items that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Return items belonging to the parent list whose value matches the specified value (using an "is like" match).
+ attr_accessor :value
+ # Identifier for the parent value list this item belongs to.
+ attr_accessor :value_list
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ value: nil,
+ value_list: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @value = value
+ @value_list = value_list
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The value of the item (whose type must match the type of the parent value list).
+ attr_accessor :value
+ # The identifier of the value list which the created item will be added to.
+ attr_accessor :value_list
+
+ def initialize(expand: nil, value: nil, value_list: nil)
+ @expand = expand
+ @value = value
+ @value_list = value_list
+ end
+ end
+
# Creates a new ValueListItem object, which is added to the specified parent value list.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/radar/value_list_service.rb b/lib/stripe/services/radar/value_list_service.rb
index a910c91a..5bb114d6 100644
--- a/lib/stripe/services/radar/value_list_service.rb
+++ b/lib/stripe/services/radar/value_list_service.rb
@@ -4,6 +4,109 @@
module Stripe
module Radar
class ValueListService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ attr_accessor :name
+
+ def initialize(alias_: nil, expand: nil, metadata: nil, name: nil)
+ @alias = alias_
+ @expand = expand
+ @metadata = metadata
+ @name = name
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # The alias used to reference the value list when writing rules.
+ attr_accessor :alias
+ # A value contained within a value list - returns all value lists containing this value.
+ attr_accessor :contains
+ # Only return value lists that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ alias_: nil,
+ contains: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @alias = alias_
+ @contains = contains
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
+ attr_accessor :item_type
+ # 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`.
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ attr_accessor :name
+
+ def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil)
+ @alias = alias_
+ @expand = expand
+ @item_type = item_type
+ @metadata = metadata
+ @name = name
+ end
+ end
+
# Creates a new ValueList object, which can then be referenced in rules.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/refund_service.rb b/lib/stripe/services/refund_service.rb
index 9c37ee53..e5363b62 100644
--- a/lib/stripe/services/refund_service.rb
+++ b/lib/stripe/services/refund_service.rb
@@ -3,6 +3,143 @@
module Stripe
class RefundService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return refunds for the charge specified by this charge ID.
+ attr_accessor :charge
+ # Only return refunds that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return refunds for the PaymentIntent specified by this ID.
+ attr_accessor :payment_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ )
+ @charge = charge
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_intent = payment_intent
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field amount
+ attr_accessor :amount
+ # The identifier of the charge to refund.
+ attr_accessor :charge
+ # 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).
+ attr_accessor :currency
+ # Customer whose customer balance to refund from.
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
+ attr_accessor :instructions_email
+ # 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`.
+ attr_accessor :metadata
+ # Origin of the refund
+ attr_accessor :origin
+ # The identifier of the PaymentIntent to refund.
+ attr_accessor :payment_intent
+ # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.
+ attr_accessor :reason
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ attr_accessor :refund_application_fee
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
+ attr_accessor :reverse_transfer
+
+ def initialize(
+ amount: nil,
+ charge: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ instructions_email: nil,
+ metadata: nil,
+ origin: nil,
+ payment_intent: nil,
+ reason: nil,
+ refund_application_fee: nil,
+ reverse_transfer: nil
+ )
+ @amount = amount
+ @charge = charge
+ @currency = currency
+ @customer = customer
+ @expand = expand
+ @instructions_email = instructions_email
+ @metadata = metadata
+ @origin = origin
+ @payment_intent = payment_intent
+ @reason = reason
+ @refund_application_fee = refund_application_fee
+ @reverse_transfer = reverse_transfer
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Cancels a refund with a status of requires_action.
#
# You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
diff --git a/lib/stripe/services/reporting/report_run_service.rb b/lib/stripe/services/reporting/report_run_service.rb
index 0ac406a2..ba7f5a1a 100644
--- a/lib/stripe/services/reporting/report_run_service.rb
+++ b/lib/stripe/services/reporting/report_run_service.rb
@@ -4,6 +4,112 @@
module Stripe
module Reporting
class ReportRunService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return Report Runs that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Parameters < Stripe::RequestParams
+ # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set.
+ attr_accessor :columns
+ # Connected account ID to filter for in the report run.
+ attr_accessor :connected_account
+ # Currency of objects to be included in the report run.
+ attr_accessor :currency
+ # Ending timestamp of data to be included in the report run (exclusive).
+ attr_accessor :interval_end
+ # Starting timestamp of data to be included in the report run.
+ attr_accessor :interval_start
+ # Payout ID by which to filter the report run.
+ attr_accessor :payout
+ # Category of balance transactions to be included in the report run.
+ attr_accessor :reporting_category
+ # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ attr_accessor :timezone
+
+ def initialize(
+ columns: nil,
+ connected_account: nil,
+ currency: nil,
+ interval_end: nil,
+ interval_start: nil,
+ payout: nil,
+ reporting_category: nil,
+ timezone: nil
+ )
+ @columns = columns
+ @connected_account = connected_account
+ @currency = currency
+ @interval_end = interval_end
+ @interval_start = interval_start
+ @payout = payout
+ @reporting_category = reporting_category
+ @timezone = timezone
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
+ attr_accessor :parameters
+ # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.
+ attr_accessor :report_type
+
+ def initialize(expand: nil, parameters: nil, report_type: nil)
+ @expand = expand
+ @parameters = parameters
+ @report_type = report_type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/reporting/report_type_service.rb b/lib/stripe/services/reporting/report_type_service.rb
index ab5c6ba0..0db08c4a 100644
--- a/lib/stripe/services/reporting/report_type_service.rb
+++ b/lib/stripe/services/reporting/report_type_service.rb
@@ -4,6 +4,24 @@
module Stripe
module Reporting
class ReportTypeService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a full list of Report Types.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/review_service.rb b/lib/stripe/services/review_service.rb
index 00a6adaf..39051b5d 100644
--- a/lib/stripe/services/review_service.rb
+++ b/lib/stripe/services/review_service.rb
@@ -3,6 +3,62 @@
module Stripe
class ReviewService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return reviews that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ApproveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Approves a Review object, closing it and removing it from the list of reviews.
def approve(review, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/setup_attempt_service.rb b/lib/stripe/services/setup_attempt_service.rb
index 30d99d8d..a2f5b23c 100644
--- a/lib/stripe/services/setup_attempt_service.rb
+++ b/lib/stripe/services/setup_attempt_service.rb
@@ -3,6 +3,57 @@
module Stripe
class SetupAttemptService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A filter on the list, based on the object `created` field. The value
+ # can be a string with an integer Unix timestamp or a
+ # dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return SetupAttempts created by the SetupIntent specified by
+ # this ID.
+ attr_accessor :setup_intent
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ setup_intent: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @setup_intent = setup_intent
+ @starting_after = starting_after
+ end
+ end
+
# Returns a list of SetupAttempts that associate with a provided SetupIntent.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/setup_intent_service.rb b/lib/stripe/services/setup_intent_service.rb
index 97464f71..d7856d6d 100644
--- a/lib/stripe/services/setup_intent_service.rb
+++ b/lib/stripe/services/setup_intent_service.rb
@@ -3,6 +3,3169 @@
module Stripe
class SetupIntentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_accessor :attach_to_self
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return SetupIntents for the customer specified by this customer ID.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return SetupIntents that associate with the specified payment method.
+ attr_accessor :payment_method
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ attach_to_self: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_method: nil,
+ starting_after: nil
+ )
+ @attach_to_self = attach_to_self
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @payment_method = payment_method
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ attr_accessor :enabled
+
+ def initialize(allow_redirects: nil, enabled: nil)
+ @allow_redirects = allow_redirects
+ @enabled = enabled
+ end
+ end
+
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
+ @currency = currency
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @currency = currency
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ )
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+
+ def initialize(persistent_token: nil)
+ @persistent_token = persistent_token
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_accessor :billing_agreement_id
+
+ def initialize(billing_agreement_id: nil)
+ @billing_agreement_id = billing_agreement_id
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @verification_method = verification_method
+ end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @amazon_pay = amazon_pay
+ @bacs_debit = bacs_debit
+ @card = card
+ @card_present = card_present
+ @link = link
+ @paypal = paypal
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class SingleUse < Stripe::RequestParams
+ # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+
+ def initialize(amount: nil, currency: nil)
+ @amount = amount
+ @currency = currency
+ end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_accessor :attach_to_self
+ # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
+ attr_accessor :automatic_payment_methods
+ # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
+ attr_accessor :confirm
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ attr_accessor :flow_directions
+ # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ attr_accessor :mandate_data
+ # 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`.
+ attr_accessor :metadata
+ # The Stripe account ID created for this SetupIntent.
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ attr_accessor :return_url
+ # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
+ #
+ # Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
+ attr_accessor :single_use
+ # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
+ attr_accessor :usage
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ attach_to_self: nil,
+ automatic_payment_methods: nil,
+ confirm: nil,
+ confirmation_token: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ mandate_data: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ return_url: nil,
+ single_use: nil,
+ usage: nil,
+ use_stripe_sdk: nil
+ )
+ @attach_to_self = attach_to_self
+ @automatic_payment_methods = automatic_payment_methods
+ @confirm = confirm
+ @confirmation_token = confirmation_token
+ @customer = customer
+ @description = description
+ @expand = expand
+ @flow_directions = flow_directions
+ @mandate_data = mandate_data
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @return_url = return_url
+ @single_use = single_use
+ @usage = usage
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent.
+ attr_accessor :client_secret
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(client_secret: nil, expand: nil)
+ @client_secret = client_secret
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
+ @currency = currency
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @currency = currency
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ )
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+
+ def initialize(persistent_token: nil)
+ @persistent_token = persistent_token
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_accessor :billing_agreement_id
+
+ def initialize(billing_agreement_id: nil)
+ @billing_agreement_id = billing_agreement_id
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @verification_method = verification_method
+ end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @amazon_pay = amazon_pay
+ @bacs_debit = bacs_debit
+ @card = card
+ @card_present = card_present
+ @link = link
+ @paypal = paypal
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ attr_accessor :attach_to_self
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ attr_accessor :flow_directions
+ # 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`.
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ attr_accessor :payment_method_types
+
+ def initialize(
+ attach_to_self: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ )
+ @attach_to_self = attach_to_self
+ @customer = customer
+ @description = description
+ @expand = expand
+ @flow_directions = flow_directions
+ @metadata = metadata
+ @payment_method = payment_method
+ @payment_method_configuration = payment_method_configuration
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate`
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(cancellation_reason: nil, expand: nil)
+ @cancellation_reason = cancellation_reason
+ @expand = expand
+ end
+ end
+
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ end
+
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ attr_accessor :user_agent
+
+ def initialize(ip_address: nil, user_agent: nil)
+ @ip_address = ip_address
+ @user_agent = user_agent
+ end
+ end
+ # The time at which the customer accepted the Mandate.
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ attr_accessor :type
+
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
+ @accepted_at = accepted_at
+ @offline = offline
+ @online = online
+ @type = type
+ end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ attr_accessor :customer_acceptance
+
+ def initialize(customer_acceptance: nil)
+ @customer_acceptance = customer_acceptance
+ end
+ end
+
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ )
+ @custom_mandate_url = custom_mandate_url
+ @default_for = default_for
+ @interval_description = interval_description
+ @payment_schedule = payment_schedule
+ @transaction_type = transaction_type
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
+ @currency = currency
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ attr_accessor :supported_types
+
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ )
+ @amount = amount
+ @amount_type = amount_type
+ @currency = currency
+ @description = description
+ @end_date = end_date
+ @interval = interval
+ @interval_count = interval_count
+ @reference = reference
+ @start_date = start_date
+ @supported_types = supported_types
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ attr_accessor :cb_score
+
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
+ @cb_avalgo = cb_avalgo
+ @cb_exemption = cb_exemption
+ @cb_score = cb_score
+ end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ attr_accessor :cartes_bancaires
+
+ def initialize(cartes_bancaires: nil)
+ @cartes_bancaires = cartes_bancaires
+ end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ attr_accessor :version
+
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ )
+ @ares_trans_status = ares_trans_status
+ @cryptogram = cryptogram
+ @electronic_commerce_indicator = electronic_commerce_indicator
+ @network_options = network_options
+ @requestor_challenge_indicator = requestor_challenge_indicator
+ @transaction_id = transaction_id
+ @version = version
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ )
+ @mandate_options = mandate_options
+ @moto = moto
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ @three_d_secure = three_d_secure
+ end
+ end
+
+ class CardPresent < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ attr_accessor :persistent_token
+
+ def initialize(persistent_token: nil)
+ @persistent_token = persistent_token
+ end
+ end
+
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ attr_accessor :billing_agreement_id
+
+ def initialize(billing_agreement_id: nil)
+ @billing_agreement_id = billing_agreement_id
+ end
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ attr_accessor :reference_prefix
+
+ def initialize(reference_prefix: nil)
+ @reference_prefix = reference_prefix
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+
+ def initialize(mandate_options: nil)
+ @mandate_options = mandate_options
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ attr_accessor :return_url
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ @return_url = return_url
+ end
+ end
+
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ attr_accessor :collection_method
+
+ def initialize(collection_method: nil)
+ @collection_method = collection_method
+ end
+ end
+
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ attr_accessor :networks
+ # Bank account verification method.
+ attr_accessor :verification_method
+
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ )
+ @financial_connections = financial_connections
+ @mandate_options = mandate_options
+ @networks = networks
+ @verification_method = verification_method
+ end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @amazon_pay = amazon_pay
+ @bacs_debit = bacs_debit
+ @card = card
+ @card_present = card_present
+ @link = link
+ @paypal = paypal
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ attr_accessor :confirmation_token
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Attribute for param field mandate_data
+ attr_accessor :mandate_data
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ attr_accessor :payment_method
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ attr_accessor :payment_method_options
+ # The URL to redirect your customer back to after they authenticate 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ attr_accessor :return_url
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ attr_accessor :use_stripe_sdk
+
+ def initialize(
+ confirmation_token: nil,
+ expand: nil,
+ mandate_data: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ return_url: nil,
+ use_stripe_sdk: nil
+ )
+ @confirmation_token = confirmation_token
+ @expand = expand
+ @mandate_data = mandate_data
+ @payment_method = payment_method
+ @payment_method_data = payment_method_data
+ @payment_method_options = payment_method_options
+ @return_url = return_url
+ @use_stripe_sdk = use_stripe_sdk
+ end
+ end
+
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil)
+ @amounts = amounts
+ @descriptor_code = descriptor_code
+ @expand = expand
+ end
+ end
+
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
#
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
diff --git a/lib/stripe/services/shipping_rate_service.rb b/lib/stripe/services/shipping_rate_service.rb
index 5fce1b46..74cc44be 100644
--- a/lib/stripe/services/shipping_rate_service.rb
+++ b/lib/stripe/services/shipping_rate_service.rb
@@ -3,6 +3,206 @@
module Stripe
class ShippingRateService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return shipping rates that are active or inactive.
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # Only return shipping rates for the given currency.
+ attr_accessor :currency
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @created = created
+ @currency = currency
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ attr_accessor :unit
+ # Must be greater than 0.
+ attr_accessor :value
+
+ def initialize(unit: nil, value: nil)
+ @unit = unit
+ @value = value
+ end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ attr_accessor :minimum
+
+ def initialize(maximum: nil, minimum: nil)
+ @maximum = maximum
+ @minimum = minimum
+ end
+ end
+
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(amount: nil, currency: nil, currency_options: nil)
+ @amount = amount
+ @currency = currency
+ @currency_options = currency_options
+ end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ attr_accessor :type
+
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ expand: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ )
+ @delivery_estimate = delivery_estimate
+ @display_name = display_name
+ @expand = expand
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ @type = type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(amount: nil, tax_behavior: nil)
+ @amount = amount
+ @tax_behavior = tax_behavior
+ end
+ end
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ attr_accessor :currency_options
+
+ def initialize(currency_options: nil)
+ @currency_options = currency_options
+ end
+ end
+ # Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ attr_accessor :fixed_amount
+ # 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`.
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ attr_accessor :tax_behavior
+
+ def initialize(active: nil, expand: nil, fixed_amount: nil, metadata: nil, tax_behavior: nil)
+ @active = active
+ @expand = expand
+ @fixed_amount = fixed_amount
+ @metadata = metadata
+ @tax_behavior = tax_behavior
+ end
+ end
+
# Creates a new shipping rate object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/sigma/scheduled_query_run_service.rb b/lib/stripe/services/sigma/scheduled_query_run_service.rb
index 4ed5e9fb..6011b2f2 100644
--- a/lib/stripe/services/sigma/scheduled_query_run_service.rb
+++ b/lib/stripe/services/sigma/scheduled_query_run_service.rb
@@ -4,6 +4,33 @@
module Stripe
module Sigma
class ScheduledQueryRunService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of scheduled query runs.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/source_service.rb b/lib/stripe/services/source_service.rb
index 569a0c0e..37635981 100644
--- a/lib/stripe/services/source_service.rb
+++ b/lib/stripe/services/source_service.rb
@@ -10,6 +10,607 @@ module Stripe
@transactions = Stripe::SourceTransactionService.new(@requestor)
end
+ class DetachParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # The client secret of the source. Required if a publishable key is used to retrieve the source.
+ attr_accessor :client_secret
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(client_secret: nil, expand: nil)
+ @client_secret = client_secret
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ attr_accessor :contact_email
+
+ def initialize(contact_email: nil)
+ @contact_email = contact_email
+ end
+ end
+
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ )
+ @date = date
+ @ip = ip
+ @offline = offline
+ @online = online
+ @status = status
+ @type = type
+ @user_agent = user_agent
+ end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ attr_accessor :notification_method
+
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ )
+ @acceptance = acceptance
+ @amount = amount
+ @currency = currency
+ @interval = interval
+ @notification_method = notification_method
+ end
+ end
+
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Owner's address.
+ attr_accessor :address
+ # Owner's email address.
+ attr_accessor :email
+ # Owner's full name.
+ attr_accessor :name
+ # Owner's phone number.
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ attr_accessor :amount
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field description
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ attr_accessor :quantity
+ # Attribute for param field type
+ attr_accessor :type
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @parent = parent
+ @quantity = quantity
+ @type = type
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # List of items constituting the order.
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ attr_accessor :shipping
+
+ def initialize(items: nil, shipping: nil)
+ @items = items
+ @shipping = shipping
+ end
+ end
+ # Amount associated with the source.
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ attr_accessor :mandate
+ # 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`.
+ attr_accessor :metadata
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ attr_accessor :owner
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ attr_accessor :source_order
+
+ def initialize(
+ amount: nil,
+ expand: nil,
+ mandate: nil,
+ metadata: nil,
+ owner: nil,
+ source_order: nil
+ )
+ @amount = amount
+ @expand = expand
+ @mandate = mandate
+ @metadata = metadata
+ @owner = owner
+ @source_order = source_order
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ attr_accessor :contact_email
+
+ def initialize(contact_email: nil)
+ @contact_email = contact_email
+ end
+ end
+
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ attr_accessor :user_agent
+
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ )
+ @date = date
+ @ip = ip
+ @offline = offline
+ @online = online
+ @status = status
+ @type = type
+ @user_agent = user_agent
+ end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ attr_accessor :notification_method
+
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ )
+ @acceptance = acceptance
+ @amount = amount
+ @currency = currency
+ @interval = interval
+ @notification_method = notification_method
+ end
+ end
+
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Owner's address.
+ attr_accessor :address
+ # Owner's email address.
+ attr_accessor :email
+ # Owner's full name.
+ attr_accessor :name
+ # Owner's phone number.
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Receiver < Stripe::RequestParams
+ # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
+ attr_accessor :refund_attributes_method
+
+ def initialize(refund_attributes_method: nil)
+ @refund_attributes_method = refund_attributes_method
+ end
+ end
+
+ class Redirect < Stripe::RequestParams
+ # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
+ attr_accessor :return_url
+
+ def initialize(return_url: nil)
+ @return_url = return_url
+ end
+ end
+
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ attr_accessor :amount
+ # Attribute for param field currency
+ attr_accessor :currency
+ # Attribute for param field description
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ attr_accessor :quantity
+ # Attribute for param field type
+ attr_accessor :type
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @parent = parent
+ @quantity = quantity
+ @type = type
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address.
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ attr_accessor :carrier
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension).
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ attr_accessor :tracking_number
+
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
+ @address = address
+ @carrier = carrier
+ @name = name
+ @phone = phone
+ @tracking_number = tracking_number
+ end
+ end
+ # List of items constituting the order.
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ attr_accessor :shipping
+
+ def initialize(items: nil, shipping: nil)
+ @items = items
+ @shipping = shipping
+ end
+ end
+ # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
+ attr_accessor :amount
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
+ attr_accessor :currency
+ # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
+ attr_accessor :flow
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ attr_accessor :mandate
+ # Attribute for param field metadata
+ attr_accessor :metadata
+ # The source to share.
+ attr_accessor :original_source
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ attr_accessor :owner
+ # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
+ attr_accessor :receiver
+ # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
+ attr_accessor :redirect
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ attr_accessor :source_order
+ # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
+ attr_accessor :statement_descriptor
+ # An optional token used to create the source. When passed, token properties will override source parameters.
+ attr_accessor :token
+ # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
+ attr_accessor :type
+ # Attribute for param field usage
+ attr_accessor :usage
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ flow: nil,
+ mandate: nil,
+ metadata: nil,
+ original_source: nil,
+ owner: nil,
+ receiver: nil,
+ redirect: nil,
+ source_order: nil,
+ statement_descriptor: nil,
+ token: nil,
+ type: nil,
+ usage: nil
+ )
+ @amount = amount
+ @currency = currency
+ @customer = customer
+ @expand = expand
+ @flow = flow
+ @mandate = mandate
+ @metadata = metadata
+ @original_source = original_source
+ @owner = owner
+ @receiver = receiver
+ @redirect = redirect
+ @source_order = source_order
+ @statement_descriptor = statement_descriptor
+ @token = token
+ @type = type
+ @usage = usage
+ end
+ end
+
+ class VerifyParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The values needed to verify the source.
+ attr_accessor :values
+
+ def initialize(expand: nil, values: nil)
+ @expand = expand
+ @values = values
+ end
+ end
+
# Creates a new source object.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/sources", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/source_transaction_service.rb b/lib/stripe/services/source_transaction_service.rb
index 8d98c66f..b59cabce 100644
--- a/lib/stripe/services/source_transaction_service.rb
+++ b/lib/stripe/services/source_transaction_service.rb
@@ -3,6 +3,24 @@
module Stripe
class SourceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# List source transactions for a given source.
def list(source, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/subscription_item_service.rb b/lib/stripe/services/subscription_item_service.rb
index 78ab0cb3..0c8e959a 100644
--- a/lib/stripe/services/subscription_item_service.rb
+++ b/lib/stripe/services/subscription_item_service.rb
@@ -3,6 +3,291 @@
module Stripe
class SubscriptionItemService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
+ attr_accessor :clear_usage
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+
+ def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil)
+ @clear_usage = clear_usage
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ attr_accessor :off_session
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ attr_accessor :payment_behavior
+ # The identifier of the new plan for this subscription item.
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ off_session: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @off_session = off_session
+ @payment_behavior = payment_behavior
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The ID of the subscription whose items will be retrieved.
+ attr_accessor :subscription
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ subscription: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @subscription = subscription
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ attr_accessor :payment_behavior
+ # The identifier of the plan to add to the subscription.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ attr_accessor :quantity
+ # The identifier of the subscription to modify.
+ attr_accessor :subscription
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @expand = expand
+ @metadata = metadata
+ @payment_behavior = payment_behavior
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @quantity = quantity
+ @subscription = subscription
+ @tax_rates = tax_rates
+ end
+ end
+
# Adds a new item to an existing subscription. No existing items will be changed or replaced.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/subscription_schedule_service.rb b/lib/stripe/services/subscription_schedule_service.rb
index e51fef18..fdfb0dcf 100644
--- a/lib/stripe/services/subscription_schedule_service.rb
+++ b/lib/stripe/services/subscription_schedule_service.rb
@@ -3,6 +3,1068 @@
module Stripe
class SubscriptionScheduleService < StripeService
+ class ListParams < Stripe::RequestParams
+ class CanceledAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CompletedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class ReleasedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return subscription schedules that were created canceled the given date interval.
+ attr_accessor :canceled_at
+ # Only return subscription schedules that completed during the given date interval.
+ attr_accessor :completed_at
+ # Only return subscription schedules that were created during the given date interval.
+ attr_accessor :created
+ # Only return subscription schedules for the given customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return subscription schedules that were released during the given date interval.
+ attr_accessor :released_at
+ # Only return subscription schedules that have not started yet.
+ attr_accessor :scheduled
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ canceled_at: nil,
+ completed_at: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ released_at: nil,
+ scheduled: nil,
+ starting_after: nil
+ )
+ @canceled_at = canceled_at
+ @completed_at = completed_at
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @released_at = released_at
+ @scheduled = scheduled
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ )
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @default_payment_method = default_payment_method
+ @description = description
+ @invoice_settings = invoice_settings
+ @on_behalf_of = on_behalf_of
+ @transfer_data = transfer_data
+ end
+ end
+
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ attr_accessor :proration_behavior
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ attr_accessor :trial_end
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @currency = currency
+ @default_payment_method = default_payment_method
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @end_date = end_date
+ @invoice_settings = invoice_settings
+ @items = items
+ @iterations = iterations
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @transfer_data = transfer_data
+ @trial = trial
+ @trial_end = trial_end
+ end
+ end
+ # The identifier of the customer to create the subscription schedule for.
+ attr_accessor :customer
+ # Object representing the subscription schedule's default settings.
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
+ attr_accessor :from_subscription
+ # 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`.
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ attr_accessor :phases
+ # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
+ attr_accessor :start_date
+
+ def initialize(
+ customer: nil,
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ from_subscription: nil,
+ metadata: nil,
+ phases: nil,
+ start_date: nil
+ )
+ @customer = customer
+ @default_settings = default_settings
+ @end_behavior = end_behavior
+ @expand = expand
+ @from_subscription = from_subscription
+ @metadata = metadata
+ @phases = phases
+ @start_date = start_date
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ )
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @default_payment_method = default_payment_method
+ @description = description
+ @invoice_settings = invoice_settings
+ @on_behalf_of = on_behalf_of
+ @transfer_data = transfer_data
+ end
+ end
+
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @days_until_due = days_until_due
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ attr_accessor :trial_end
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @collection_method = collection_method
+ @currency = currency
+ @default_payment_method = default_payment_method
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @end_date = end_date
+ @invoice_settings = invoice_settings
+ @items = items
+ @iterations = iterations
+ @metadata = metadata
+ @on_behalf_of = on_behalf_of
+ @proration_behavior = proration_behavior
+ @start_date = start_date
+ @transfer_data = transfer_data
+ @trial = trial
+ @trial_end = trial_end
+ end
+ end
+ # Object representing the subscription schedule's default settings.
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
+ attr_accessor :phases
+ # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+
+ def initialize(
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ metadata: nil,
+ phases: nil,
+ proration_behavior: nil
+ )
+ @default_settings = default_settings
+ @end_behavior = end_behavior
+ @expand = expand
+ @metadata = metadata
+ @phases = phases
+ @proration_behavior = proration_behavior
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
+ attr_accessor :invoice_now
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
+ attr_accessor :prorate
+
+ def initialize(expand: nil, invoice_now: nil, prorate: nil)
+ @expand = expand
+ @invoice_now = invoice_now
+ @prorate = prorate
+ end
+ end
+
+ class ReleaseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Keep any cancellation on the subscription that the schedule has set
+ attr_accessor :preserve_cancel_date
+
+ def initialize(expand: nil, preserve_cancel_date: nil)
+ @expand = expand
+ @preserve_cancel_date = preserve_cancel_date
+ end
+ end
+
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
def cancel(schedule, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/subscription_service.rb b/lib/stripe/services/subscription_service.rb
index 1ef8fcbb..c87dfe29 100644
--- a/lib/stripe/services/subscription_service.rb
+++ b/lib/stripe/services/subscription_service.rb
@@ -3,6 +3,1418 @@
module Stripe
class SubscriptionService < StripeService
+ class CancelParams < Stripe::RequestParams
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ attr_accessor :feedback
+
+ def initialize(comment: nil, feedback: nil)
+ @comment = comment
+ @feedback = feedback
+ end
+ end
+ # Details about why this subscription was cancelled
+ attr_accessor :cancellation_details
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
+ attr_accessor :invoice_now
+ # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
+ attr_accessor :prorate
+
+ def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil)
+ @cancellation_details = cancellation_details
+ @expand = expand
+ @invoice_now = invoice_now
+ @prorate = prorate
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ attr_accessor :feedback
+
+ def initialize(comment: nil, feedback: nil)
+ @comment = comment
+ @feedback = feedback
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # Subscription item to update.
+ attr_accessor :id
+ # 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`.
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @clear_usage = clear_usage
+ @deleted = deleted
+ @discounts = discounts
+ @id = id
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class PauseCollection < Stripe::RequestParams
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ attr_accessor :behavior
+ # The time after which the subscription will resume collecting payments.
+ attr_accessor :resumes_at
+
+ def initialize(behavior: nil, resumes_at: nil)
+ @behavior = behavior
+ @resumes_at = resumes_at
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+
+ def initialize(amount: nil, amount_type: nil, description: nil)
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil)
+ @mandate_options = mandate_options
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ attr_accessor :save_default_payment_method
+
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ )
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @save_default_payment_method = save_default_payment_method
+ end
+ end
+
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ attr_accessor :automatic_tax
+ # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ attr_accessor :cancel_at_period_end
+ # Details about why this subscription was cancelled
+ attr_accessor :cancellation_details
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
+ attr_accessor :default_tax_rates
+ # 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.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ attr_accessor :items
+ # 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`.
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ attr_accessor :on_behalf_of
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ attr_accessor :pause_collection
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
+ attr_accessor :proration_date
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_from_plan
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancellation_details: nil,
+ collection_method: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ pause_collection: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_settings: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @billing_cycle_anchor = billing_cycle_anchor
+ @cancel_at = cancel_at
+ @cancel_at_period_end = cancel_at_period_end
+ @cancellation_details = cancellation_details
+ @collection_method = collection_method
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @invoice_settings = invoice_settings
+ @items = items
+ @metadata = metadata
+ @off_session = off_session
+ @on_behalf_of = on_behalf_of
+ @pause_collection = pause_collection
+ @payment_behavior = payment_behavior
+ @payment_settings = payment_settings
+ @pending_invoice_item_interval = pending_invoice_item_interval
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ @transfer_data = transfer_data
+ @trial_end = trial_end
+ @trial_from_plan = trial_from_plan
+ @trial_settings = trial_settings
+ end
+ end
+
+ class DeleteDiscountParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CurrentPeriodEnd < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class CurrentPeriodStart < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Filter subscriptions by their automatic tax settings.
+ attr_accessor :automatic_tax
+ # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
+ attr_accessor :collection_method
+ # Only return subscriptions that were created during the given date interval.
+ attr_accessor :created
+ # Only return subscriptions whose current_period_end falls within the given date interval.
+ attr_accessor :current_period_end
+ # Only return subscriptions whose current_period_start falls within the given date interval.
+ attr_accessor :current_period_start
+ # The ID of the customer whose subscriptions will be retrieved.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The ID of the plan whose subscriptions will be retrieved.
+ attr_accessor :plan
+ # Filter for subscriptions that contain this recurring price ID.
+ attr_accessor :price
+ # 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.
+ attr_accessor :starting_after
+ # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
+ attr_accessor :status
+ # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.
+ attr_accessor :test_clock
+
+ def initialize(
+ automatic_tax: nil,
+ collection_method: nil,
+ created: nil,
+ current_period_end: nil,
+ current_period_start: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ plan: nil,
+ price: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ )
+ @automatic_tax = automatic_tax
+ @collection_method = collection_method
+ @created = created
+ @current_period_end = current_period_end
+ @current_period_start = current_period_start
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @plan = plan
+ @price = price
+ @starting_after = starting_after
+ @status = status
+ @test_clock = test_clock
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the item.
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ attr_accessor :tax_rates
+
+ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
+ @discounts = discounts
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ attr_accessor :enabled
+ # 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.
+ attr_accessor :liability
+
+ def initialize(enabled: nil, liability: nil)
+ @enabled = enabled
+ @liability = liability
+ end
+ end
+
+ class BillingCycleAnchorConfig < Stripe::RequestParams
+ # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
+ attr_accessor :day_of_month
+ # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
+ attr_accessor :hour
+ # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
+ attr_accessor :minute
+ # The month to start full cycle billing periods. Ranges from 1 to 12.
+ attr_accessor :month
+ # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
+ attr_accessor :second
+
+ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
+ @day_of_month = day_of_month
+ @hour = hour
+ @minute = minute
+ @month = month
+ @second = second
+ end
+ end
+
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ attr_accessor :type
+
+ def initialize(account: nil, type: nil)
+ @account = account
+ @type = type
+ end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ attr_accessor :issuer
+
+ def initialize(account_tax_ids: nil, issuer: nil)
+ @account_tax_ids = account_tax_ids
+ @issuer = issuer
+ end
+ end
+
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ attr_accessor :promotion_code
+
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
+ @coupon = coupon
+ @discount = discount
+ @promotion_code = promotion_code
+ end
+ end
+
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ attr_accessor :unit_amount_decimal
+
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ )
+ @currency = currency
+ @product = product
+ @recurring = recurring
+ @tax_behavior = tax_behavior
+ @unit_amount = unit_amount
+ @unit_amount_decimal = unit_amount_decimal
+ end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ attr_accessor :discounts
+ # 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`.
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ attr_accessor :plan
+ # The ID of the price object.
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ attr_accessor :price_data
+ # Quantity for this item.
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ attr_accessor :tax_rates
+
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ )
+ @discounts = discounts
+ @metadata = metadata
+ @plan = plan
+ @price = price
+ @price_data = price_data
+ @quantity = quantity
+ @tax_rates = tax_rates
+ end
+ end
+
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ attr_accessor :transaction_type
+
+ def initialize(transaction_type: nil)
+ @transaction_type = transaction_type
+ end
+ end
+ # Additional fields for Mandate creation
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(mandate_options: nil, verification_method: nil)
+ @mandate_options = mandate_options
+ @verification_method = verification_method
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ attr_accessor :preferred_language
+
+ def initialize(preferred_language: nil)
+ @preferred_language = preferred_language
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ attr_accessor :description
+
+ def initialize(amount: nil, amount_type: nil, description: nil)
+ @amount = amount
+ @amount_type = amount_type
+ @description = description
+ end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ attr_accessor :request_three_d_secure
+
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil)
+ @mandate_options = mandate_options
+ @network = network
+ @request_three_d_secure = request_three_d_secure
+ end
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ attr_accessor :type
+
+ def initialize(eu_bank_transfer: nil, type: nil)
+ @eu_bank_transfer = eu_bank_transfer
+ @type = type
+ end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ attr_accessor :funding_type
+
+ def initialize(bank_transfer: nil, funding_type: nil)
+ @bank_transfer = bank_transfer
+ @funding_type = funding_type
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ attr_accessor :account_subcategories
+
+ def initialize(account_subcategories: nil)
+ @account_subcategories = account_subcategories
+ end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ attr_accessor :prefetch
+
+ def initialize(filters: nil, permissions: nil, prefetch: nil)
+ @filters = filters
+ @permissions = permissions
+ @prefetch = prefetch
+ end
+ end
+ # Additional fields for Financial Connections Session creation
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ attr_accessor :verification_method
+
+ def initialize(financial_connections: nil, verification_method: nil)
+ @financial_connections = financial_connections
+ @verification_method = verification_method
+ end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ )
+ @acss_debit = acss_debit
+ @bancontact = bancontact
+ @card = card
+ @customer_balance = customer_balance
+ @konbini = konbini
+ @sepa_debit = sepa_debit
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ attr_accessor :save_default_payment_method
+
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ )
+ @payment_method_options = payment_method_options
+ @payment_method_types = payment_method_types
+ @save_default_payment_method = save_default_payment_method
+ end
+ end
+
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ attr_accessor :interval_count
+
+ def initialize(interval: nil, interval_count: nil)
+ @interval = interval
+ @interval_count = interval_count
+ end
+ end
+
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ attr_accessor :destination
+
+ def initialize(amount_percent: nil, destination: nil)
+ @amount_percent = amount_percent
+ @destination = destination
+ end
+ end
+
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ attr_accessor :missing_payment_method
+
+ def initialize(missing_payment_method: nil)
+ @missing_payment_method = missing_payment_method
+ end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ attr_accessor :end_behavior
+
+ def initialize(end_behavior: nil)
+ @end_behavior = end_behavior
+ end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ attr_accessor :automatic_tax
+ # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
+ attr_accessor :backdate_start_date
+ # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
+ attr_accessor :billing_cycle_anchor
+ # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
+ attr_accessor :billing_cycle_anchor_config
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ attr_accessor :cancel_at_period_end
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ attr_accessor :collection_method
+ # 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).
+ attr_accessor :currency
+ # The identifier of the customer to subscribe.
+ attr_accessor :customer
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ attr_accessor :default_tax_rates
+ # 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.
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ attr_accessor :items
+ # 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`.
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ attr_accessor :on_behalf_of
+ # Only applies to subscriptions with `collection_method=charge_automatically`.
+ #
+ # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ #
+ # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
+ #
+ # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_from_plan
+ # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ attr_accessor :trial_settings
+
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ backdate_start_date: nil,
+ billing_cycle_anchor: nil,
+ billing_cycle_anchor_config: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ collection_method: nil,
+ currency: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ )
+ @add_invoice_items = add_invoice_items
+ @application_fee_percent = application_fee_percent
+ @automatic_tax = automatic_tax
+ @backdate_start_date = backdate_start_date
+ @billing_cycle_anchor = billing_cycle_anchor
+ @billing_cycle_anchor_config = billing_cycle_anchor_config
+ @cancel_at = cancel_at
+ @cancel_at_period_end = cancel_at_period_end
+ @collection_method = collection_method
+ @currency = currency
+ @customer = customer
+ @days_until_due = days_until_due
+ @default_payment_method = default_payment_method
+ @default_source = default_source
+ @default_tax_rates = default_tax_rates
+ @description = description
+ @discounts = discounts
+ @expand = expand
+ @invoice_settings = invoice_settings
+ @items = items
+ @metadata = metadata
+ @off_session = off_session
+ @on_behalf_of = on_behalf_of
+ @payment_behavior = payment_behavior
+ @payment_settings = payment_settings
+ @pending_invoice_item_interval = pending_invoice_item_interval
+ @proration_behavior = proration_behavior
+ @transfer_data = transfer_data
+ @trial_end = trial_end
+ @trial_from_plan = trial_from_plan
+ @trial_period_days = trial_period_days
+ @trial_settings = trial_settings
+ end
+ end
+
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).
+ attr_accessor :query
+
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
+ @expand = expand
+ @limit = limit
+ @page = page
+ @query = query
+ end
+ end
+
+ class ResumeParams < Stripe::RequestParams
+ # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ attr_accessor :billing_cycle_anchor
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ attr_accessor :proration_date
+
+ def initialize(
+ billing_cycle_anchor: nil,
+ expand: nil,
+ proration_behavior: nil,
+ proration_date: nil
+ )
+ @billing_cycle_anchor = billing_cycle_anchor
+ @expand = expand
+ @proration_behavior = proration_behavior
+ @proration_date = proration_date
+ end
+ end
+
# Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
#
# Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
diff --git a/lib/stripe/services/tax/calculation_line_item_service.rb b/lib/stripe/services/tax/calculation_line_item_service.rb
index 20163218..3efee028 100644
--- a/lib/stripe/services/tax/calculation_line_item_service.rb
+++ b/lib/stripe/services/tax/calculation_line_item_service.rb
@@ -4,6 +4,24 @@
module Stripe
module Tax
class CalculationLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
def list(calculation, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/tax/calculation_service.rb b/lib/stripe/services/tax/calculation_service.rb
index 783b3ba4..bf65008f 100644
--- a/lib/stripe/services/tax/calculation_service.rb
+++ b/lib/stripe/services/tax/calculation_service.rb
@@ -11,6 +11,211 @@ module Stripe
@line_items = Stripe::Tax::CalculationLineItemService.new(@requestor)
end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class TaxId < Stripe::RequestParams
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(type: nil, value: nil)
+ @type = type
+ @value = value
+ end
+ end
+ # The customer's postal address (for example, home or business location).
+ attr_accessor :address
+ # The type of customer address provided.
+ attr_accessor :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ attr_accessor :ip_address
+ # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness.
+ attr_accessor :tax_ids
+ # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
+ attr_accessor :taxability_override
+
+ def initialize(
+ address: nil,
+ address_source: nil,
+ ip_address: nil,
+ tax_ids: nil,
+ taxability_override: nil
+ )
+ @address = address
+ @address_source = address_source
+ @ip_address = ip_address
+ @tax_ids = tax_ids
+ @taxability_override = taxability_override
+ end
+ end
+
+ class LineItem < Stripe::RequestParams
+ # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ attr_accessor :amount
+ # If provided, the product's `tax_code` will be used as the line item's `tax_code`.
+ attr_accessor :product
+ # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
+ attr_accessor :quantity
+ # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).
+ attr_accessor :reference
+ # Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
+ attr_accessor :tax_code
+
+ def initialize(
+ amount: nil,
+ product: nil,
+ quantity: nil,
+ reference: nil,
+ tax_behavior: nil,
+ tax_code: nil
+ )
+ @amount = amount
+ @product = product
+ @quantity = quantity
+ @reference = reference
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ end
+ end
+
+ class ShipFromDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The address from which the goods are being shipped from.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ attr_accessor :amount
+ # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
+ attr_accessor :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
+ attr_accessor :tax_behavior
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
+ attr_accessor :tax_code
+
+ def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil)
+ @amount = amount
+ @shipping_rate = shipping_rate
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.
+ attr_accessor :customer
+ # Details about the customer, including address and tax IDs.
+ attr_accessor :customer_details
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A list of items the customer is purchasing.
+ attr_accessor :line_items
+ # Details about the address from which the goods are being shipped.
+ attr_accessor :ship_from_details
+ # Shipping cost details to be used for the calculation.
+ attr_accessor :shipping_cost
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.
+ attr_accessor :tax_date
+
+ def initialize(
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ expand: nil,
+ line_items: nil,
+ ship_from_details: nil,
+ shipping_cost: nil,
+ tax_date: nil
+ )
+ @currency = currency
+ @customer = customer
+ @customer_details = customer_details
+ @expand = expand
+ @line_items = line_items
+ @ship_from_details = ship_from_details
+ @shipping_cost = shipping_cost
+ @tax_date = tax_date
+ end
+ end
+
# Calculates tax based on the input and returns a Tax Calculation object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/tax/registration_service.rb b/lib/stripe/services/tax/registration_service.rb
index 205c4f37..584e2810 100644
--- a/lib/stripe/services/tax/registration_service.rb
+++ b/lib/stripe/services/tax/registration_service.rb
@@ -4,6 +4,1570 @@
module Stripe
module Tax
class RegistrationService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # The status of the Tax Registration.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class CountryOptions < Stripe::RequestParams
+ class Ae < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Al < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Am < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ao < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class At < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Au < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ba < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Bb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Be < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Bg < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Bh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Bs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class By < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ca < Stripe::RequestParams
+ class ProvinceStandard < Stripe::RequestParams
+ # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ attr_accessor :province
+
+ def initialize(province: nil)
+ @province = province
+ end
+ end
+ # Options for the provincial tax registration.
+ attr_accessor :province_standard
+ # Type of registration to be created in Canada.
+ attr_accessor :type
+
+ def initialize(province_standard: nil, type: nil)
+ @province_standard = province_standard
+ @type = type
+ end
+ end
+
+ class Cd < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ch < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Cl < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Co < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Cr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Cy < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Cz < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class De < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Dk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Ec < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ee < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Eg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Es < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Fi < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Fr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Gb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ge < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Gn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Gr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Hr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Hu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Id < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ie < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Is < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class It < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Jp < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ke < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Kh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Kr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Kz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Lt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Lu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Lv < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Ma < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Md < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Me < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Mk < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Mr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Mt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Mx < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class My < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ng < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Nl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class No < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Np < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Nz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Om < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Pe < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Pl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Pt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Ro < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Rs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ru < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Sa < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Se < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Sg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Si < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Sk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ attr_accessor :place_of_supply_scheme
+
+ def initialize(place_of_supply_scheme: nil)
+ @place_of_supply_scheme = place_of_supply_scheme
+ end
+ end
+ # Options for the standard registration.
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ attr_accessor :type
+
+ def initialize(standard: nil, type: nil)
+ @standard = standard
+ @type = type
+ end
+ end
+
+ class Sn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Sr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Th < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Tj < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Tr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Tz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Ug < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Us < Stripe::RequestParams
+ class LocalAmusementTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `64343` (River Grove), and `68081` (Schiller Park).
+ attr_accessor :jurisdiction
+
+ def initialize(jurisdiction: nil)
+ @jurisdiction = jurisdiction
+ end
+ end
+
+ class LocalLeaseTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
+ attr_accessor :jurisdiction
+
+ def initialize(jurisdiction: nil)
+ @jurisdiction = jurisdiction
+ end
+ end
+
+ class StateSalesTax < Stripe::RequestParams
+ class Election < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
+ attr_accessor :jurisdiction
+ # The type of the election for the state sales tax registration.
+ attr_accessor :type
+
+ def initialize(jurisdiction: nil, type: nil)
+ @jurisdiction = jurisdiction
+ @type = type
+ end
+ end
+ # Elections for the state sales tax registration.
+ attr_accessor :elections
+
+ def initialize(elections: nil)
+ @elections = elections
+ end
+ end
+ # Options for the local amusement tax registration.
+ attr_accessor :local_amusement_tax
+ # Options for the local lease tax registration.
+ attr_accessor :local_lease_tax
+ # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ attr_accessor :state
+ # Options for the state sales tax registration.
+ attr_accessor :state_sales_tax
+ # Type of registration to be created in the US.
+ attr_accessor :type
+
+ def initialize(
+ local_amusement_tax: nil,
+ local_lease_tax: nil,
+ state: nil,
+ state_sales_tax: nil,
+ type: nil
+ )
+ @local_amusement_tax = local_amusement_tax
+ @local_lease_tax = local_lease_tax
+ @state = state
+ @state_sales_tax = state_sales_tax
+ @type = type
+ end
+ end
+
+ class Uy < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Uz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Vn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Za < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Zm < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+
+ class Zw < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ attr_accessor :type
+
+ def initialize(type: nil)
+ @type = type
+ end
+ end
+ # Options for the registration in AE.
+ attr_accessor :ae
+ # Options for the registration in AL.
+ attr_accessor :al
+ # Options for the registration in AM.
+ attr_accessor :am
+ # Options for the registration in AO.
+ attr_accessor :ao
+ # Options for the registration in AT.
+ attr_accessor :at
+ # Options for the registration in AU.
+ attr_accessor :au
+ # Options for the registration in BA.
+ attr_accessor :ba
+ # Options for the registration in BB.
+ attr_accessor :bb
+ # Options for the registration in BE.
+ attr_accessor :be
+ # Options for the registration in BG.
+ attr_accessor :bg
+ # Options for the registration in BH.
+ attr_accessor :bh
+ # Options for the registration in BS.
+ attr_accessor :bs
+ # Options for the registration in BY.
+ attr_accessor :by
+ # Options for the registration in CA.
+ attr_accessor :ca
+ # Options for the registration in CD.
+ attr_accessor :cd
+ # Options for the registration in CH.
+ attr_accessor :ch
+ # Options for the registration in CL.
+ attr_accessor :cl
+ # Options for the registration in CO.
+ attr_accessor :co
+ # Options for the registration in CR.
+ attr_accessor :cr
+ # Options for the registration in CY.
+ attr_accessor :cy
+ # Options for the registration in CZ.
+ attr_accessor :cz
+ # Options for the registration in DE.
+ attr_accessor :de
+ # Options for the registration in DK.
+ attr_accessor :dk
+ # Options for the registration in EC.
+ attr_accessor :ec
+ # Options for the registration in EE.
+ attr_accessor :ee
+ # Options for the registration in EG.
+ attr_accessor :eg
+ # Options for the registration in ES.
+ attr_accessor :es
+ # Options for the registration in FI.
+ attr_accessor :fi
+ # Options for the registration in FR.
+ attr_accessor :fr
+ # Options for the registration in GB.
+ attr_accessor :gb
+ # Options for the registration in GE.
+ attr_accessor :ge
+ # Options for the registration in GN.
+ attr_accessor :gn
+ # Options for the registration in GR.
+ attr_accessor :gr
+ # Options for the registration in HR.
+ attr_accessor :hr
+ # Options for the registration in HU.
+ attr_accessor :hu
+ # Options for the registration in ID.
+ attr_accessor :id
+ # Options for the registration in IE.
+ attr_accessor :ie
+ # Options for the registration in IS.
+ attr_accessor :is
+ # Options for the registration in IT.
+ attr_accessor :it
+ # Options for the registration in JP.
+ attr_accessor :jp
+ # Options for the registration in KE.
+ attr_accessor :ke
+ # Options for the registration in KH.
+ attr_accessor :kh
+ # Options for the registration in KR.
+ attr_accessor :kr
+ # Options for the registration in KZ.
+ attr_accessor :kz
+ # Options for the registration in LT.
+ attr_accessor :lt
+ # Options for the registration in LU.
+ attr_accessor :lu
+ # Options for the registration in LV.
+ attr_accessor :lv
+ # Options for the registration in MA.
+ attr_accessor :ma
+ # Options for the registration in MD.
+ attr_accessor :md
+ # Options for the registration in ME.
+ attr_accessor :me
+ # Options for the registration in MK.
+ attr_accessor :mk
+ # Options for the registration in MR.
+ attr_accessor :mr
+ # Options for the registration in MT.
+ attr_accessor :mt
+ # Options for the registration in MX.
+ attr_accessor :mx
+ # Options for the registration in MY.
+ attr_accessor :my
+ # Options for the registration in NG.
+ attr_accessor :ng
+ # Options for the registration in NL.
+ attr_accessor :nl
+ # Options for the registration in NO.
+ attr_accessor :no
+ # Options for the registration in NP.
+ attr_accessor :np
+ # Options for the registration in NZ.
+ attr_accessor :nz
+ # Options for the registration in OM.
+ attr_accessor :om
+ # Options for the registration in PE.
+ attr_accessor :pe
+ # Options for the registration in PL.
+ attr_accessor :pl
+ # Options for the registration in PT.
+ attr_accessor :pt
+ # Options for the registration in RO.
+ attr_accessor :ro
+ # Options for the registration in RS.
+ attr_accessor :rs
+ # Options for the registration in RU.
+ attr_accessor :ru
+ # Options for the registration in SA.
+ attr_accessor :sa
+ # Options for the registration in SE.
+ attr_accessor :se
+ # Options for the registration in SG.
+ attr_accessor :sg
+ # Options for the registration in SI.
+ attr_accessor :si
+ # Options for the registration in SK.
+ attr_accessor :sk
+ # Options for the registration in SN.
+ attr_accessor :sn
+ # Options for the registration in SR.
+ attr_accessor :sr
+ # Options for the registration in TH.
+ attr_accessor :th
+ # Options for the registration in TJ.
+ attr_accessor :tj
+ # Options for the registration in TR.
+ attr_accessor :tr
+ # Options for the registration in TZ.
+ attr_accessor :tz
+ # Options for the registration in UG.
+ attr_accessor :ug
+ # Options for the registration in US.
+ attr_accessor :us
+ # Options for the registration in UY.
+ attr_accessor :uy
+ # Options for the registration in UZ.
+ attr_accessor :uz
+ # Options for the registration in VN.
+ attr_accessor :vn
+ # Options for the registration in ZA.
+ attr_accessor :za
+ # Options for the registration in ZM.
+ attr_accessor :zm
+ # Options for the registration in ZW.
+ attr_accessor :zw
+
+ def initialize(
+ ae: nil,
+ al: nil,
+ am: nil,
+ ao: nil,
+ at: nil,
+ au: nil,
+ ba: nil,
+ bb: nil,
+ be: nil,
+ bg: nil,
+ bh: nil,
+ bs: nil,
+ by: nil,
+ ca: nil,
+ cd: nil,
+ ch: nil,
+ cl: nil,
+ co: nil,
+ cr: nil,
+ cy: nil,
+ cz: nil,
+ de: nil,
+ dk: nil,
+ ec: nil,
+ ee: nil,
+ eg: nil,
+ es: nil,
+ fi: nil,
+ fr: nil,
+ gb: nil,
+ ge: nil,
+ gn: nil,
+ gr: nil,
+ hr: nil,
+ hu: nil,
+ id: nil,
+ ie: nil,
+ is: nil,
+ it: nil,
+ jp: nil,
+ ke: nil,
+ kh: nil,
+ kr: nil,
+ kz: nil,
+ lt: nil,
+ lu: nil,
+ lv: nil,
+ ma: nil,
+ md: nil,
+ me: nil,
+ mk: nil,
+ mr: nil,
+ mt: nil,
+ mx: nil,
+ my: nil,
+ ng: nil,
+ nl: nil,
+ no: nil,
+ np: nil,
+ nz: nil,
+ om: nil,
+ pe: nil,
+ pl: nil,
+ pt: nil,
+ ro: nil,
+ rs: nil,
+ ru: nil,
+ sa: nil,
+ se: nil,
+ sg: nil,
+ si: nil,
+ sk: nil,
+ sn: nil,
+ sr: nil,
+ th: nil,
+ tj: nil,
+ tr: nil,
+ tz: nil,
+ ug: nil,
+ us: nil,
+ uy: nil,
+ uz: nil,
+ vn: nil,
+ za: nil,
+ zm: nil,
+ zw: nil
+ )
+ @ae = ae
+ @al = al
+ @am = am
+ @ao = ao
+ @at = at
+ @au = au
+ @ba = ba
+ @bb = bb
+ @be = be
+ @bg = bg
+ @bh = bh
+ @bs = bs
+ @by = by
+ @ca = ca
+ @cd = cd
+ @ch = ch
+ @cl = cl
+ @co = co
+ @cr = cr
+ @cy = cy
+ @cz = cz
+ @de = de
+ @dk = dk
+ @ec = ec
+ @ee = ee
+ @eg = eg
+ @es = es
+ @fi = fi
+ @fr = fr
+ @gb = gb
+ @ge = ge
+ @gn = gn
+ @gr = gr
+ @hr = hr
+ @hu = hu
+ @id = id
+ @ie = ie
+ @is = is
+ @it = it
+ @jp = jp
+ @ke = ke
+ @kh = kh
+ @kr = kr
+ @kz = kz
+ @lt = lt
+ @lu = lu
+ @lv = lv
+ @ma = ma
+ @md = md
+ @me = me
+ @mk = mk
+ @mr = mr
+ @mt = mt
+ @mx = mx
+ @my = my
+ @ng = ng
+ @nl = nl
+ @no = no
+ @np = np
+ @nz = nz
+ @om = om
+ @pe = pe
+ @pl = pl
+ @pt = pt
+ @ro = ro
+ @rs = rs
+ @ru = ru
+ @sa = sa
+ @se = se
+ @sg = sg
+ @si = si
+ @sk = sk
+ @sn = sn
+ @sr = sr
+ @th = th
+ @tj = tj
+ @tr = tr
+ @tz = tz
+ @ug = ug
+ @us = us
+ @uy = uy
+ @uz = uz
+ @vn = vn
+ @za = za
+ @zm = zm
+ @zw = zw
+ end
+ end
+ # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch.
+ attr_accessor :active_from
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Specific options for a registration in the specified `country`.
+ attr_accessor :country_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+
+ def initialize(
+ active_from: nil,
+ country: nil,
+ country_options: nil,
+ expand: nil,
+ expires_at: nil
+ )
+ @active_from = active_from
+ @country = country
+ @country_options = country_options
+ @expand = expand
+ @expires_at = expires_at
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ attr_accessor :active_from
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ attr_accessor :expires_at
+
+ def initialize(active_from: nil, expand: nil, expires_at: nil)
+ @active_from = active_from
+ @expand = expand
+ @expires_at = expires_at
+ end
+ end
+
# Creates a new Tax Registration object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/tax/settings_service.rb b/lib/stripe/services/tax/settings_service.rb
index c0aea860..cfeccbba 100644
--- a/lib/stripe/services/tax/settings_service.rb
+++ b/lib/stripe/services/tax/settings_service.rb
@@ -4,6 +4,80 @@
module Stripe
module Tax
class SettingsService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Defaults < Stripe::RequestParams
+ # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null.
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ attr_accessor :tax_code
+
+ def initialize(tax_behavior: nil, tax_code: nil)
+ @tax_behavior = tax_behavior
+ @tax_code = tax_code
+ end
+ end
+
+ class HeadOffice < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The location of the business for tax purposes.
+ attr_accessor :address
+
+ def initialize(address: nil)
+ @address = address
+ end
+ end
+ # Default configuration to be used on Stripe Tax calculations.
+ attr_accessor :defaults
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The place where your business is located.
+ attr_accessor :head_office
+
+ def initialize(defaults: nil, expand: nil, head_office: nil)
+ @defaults = defaults
+ @expand = expand
+ @head_office = head_office
+ end
+ end
+
# Retrieves Tax Settings for a merchant.
def retrieve(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/tax/transaction_line_item_service.rb b/lib/stripe/services/tax/transaction_line_item_service.rb
index e3372f8a..0e0ec16d 100644
--- a/lib/stripe/services/tax/transaction_line_item_service.rb
+++ b/lib/stripe/services/tax/transaction_line_item_service.rb
@@ -4,6 +4,24 @@
module Stripe
module Tax
class TransactionLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
# Retrieves the line items of a committed standalone transaction as a collection.
def list(transaction, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/tax/transaction_service.rb b/lib/stripe/services/tax/transaction_service.rb
index 283044ec..0269025f 100644
--- a/lib/stripe/services/tax/transaction_service.rb
+++ b/lib/stripe/services/tax/transaction_service.rb
@@ -11,6 +11,117 @@ module Stripe
@line_items = Stripe::Tax::TransactionLineItemService.new(@requestor)
end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreateFromCalculationParams < Stripe::RequestParams
+ # Tax Calculation ID to be used as input when creating the transaction.
+ attr_accessor :calculation
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.
+ attr_accessor :posted_at
+ # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.
+ attr_accessor :reference
+
+ def initialize(calculation: nil, expand: nil, metadata: nil, posted_at: nil, reference: nil)
+ @calculation = calculation
+ @expand = expand
+ @metadata = metadata
+ @posted_at = posted_at
+ @reference = reference
+ end
+ end
+
+ class CreateReversalParams < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount_tax
+ # 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.
+ attr_accessor :metadata
+ # The `id` of the line item to reverse in the original transaction.
+ attr_accessor :original_line_item
+ # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed.
+ attr_accessor :quantity
+ # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.
+ attr_accessor :reference
+
+ def initialize(
+ amount: nil,
+ amount_tax: nil,
+ metadata: nil,
+ original_line_item: nil,
+ quantity: nil,
+ reference: nil
+ )
+ @amount = amount
+ @amount_tax = amount_tax
+ @metadata = metadata
+ @original_line_item = original_line_item
+ @quantity = quantity
+ @reference = reference
+ end
+ end
+
+ class ShippingCost < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ attr_accessor :amount_tax
+
+ def initialize(amount: nil, amount_tax: nil)
+ @amount = amount
+ @amount_tax = amount_tax
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.
+ attr_accessor :flat_amount
+ # The line item amounts to reverse.
+ attr_accessor :line_items
+ # 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`.
+ attr_accessor :metadata
+ # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
+ attr_accessor :mode
+ # The ID of the Transaction to partially or fully reverse.
+ attr_accessor :original_transaction
+ # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports).
+ attr_accessor :reference
+ # The shipping cost to reverse.
+ attr_accessor :shipping_cost
+
+ def initialize(
+ expand: nil,
+ flat_amount: nil,
+ line_items: nil,
+ metadata: nil,
+ mode: nil,
+ original_transaction: nil,
+ reference: nil,
+ shipping_cost: nil
+ )
+ @expand = expand
+ @flat_amount = flat_amount
+ @line_items = line_items
+ @metadata = metadata
+ @mode = mode
+ @original_transaction = original_transaction
+ @reference = reference
+ @shipping_cost = shipping_cost
+ end
+ end
+
# Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
def create_from_calculation(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/tax_code_service.rb b/lib/stripe/services/tax_code_service.rb
index 03b3480d..51584338 100644
--- a/lib/stripe/services/tax_code_service.rb
+++ b/lib/stripe/services/tax_code_service.rb
@@ -3,6 +3,33 @@
module Stripe
class TaxCodeService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
def list(params = {}, opts = {})
request(method: :get, path: "/v1/tax_codes", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/tax_id_service.rb b/lib/stripe/services/tax_id_service.rb
index 9a792254..69c3dbd3 100644
--- a/lib/stripe/services/tax_id_service.rb
+++ b/lib/stripe/services/tax_id_service.rb
@@ -3,6 +3,85 @@
module Stripe
class TaxIdService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ attr_accessor :customer
+ # Type of owner referenced.
+ attr_accessor :type
+
+ def initialize(account: nil, customer: nil, type: nil)
+ @account = account
+ @customer = customer
+ @type = type
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ attr_accessor :owner
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, owner: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @owner = owner
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ attr_accessor :customer
+ # Type of owner referenced.
+ attr_accessor :type
+
+ def initialize(account: nil, customer: nil, type: nil)
+ @account = account
+ @customer = customer
+ @type = type
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ attr_accessor :owner
+ # 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`
+ attr_accessor :type
+ # Value of the tax ID.
+ attr_accessor :value
+
+ def initialize(expand: nil, owner: nil, type: nil, value: nil)
+ @expand = expand
+ @owner = owner
+ @type = type
+ @value = value
+ end
+ end
+
# Creates a new account or customer tax_id object.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/tax_ids", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/tax_rate_service.rb b/lib/stripe/services/tax_rate_service.rb
index a586bcb1..ba9dabc1 100644
--- a/lib/stripe/services/tax_rate_service.rb
+++ b/lib/stripe/services/tax_rate_service.rb
@@ -3,6 +3,161 @@
module Stripe
class TaxRateService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Optional flag to filter by tax rates that are either active or inactive (archived).
+ attr_accessor :active
+ # Optional range for filtering created date.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).
+ attr_accessor :inclusive
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ inclusive: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @active = active
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @inclusive = inclusive
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # This specifies if the tax rate is inclusive or exclusive.
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # 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`.
+ attr_accessor :metadata
+ # This represents the tax rate percent out of 100.
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @active = active
+ @country = country
+ @description = description
+ @display_name = display_name
+ @expand = expand
+ @inclusive = inclusive
+ @jurisdiction = jurisdiction
+ @metadata = metadata
+ @percentage = percentage
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ attr_accessor :jurisdiction
+ # 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`.
+ attr_accessor :metadata
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ attr_accessor :tax_type
+
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ state: nil,
+ tax_type: nil
+ )
+ @active = active
+ @country = country
+ @description = description
+ @display_name = display_name
+ @expand = expand
+ @jurisdiction = jurisdiction
+ @metadata = metadata
+ @state = state
+ @tax_type = tax_type
+ end
+ end
+
# Creates a new tax rate.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/tax_rates", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/terminal/configuration_service.rb b/lib/stripe/services/terminal/configuration_service.rb
index 3329ef17..52fbe5fc 100644
--- a/lib/stripe/services/terminal/configuration_service.rb
+++ b/lib/stripe/services/terminal/configuration_service.rb
@@ -4,6 +4,1003 @@
module Stripe
module Terminal
class ConfigurationService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ attr_accessor :start_hour
+
+ def initialize(end_hour: nil, start_hour: nil)
+ @end_hour = end_hour
+ @start_hour = start_hour
+ end
+ end
+
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+ # Tipping configuration for AUD
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ attr_accessor :usd
+
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ )
+ @aud = aud
+ @cad = cad
+ @chf = chf
+ @czk = czk
+ @dkk = dkk
+ @eur = eur
+ @gbp = gbp
+ @hkd = hkd
+ @jpy = jpy
+ @myr = myr
+ @nok = nok
+ @nzd = nzd
+ @pln = pln
+ @sek = sek
+ @sgd = sgd
+ @usd = usd
+ end
+ end
+
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ attr_accessor :username
+
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil)
+ @ca_certificate_file = ca_certificate_file
+ @password = password
+ @ssid = ssid
+ @username = username
+ end
+ end
+
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ attr_accessor :private_key_file
+ # Password for the private key file
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ )
+ @ca_certificate_file = ca_certificate_file
+ @client_certificate_file = client_certificate_file
+ @private_key_file = private_key_file
+ @private_key_file_password = private_key_file_password
+ @ssid = ssid
+ end
+ end
+
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(password: nil, ssid: nil)
+ @password = password
+ @ssid = ssid
+ end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ attr_accessor :type
+
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ )
+ @enterprise_eap_peap = enterprise_eap_peap
+ @enterprise_eap_tls = enterprise_eap_tls
+ @personal_psk = personal_psk
+ @type = type
+ end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Name of the configuration
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ attr_accessor :wifi
+
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ )
+ @bbpos_wisepos_e = bbpos_wisepos_e
+ @expand = expand
+ @name = name
+ @offline = offline
+ @reboot_window = reboot_window
+ @stripe_s700 = stripe_s700
+ @tipping = tipping
+ @verifone_p400 = verifone_p400
+ @wifi = wifi
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # if present, only return the account default or non-default configurations.
+ attr_accessor :is_account_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ is_account_default: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @is_account_default = is_account_default
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ attr_accessor :enabled
+
+ def initialize(enabled: nil)
+ @enabled = enabled
+ end
+ end
+
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ attr_accessor :start_hour
+
+ def initialize(end_hour: nil, start_hour: nil)
+ @end_hour = end_hour
+ @start_hour = start_hour
+ end
+ end
+
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ attr_accessor :smart_tip_threshold
+
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
+ @fixed_amounts = fixed_amounts
+ @percentages = percentages
+ @smart_tip_threshold = smart_tip_threshold
+ end
+ end
+ # Tipping configuration for AUD
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ attr_accessor :usd
+
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ )
+ @aud = aud
+ @cad = cad
+ @chf = chf
+ @czk = czk
+ @dkk = dkk
+ @eur = eur
+ @gbp = gbp
+ @hkd = hkd
+ @jpy = jpy
+ @myr = myr
+ @nok = nok
+ @nzd = nzd
+ @pln = pln
+ @sek = sek
+ @sgd = sgd
+ @usd = usd
+ end
+ end
+
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ attr_accessor :splashscreen
+
+ def initialize(splashscreen: nil)
+ @splashscreen = splashscreen
+ end
+ end
+
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ attr_accessor :username
+
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil)
+ @ca_certificate_file = ca_certificate_file
+ @password = password
+ @ssid = ssid
+ @username = username
+ end
+ end
+
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ attr_accessor :private_key_file
+ # Password for the private key file
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ )
+ @ca_certificate_file = ca_certificate_file
+ @client_certificate_file = client_certificate_file
+ @private_key_file = private_key_file
+ @private_key_file_password = private_key_file_password
+ @ssid = ssid
+ end
+ end
+
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ attr_accessor :password
+ # Name of the WiFi network
+ attr_accessor :ssid
+
+ def initialize(password: nil, ssid: nil)
+ @password = password
+ @ssid = ssid
+ end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ attr_accessor :type
+
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ )
+ @enterprise_eap_peap = enterprise_eap_peap
+ @enterprise_eap_tls = enterprise_eap_tls
+ @personal_psk = personal_psk
+ @type = type
+ end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Name of the configuration
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ attr_accessor :wifi
+
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ )
+ @bbpos_wisepos_e = bbpos_wisepos_e
+ @expand = expand
+ @name = name
+ @offline = offline
+ @reboot_window = reboot_window
+ @stripe_s700 = stripe_s700
+ @tipping = tipping
+ @verifone_p400 = verifone_p400
+ @wifi = wifi
+ end
+ end
+
# Creates a new Configuration object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/terminal/connection_token_service.rb b/lib/stripe/services/terminal/connection_token_service.rb
index f3978c4b..3069ef9b 100644
--- a/lib/stripe/services/terminal/connection_token_service.rb
+++ b/lib/stripe/services/terminal/connection_token_service.rb
@@ -4,6 +4,18 @@
module Stripe
module Terminal
class ConnectionTokenService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ attr_accessor :location
+
+ def initialize(expand: nil, location: nil)
+ @expand = expand
+ @location = location
+ end
+ end
+
# To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/terminal/location_service.rb b/lib/stripe/services/terminal/location_service.rb
index 0def76a7..3ae0693f 100644
--- a/lib/stripe/services/terminal/location_service.rb
+++ b/lib/stripe/services/terminal/location_service.rb
@@ -4,6 +4,150 @@
module Stripe
module Terminal
class LocationService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location.
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ attr_accessor :configuration_overrides
+ # A name for the location.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ )
+ @address = address
+ @configuration_overrides = configuration_overrides
+ @display_name = display_name
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # The full address of the location.
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ attr_accessor :configuration_overrides
+ # A name for the location. Maximum length is 1000 characters.
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ )
+ @address = address
+ @configuration_overrides = configuration_overrides
+ @display_name = display_name
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# Creates a new Location object.
# For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
def create(params = {}, opts = {})
diff --git a/lib/stripe/services/terminal/reader_service.rb b/lib/stripe/services/terminal/reader_service.rb
index 59bb92cc..11817e1c 100644
--- a/lib/stripe/services/terminal/reader_service.rb
+++ b/lib/stripe/services/terminal/reader_service.rb
@@ -4,6 +4,272 @@
module Stripe
module Terminal
class ReaderService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The new label of the reader.
+ attr_accessor :label
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, label: nil, metadata: nil)
+ @expand = expand
+ @label = label
+ @metadata = metadata
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Filters readers by device type
+ attr_accessor :device_type
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # A location ID to filter the response list to only readers at the specific location
+ attr_accessor :location
+ # Filters readers by serial number
+ attr_accessor :serial_number
+ # 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.
+ attr_accessor :starting_after
+ # A status filter to filter readers to only offline or online readers
+ attr_accessor :status
+
+ def initialize(
+ device_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ location: nil,
+ serial_number: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @device_type = device_type
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @location = location
+ @serial_number = serial_number
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.
+ attr_accessor :label
+ # The location to assign the reader to.
+ attr_accessor :location
+ # 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`.
+ attr_accessor :metadata
+ # A code generated by the reader used for registering to an account.
+ attr_accessor :registration_code
+
+ def initialize(
+ expand: nil,
+ label: nil,
+ location: nil,
+ metadata: nil,
+ registration_code: nil
+ )
+ @expand = expand
+ @label = label
+ @location = location
+ @metadata = metadata
+ @registration_code = registration_code
+ end
+ end
+
+ class CancelActionParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ProcessPaymentIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ class Tipping < Stripe::RequestParams
+ # 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).
+ attr_accessor :amount_eligible
+
+ def initialize(amount_eligible: nil)
+ @amount_eligible = amount_eligible
+ end
+ end
+ # 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.
+ attr_accessor :allow_redisplay
+ # Enables cancel button on transaction screens.
+ attr_accessor :enable_customer_cancellation
+ # Override showing a tipping selection screen on this transaction.
+ attr_accessor :skip_tipping
+ # Tipping configuration for this transaction.
+ attr_accessor :tipping
+
+ def initialize(
+ allow_redisplay: nil,
+ enable_customer_cancellation: nil,
+ skip_tipping: nil,
+ tipping: nil
+ )
+ @allow_redisplay = allow_redisplay
+ @enable_customer_cancellation = enable_customer_cancellation
+ @skip_tipping = skip_tipping
+ @tipping = tipping
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # PaymentIntent ID
+ attr_accessor :payment_intent
+ # Configuration overrides
+ attr_accessor :process_config
+
+ def initialize(expand: nil, payment_intent: nil, process_config: nil)
+ @expand = expand
+ @payment_intent = payment_intent
+ @process_config = process_config
+ end
+ end
+
+ class ProcessSetupIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ attr_accessor :enable_customer_cancellation
+
+ def initialize(enable_customer_cancellation: nil)
+ @enable_customer_cancellation = enable_customer_cancellation
+ end
+ end
+ # 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.
+ attr_accessor :allow_redisplay
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Configuration overrides
+ attr_accessor :process_config
+ # SetupIntent ID
+ attr_accessor :setup_intent
+
+ def initialize(allow_redisplay: nil, expand: nil, process_config: nil, setup_intent: nil)
+ @allow_redisplay = allow_redisplay
+ @expand = expand
+ @process_config = process_config
+ @setup_intent = setup_intent
+ end
+ end
+
+ class RefundPaymentParams < Stripe::RequestParams
+ class RefundPaymentConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ attr_accessor :enable_customer_cancellation
+
+ def initialize(enable_customer_cancellation: nil)
+ @enable_customer_cancellation = enable_customer_cancellation
+ end
+ end
+ # A positive integer in __cents__ representing how much of this charge to refund.
+ attr_accessor :amount
+ # ID of the Charge to refund.
+ attr_accessor :charge
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # ID of the PaymentIntent to refund.
+ attr_accessor :payment_intent
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ attr_accessor :refund_application_fee
+ # Configuration overrides
+ attr_accessor :refund_payment_config
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
+ attr_accessor :reverse_transfer
+
+ def initialize(
+ amount: nil,
+ charge: nil,
+ expand: nil,
+ metadata: nil,
+ payment_intent: nil,
+ refund_application_fee: nil,
+ refund_payment_config: nil,
+ reverse_transfer: nil
+ )
+ @amount = amount
+ @charge = charge
+ @expand = expand
+ @metadata = metadata
+ @payment_intent = payment_intent
+ @refund_application_fee = refund_application_fee
+ @refund_payment_config = refund_payment_config
+ @reverse_transfer = reverse_transfer
+ end
+ end
+
+ class SetReaderDisplayParams < Stripe::RequestParams
+ class Cart < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The price of the item in cents.
+ attr_accessor :amount
+ # The description or name of the item.
+ attr_accessor :description
+ # The quantity of the line item being purchased.
+ attr_accessor :quantity
+
+ def initialize(amount: nil, description: nil, quantity: nil)
+ @amount = amount
+ @description = description
+ @quantity = quantity
+ end
+ end
+ # 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).
+ attr_accessor :currency
+ # Array of line items that were purchased.
+ attr_accessor :line_items
+ # The amount of tax in cents.
+ attr_accessor :tax
+ # Total balance of cart due in cents.
+ attr_accessor :total
+
+ def initialize(currency: nil, line_items: nil, tax: nil, total: nil)
+ @currency = currency
+ @line_items = line_items
+ @tax = tax
+ @total = total
+ end
+ end
+ # Cart
+ attr_accessor :cart
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Type
+ attr_accessor :type
+
+ def initialize(cart: nil, expand: nil, type: nil)
+ @cart = cart
+ @expand = expand
+ @type = type
+ end
+ end
+
# Cancels the current reader action.
def cancel_action(reader, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/confirmation_token_service.rb b/lib/stripe/services/test_helpers/confirmation_token_service.rb
index 716817ad..6f08908a 100644
--- a/lib/stripe/services/test_helpers/confirmation_token_service.rb
+++ b/lib/stripe/services/test_helpers/confirmation_token_service.rb
@@ -4,6 +4,648 @@
module Stripe
module TestHelpers
class ConfirmationTokenService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ attr_accessor :transit_number
+
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
+ @account_number = account_number
+ @institution_number = institution_number
+ @transit_number = transit_number
+ end
+ end
+
+ class Affirm < Stripe::RequestParams
+ end
+
+ class AfterpayClearpay < Stripe::RequestParams
+ end
+
+ class Alipay < Stripe::RequestParams
+ end
+
+ class Alma < Stripe::RequestParams
+ end
+
+ class AmazonPay < Stripe::RequestParams
+ end
+
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ attr_accessor :bsb_number
+
+ def initialize(account_number: nil, bsb_number: nil)
+ @account_number = account_number
+ @bsb_number = bsb_number
+ end
+ end
+
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ attr_accessor :sort_code
+
+ def initialize(account_number: nil, sort_code: nil)
+ @account_number = account_number
+ @sort_code = sort_code
+ end
+ end
+
+ class Bancontact < Stripe::RequestParams
+ end
+
+ class Billie < Stripe::RequestParams
+ end
+
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class Blik < Stripe::RequestParams
+ end
+
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ attr_accessor :tax_id
+
+ def initialize(tax_id: nil)
+ @tax_id = tax_id
+ end
+ end
+
+ class Cashapp < Stripe::RequestParams
+ end
+
+ class CustomerBalance < Stripe::RequestParams
+ end
+
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(account_holder_type: nil, bank: nil)
+ @account_holder_type = account_holder_type
+ @bank = bank
+ end
+ end
+
+ class Giropay < Stripe::RequestParams
+ end
+
+ class Grabpay < Stripe::RequestParams
+ end
+
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ end
+
+ class KakaoPay < Stripe::RequestParams
+ end
+
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+ # Customer's date of birth
+ attr_accessor :dob
+
+ def initialize(dob: nil)
+ @dob = dob
+ end
+ end
+
+ class Konbini < Stripe::RequestParams
+ end
+
+ class KrCard < Stripe::RequestParams
+ end
+
+ class Link < Stripe::RequestParams
+ end
+
+ class Mobilepay < Stripe::RequestParams
+ end
+
+ class Multibanco < Stripe::RequestParams
+ end
+
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ attr_accessor :funding
+
+ def initialize(funding: nil)
+ @funding = funding
+ end
+ end
+
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ attr_accessor :suffix
+
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @bank_code = bank_code
+ @branch_code = branch_code
+ @reference = reference
+ @suffix = suffix
+ end
+ end
+
+ class Oxxo < Stripe::RequestParams
+ end
+
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ attr_accessor :bank
+
+ def initialize(bank: nil)
+ @bank = bank
+ end
+ end
+
+ class PayByBank < Stripe::RequestParams
+ end
+
+ class Payco < Stripe::RequestParams
+ end
+
+ class Paynow < Stripe::RequestParams
+ end
+
+ class Paypal < Stripe::RequestParams
+ end
+
+ class Pix < Stripe::RequestParams
+ end
+
+ class Promptpay < Stripe::RequestParams
+ end
+
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ attr_accessor :session
+
+ def initialize(session: nil)
+ @session = session
+ end
+ end
+
+ class RevolutPay < Stripe::RequestParams
+ end
+
+ class SamsungPay < Stripe::RequestParams
+ end
+
+ class Satispay < Stripe::RequestParams
+ end
+
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ attr_accessor :iban
+
+ def initialize(iban: nil)
+ @iban = iban
+ end
+ end
+
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ attr_accessor :country
+
+ def initialize(country: nil)
+ @country = country
+ end
+ end
+
+ class Swish < Stripe::RequestParams
+ end
+
+ class Twint < Stripe::RequestParams
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+
+ class WechatPay < Stripe::RequestParams
+ end
+
+ class Zip < Stripe::RequestParams
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ attr_accessor :link
+ # 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`.
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ attr_accessor :zip
+
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ )
+ @acss_debit = acss_debit
+ @affirm = affirm
+ @afterpay_clearpay = afterpay_clearpay
+ @alipay = alipay
+ @allow_redisplay = allow_redisplay
+ @alma = alma
+ @amazon_pay = amazon_pay
+ @au_becs_debit = au_becs_debit
+ @bacs_debit = bacs_debit
+ @bancontact = bancontact
+ @billie = billie
+ @billing_details = billing_details
+ @blik = blik
+ @boleto = boleto
+ @cashapp = cashapp
+ @customer_balance = customer_balance
+ @eps = eps
+ @fpx = fpx
+ @giropay = giropay
+ @grabpay = grabpay
+ @ideal = ideal
+ @interac_present = interac_present
+ @kakao_pay = kakao_pay
+ @klarna = klarna
+ @konbini = konbini
+ @kr_card = kr_card
+ @link = link
+ @metadata = metadata
+ @mobilepay = mobilepay
+ @multibanco = multibanco
+ @naver_pay = naver_pay
+ @nz_bank_account = nz_bank_account
+ @oxxo = oxxo
+ @p24 = p24
+ @pay_by_bank = pay_by_bank
+ @payco = payco
+ @paynow = paynow
+ @paypal = paypal
+ @pix = pix
+ @promptpay = promptpay
+ @radar_options = radar_options
+ @revolut_pay = revolut_pay
+ @samsung_pay = samsung_pay
+ @satispay = satispay
+ @sepa_debit = sepa_debit
+ @sofort = sofort
+ @swish = swish
+ @twint = twint
+ @type = type
+ @us_bank_account = us_bank_account
+ @wechat_pay = wechat_pay
+ @zip = zip
+ end
+ end
+
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Shipping address
+ attr_accessor :address
+ # Recipient name.
+ attr_accessor :name
+ # Recipient phone (including extension)
+ attr_accessor :phone
+
+ def initialize(address: nil, name: nil, phone: nil)
+ @address = address
+ @name = name
+ @phone = phone
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # ID of an existing PaymentMethod.
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod.
+ attr_accessor :payment_method_data
+ # Return URL used to confirm the Intent.
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this ConfirmationToken's payment method.
+ #
+ # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
+ attr_accessor :setup_future_usage
+ # Shipping information for this ConfirmationToken.
+ attr_accessor :shipping
+
+ def initialize(
+ expand: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil
+ )
+ @expand = expand
+ @payment_method = payment_method
+ @payment_method_data = payment_method_data
+ @return_url = return_url
+ @setup_future_usage = setup_future_usage
+ @shipping = shipping
+ end
+ end
+
# Creates a test mode Confirmation Token server side for your integration tests.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/customer_service.rb b/lib/stripe/services/test_helpers/customer_service.rb
index a79c77c4..d9875b08 100644
--- a/lib/stripe/services/test_helpers/customer_service.rb
+++ b/lib/stripe/services/test_helpers/customer_service.rb
@@ -4,6 +4,24 @@
module Stripe
module TestHelpers
class CustomerService < StripeService
+ class FundCashBalanceParams < Stripe::RequestParams
+ # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
+ attr_accessor :reference
+
+ def initialize(amount: nil, currency: nil, expand: nil, reference: nil)
+ @amount = amount
+ @currency = currency
+ @expand = expand
+ @reference = reference
+ end
+ end
+
# Create an incoming testmode bank transfer
def fund_cash_balance(customer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/issuing/authorization_service.rb b/lib/stripe/services/test_helpers/issuing/authorization_service.rb
index 45c620db..b38b0c55 100644
--- a/lib/stripe/services/test_helpers/issuing/authorization_service.rb
+++ b/lib/stripe/services/test_helpers/issuing/authorization_service.rb
@@ -5,6 +5,751 @@ module Stripe
module TestHelpers
module Issuing
class AuthorizationService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class AmountDetails < Stripe::RequestParams
+ # The ATM withdrawal fee.
+ attr_accessor :atm_fee
+ # The amount of cash requested by the cardholder.
+ attr_accessor :cashback_amount
+
+ def initialize(atm_fee: nil, cashback_amount: nil)
+ @atm_fee = atm_fee
+ @cashback_amount = cashback_amount
+ end
+ end
+
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_accessor :category
+ # City where the seller is located
+ attr_accessor :city
+ # Country where the seller is located
+ attr_accessor :country
+ # Name of the seller
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ attr_accessor :postal_code
+ # State where the seller is located
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_accessor :url
+
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ )
+ @category = category
+ @city = city
+ @country = country
+ @name = name
+ @network_id = network_id
+ @postal_code = postal_code
+ @state = state
+ @terminal_id = terminal_id
+ @url = url
+ end
+ end
+
+ class NetworkData < Stripe::RequestParams
+ # Identifier assigned to the acquirer by the card network.
+ attr_accessor :acquiring_institution_id
+
+ def initialize(acquiring_institution_id: nil)
+ @acquiring_institution_id = acquiring_institution_id
+ end
+ end
+
+ class VerificationData < Stripe::RequestParams
+ class AuthenticationExemption < Stripe::RequestParams
+ # The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ attr_accessor :claimed_by
+ # The specific exemption claimed for this authorization.
+ attr_accessor :type
+
+ def initialize(claimed_by: nil, type: nil)
+ @claimed_by = claimed_by
+ @type = type
+ end
+ end
+
+ class ThreeDSecure < Stripe::RequestParams
+ # The outcome of the 3D Secure authentication request.
+ attr_accessor :result
+
+ def initialize(result: nil)
+ @result = result
+ end
+ end
+ # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.
+ attr_accessor :address_line1_check
+ # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.
+ attr_accessor :address_postal_code_check
+ # The exemption applied to this authorization.
+ attr_accessor :authentication_exemption
+ # Whether the cardholder provided a CVC and if it matched Stripe’s record.
+ attr_accessor :cvc_check
+ # Whether the cardholder provided an expiry date and if it matched Stripe’s record.
+ attr_accessor :expiry_check
+ # 3D Secure details.
+ attr_accessor :three_d_secure
+
+ def initialize(
+ address_line1_check: nil,
+ address_postal_code_check: nil,
+ authentication_exemption: nil,
+ cvc_check: nil,
+ expiry_check: nil,
+ three_d_secure: nil
+ )
+ @address_line1_check = address_line1_check
+ @address_postal_code_check = address_postal_code_check
+ @authentication_exemption = authentication_exemption
+ @cvc_check = cvc_check
+ @expiry_check = expiry_check
+ @three_d_secure = three_d_secure
+ end
+ end
+ # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount_details
+ # How the card details were provided. Defaults to online.
+ attr_accessor :authorization_method
+ # Card associated with this authorization.
+ attr_accessor :card
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Fleet-specific information for authorizations using Fleet cards.
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ attr_accessor :is_amount_controllable
+ # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :merchant_amount
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :merchant_currency
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ attr_accessor :merchant_data
+ # Details about the authorization, such as identifiers, set by the card network.
+ attr_accessor :network_data
+ # Verifications that Stripe performed on information that the cardholder provided to the merchant.
+ attr_accessor :verification_data
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ attr_accessor :wallet
+
+ def initialize(
+ amount: nil,
+ amount_details: nil,
+ authorization_method: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ fleet: nil,
+ fuel: nil,
+ is_amount_controllable: nil,
+ merchant_amount: nil,
+ merchant_currency: nil,
+ merchant_data: nil,
+ network_data: nil,
+ verification_data: nil,
+ wallet: nil
+ )
+ @amount = amount
+ @amount_details = amount_details
+ @authorization_method = authorization_method
+ @card = card
+ @currency = currency
+ @expand = expand
+ @fleet = fleet
+ @fuel = fuel
+ @is_amount_controllable = is_amount_controllable
+ @merchant_amount = merchant_amount
+ @merchant_currency = merchant_currency
+ @merchant_data = merchant_data
+ @network_data = network_data
+ @verification_data = verification_data
+ @wallet = wallet
+ end
+ end
+
+ class CaptureParams < Stripe::RequestParams
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_accessor :departure_airport_code
+ # The flight number.
+ attr_accessor :flight_number
+ # The flight's service class.
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_accessor :stopover_allowed
+
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ )
+ @arrival_airport_code = arrival_airport_code
+ @carrier = carrier
+ @departure_airport_code = departure_airport_code
+ @flight_number = flight_number
+ @service_class = service_class
+ @stopover_allowed = stopover_allowed
+ end
+ end
+ # The time that the flight departed.
+ attr_accessor :departure_at
+ # The name of the passenger.
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ attr_accessor :refundable
+ # The legs of the trip.
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ attr_accessor :travel_agency
+
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ )
+ @departure_at = departure_at
+ @passenger_name = passenger_name
+ @refundable = refundable
+ @segments = segments
+ @travel_agency = travel_agency
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_accessor :nights
+
+ def initialize(check_in_at: nil, nights: nil)
+ @check_in_at = check_in_at
+ @nights = nights
+ end
+ end
+
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ attr_accessor :description
+ # Attribute for param field quantity
+ attr_accessor :quantity
+ # Attribute for param field total
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ attr_accessor :unit_cost
+
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
+ @description = description
+ @quantity = quantity
+ @total = total
+ @unit_cost = unit_cost
+ end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_accessor :lodging
+ # The line items in the purchase.
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ attr_accessor :reference
+
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ )
+ @fleet = fleet
+ @flight = flight
+ @fuel = fuel
+ @lodging = lodging
+ @receipt = receipt
+ @reference = reference
+ end
+ end
+ # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :capture_amount
+ # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.
+ attr_accessor :close_authorization
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_accessor :purchase_details
+
+ def initialize(
+ capture_amount: nil,
+ close_authorization: nil,
+ expand: nil,
+ purchase_details: nil
+ )
+ @capture_amount = capture_amount
+ @close_authorization = close_authorization
+ @expand = expand
+ @purchase_details = purchase_details
+ end
+ end
+
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FinalizeAmountParams < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :final_amount
+ # Fleet-specific information for authorizations using Fleet cards.
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+
+ def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil)
+ @expand = expand
+ @final_amount = final_amount
+ @fleet = fleet
+ @fuel = fuel
+ end
+ end
+
+ class RespondParams < Stripe::RequestParams
+ # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).
+ attr_accessor :confirmed
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(confirmed: nil, expand: nil)
+ @confirmed = confirmed
+ @expand = expand
+ end
+ end
+
+ class IncrementParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :increment_amount
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ attr_accessor :is_amount_controllable
+
+ def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil)
+ @expand = expand
+ @increment_amount = increment_amount
+ @is_amount_controllable = is_amount_controllable
+ end
+ end
+
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :reverse_amount
+
+ def initialize(expand: nil, reverse_amount: nil)
+ @expand = expand
+ @reverse_amount = reverse_amount
+ end
+ end
+
# Capture a test-mode authorization.
def capture(authorization, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/issuing/card_service.rb b/lib/stripe/services/test_helpers/issuing/card_service.rb
index 00f65512..bc194543 100644
--- a/lib/stripe/services/test_helpers/issuing/card_service.rb
+++ b/lib/stripe/services/test_helpers/issuing/card_service.rb
@@ -5,6 +5,51 @@ module Stripe
module TestHelpers
module Issuing
class CardService < StripeService
+ class DeliverCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class FailCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReturnCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ShipCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class SubmitCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Updates the shipping status of the specified Issuing Card object to delivered.
def deliver_card(card, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb b/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb
index cebb3fc9..a4fc2d39 100644
--- a/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb
+++ b/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb
@@ -5,6 +5,47 @@ module Stripe
module TestHelpers
module Issuing
class PersonalizationDesignService < StripeService
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class RejectParams < Stripe::RequestParams
+ class RejectionReasons < Stripe::RequestParams
+ # The reason(s) the card logo was rejected.
+ attr_accessor :card_logo
+ # The reason(s) the carrier text was rejected.
+ attr_accessor :carrier_text
+
+ def initialize(card_logo: nil, carrier_text: nil)
+ @card_logo = card_logo
+ @carrier_text = carrier_text
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The reason(s) the personalization design was rejected.
+ attr_accessor :rejection_reasons
+
+ def initialize(expand: nil, rejection_reasons: nil)
+ @expand = expand
+ @rejection_reasons = rejection_reasons
+ end
+ end
+
# Updates the status of the specified testmode personalization design object to active.
def activate(personalization_design, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/issuing/transaction_service.rb b/lib/stripe/services/test_helpers/issuing/transaction_service.rb
index 021d133d..568a6469 100644
--- a/lib/stripe/services/test_helpers/issuing/transaction_service.rb
+++ b/lib/stripe/services/test_helpers/issuing/transaction_service.rb
@@ -5,6 +5,638 @@ module Stripe
module TestHelpers
module Issuing
class TransactionService < StripeService
+ class RefundParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :refund_amount
+
+ def initialize(expand: nil, refund_amount: nil)
+ @expand = expand
+ @refund_amount = refund_amount
+ end
+ end
+
+ class CreateForceCaptureParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_accessor :category
+ # City where the seller is located
+ attr_accessor :city
+ # Country where the seller is located
+ attr_accessor :country
+ # Name of the seller
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ attr_accessor :postal_code
+ # State where the seller is located
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_accessor :url
+
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ )
+ @category = category
+ @city = city
+ @country = country
+ @name = name
+ @network_id = network_id
+ @postal_code = postal_code
+ @state = state
+ @terminal_id = terminal_id
+ @url = url
+ end
+ end
+
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_accessor :departure_airport_code
+ # The flight number.
+ attr_accessor :flight_number
+ # The flight's service class.
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_accessor :stopover_allowed
+
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ )
+ @arrival_airport_code = arrival_airport_code
+ @carrier = carrier
+ @departure_airport_code = departure_airport_code
+ @flight_number = flight_number
+ @service_class = service_class
+ @stopover_allowed = stopover_allowed
+ end
+ end
+ # The time that the flight departed.
+ attr_accessor :departure_at
+ # The name of the passenger.
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ attr_accessor :refundable
+ # The legs of the trip.
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ attr_accessor :travel_agency
+
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ )
+ @departure_at = departure_at
+ @passenger_name = passenger_name
+ @refundable = refundable
+ @segments = segments
+ @travel_agency = travel_agency
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_accessor :nights
+
+ def initialize(check_in_at: nil, nights: nil)
+ @check_in_at = check_in_at
+ @nights = nights
+ end
+ end
+
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ attr_accessor :description
+ # Attribute for param field quantity
+ attr_accessor :quantity
+ # Attribute for param field total
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ attr_accessor :unit_cost
+
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
+ @description = description
+ @quantity = quantity
+ @total = total
+ @unit_cost = unit_cost
+ end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_accessor :lodging
+ # The line items in the purchase.
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ attr_accessor :reference
+
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ )
+ @fleet = fleet
+ @flight = flight
+ @fuel = fuel
+ @lodging = lodging
+ @receipt = receipt
+ @reference = reference
+ end
+ end
+ # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Card associated with this transaction.
+ attr_accessor :card
+ # The currency of the capture. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_accessor :purchase_details
+
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ )
+ @amount = amount
+ @card = card
+ @currency = currency
+ @expand = expand
+ @merchant_data = merchant_data
+ @purchase_details = purchase_details
+ end
+ end
+
+ class CreateUnlinkedRefundParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ attr_accessor :category
+ # City where the seller is located
+ attr_accessor :city
+ # Country where the seller is located
+ attr_accessor :country
+ # Name of the seller
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ attr_accessor :postal_code
+ # State where the seller is located
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ attr_accessor :url
+
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ )
+ @category = category
+ @city = city
+ @country = country
+ @name = name
+ @network_id = network_id
+ @postal_code = postal_code
+ @state = state
+ @terminal_id = terminal_id
+ @url = url
+ end
+ end
+
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ attr_accessor :driver_id
+ # Odometer reading.
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ attr_accessor :unspecified_id
+ # User ID.
+ attr_accessor :user_id
+ # Vehicle number.
+ attr_accessor :vehicle_number
+
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ )
+ @driver_id = driver_id
+ @odometer = odometer
+ @unspecified_id = unspecified_id
+ @user_id = user_id
+ @vehicle_number = vehicle_number
+ end
+ end
+
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ attr_accessor :gross_amount_decimal
+
+ def initialize(gross_amount_decimal: nil)
+ @gross_amount_decimal = gross_amount_decimal
+ end
+ end
+
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ attr_accessor :national_amount_decimal
+
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
+ @local_amount_decimal = local_amount_decimal
+ @national_amount_decimal = national_amount_decimal
+ end
+ end
+ # Breakdown of fuel portion of the purchase.
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ attr_accessor :tax
+
+ def initialize(fuel: nil, non_fuel: nil, tax: nil)
+ @fuel = fuel
+ @non_fuel = non_fuel
+ @tax = tax
+ end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ attr_accessor :service_type
+
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ )
+ @cardholder_prompt_data = cardholder_prompt_data
+ @purchase_type = purchase_type
+ @reported_breakdown = reported_breakdown
+ @service_type = service_type
+ end
+ end
+
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ attr_accessor :departure_airport_code
+ # The flight number.
+ attr_accessor :flight_number
+ # The flight's service class.
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ attr_accessor :stopover_allowed
+
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ )
+ @arrival_airport_code = arrival_airport_code
+ @carrier = carrier
+ @departure_airport_code = departure_airport_code
+ @flight_number = flight_number
+ @service_class = service_class
+ @stopover_allowed = stopover_allowed
+ end
+ end
+ # The time that the flight departed.
+ attr_accessor :departure_at
+ # The name of the passenger.
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ attr_accessor :refundable
+ # The legs of the trip.
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ attr_accessor :travel_agency
+
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ )
+ @departure_at = departure_at
+ @passenger_name = passenger_name
+ @refundable = refundable
+ @segments = segments
+ @travel_agency = travel_agency
+ end
+ end
+
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ attr_accessor :unit_cost_decimal
+
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ )
+ @industry_product_code = industry_product_code
+ @quantity_decimal = quantity_decimal
+ @type = type
+ @unit = unit
+ @unit_cost_decimal = unit_cost_decimal
+ end
+ end
+
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ attr_accessor :nights
+
+ def initialize(check_in_at: nil, nights: nil)
+ @check_in_at = check_in_at
+ @nights = nights
+ end
+ end
+
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ attr_accessor :description
+ # Attribute for param field quantity
+ attr_accessor :quantity
+ # Attribute for param field total
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ attr_accessor :unit_cost
+
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
+ @description = description
+ @quantity = quantity
+ @total = total
+ @unit_cost = unit_cost
+ end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ attr_accessor :lodging
+ # The line items in the purchase.
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ attr_accessor :reference
+
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ )
+ @fleet = fleet
+ @flight = flight
+ @fuel = fuel
+ @lodging = lodging
+ @receipt = receipt
+ @reference = reference
+ end
+ end
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ attr_accessor :amount
+ # Card associated with this unlinked refund transaction.
+ attr_accessor :card
+ # The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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).
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ attr_accessor :purchase_details
+
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ )
+ @amount = amount
+ @card = card
+ @currency = currency
+ @expand = expand
+ @merchant_data = merchant_data
+ @purchase_details = purchase_details
+ end
+ end
+
# Allows the user to capture an arbitrary amount, also known as a forced capture.
def create_force_capture(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/refund_service.rb b/lib/stripe/services/test_helpers/refund_service.rb
index 0811af64..13973d74 100644
--- a/lib/stripe/services/test_helpers/refund_service.rb
+++ b/lib/stripe/services/test_helpers/refund_service.rb
@@ -4,6 +4,15 @@
module Stripe
module TestHelpers
class RefundService < StripeService
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Expire a refund with a status of requires_action.
def expire(refund, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/terminal/reader_service.rb b/lib/stripe/services/test_helpers/terminal/reader_service.rb
index eef9a3da..d4237a41 100644
--- a/lib/stripe/services/test_helpers/terminal/reader_service.rb
+++ b/lib/stripe/services/test_helpers/terminal/reader_service.rb
@@ -5,6 +5,50 @@ module Stripe
module TestHelpers
module Terminal
class ReaderService < StripeService
+ class PresentPaymentMethodParams < Stripe::RequestParams
+ class CardPresent < Stripe::RequestParams
+ # The card number, as a string without any separators.
+ attr_accessor :number
+
+ def initialize(number: nil)
+ @number = number
+ end
+ end
+
+ class InteracPresent < Stripe::RequestParams
+ # Card Number
+ attr_accessor :number
+
+ def initialize(number: nil)
+ @number = number
+ end
+ end
+ # Simulated on-reader tip amount.
+ attr_accessor :amount_tip
+ # Simulated data for the card_present payment method.
+ attr_accessor :card_present
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Simulated data for the interac_present payment method.
+ attr_accessor :interac_present
+ # Simulated payment type.
+ attr_accessor :type
+
+ def initialize(
+ amount_tip: nil,
+ card_present: nil,
+ expand: nil,
+ interac_present: nil,
+ type: nil
+ )
+ @amount_tip = amount_tip
+ @card_present = card_present
+ @expand = expand
+ @interac_present = interac_present
+ @type = type
+ end
+ end
+
# Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
def present_payment_method(reader, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/test_clock_service.rb b/lib/stripe/services/test_helpers/test_clock_service.rb
index 36b66380..e2c2b3b8 100644
--- a/lib/stripe/services/test_helpers/test_clock_service.rb
+++ b/lib/stripe/services/test_helpers/test_clock_service.rb
@@ -4,6 +4,63 @@
module Stripe
module TestHelpers
class TestClockService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The initial frozen time for this test clock.
+ attr_accessor :frozen_time
+ # The name for this test clock.
+ attr_accessor :name
+
+ def initialize(expand: nil, frozen_time: nil, name: nil)
+ @expand = expand
+ @frozen_time = frozen_time
+ @name = name
+ end
+ end
+
+ class AdvanceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.
+ attr_accessor :frozen_time
+
+ def initialize(expand: nil, frozen_time: nil)
+ @expand = expand
+ @frozen_time = frozen_time
+ end
+ end
+
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
def advance(test_clock, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb b/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb
index ac85f223..ffd2694c 100644
--- a/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb
+++ b/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb
@@ -5,6 +5,44 @@ module Stripe
module TestHelpers
module Treasury
class InboundTransferService < StripeService
+ class FailParams < Stripe::RequestParams
+ class FailureDetails < Stripe::RequestParams
+ # Reason for the failure.
+ attr_accessor :code
+
+ def initialize(code: nil)
+ @code = code
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about a failed InboundTransfer.
+ attr_accessor :failure_details
+
+ def initialize(expand: nil, failure_details: nil)
+ @expand = expand
+ @failure_details = failure_details
+ end
+ end
+
+ class ReturnInboundTransferParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class SucceedParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
def fail(id, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb b/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb
index fd4fcd44..7acab9b8 100644
--- a/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb
+++ b/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb
@@ -5,6 +5,93 @@ module Stripe
module TestHelpers
module Treasury
class OutboundPaymentService < StripeService
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ attr_accessor :trace_id
+
+ def initialize(trace_id: nil)
+ @trace_id = trace_id
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :omad
+
+ def initialize(chips: nil, imad: nil, omad: nil)
+ @chips = chips
+ @imad = imad
+ @omad = omad
+ end
+ end
+ # ACH network tracking details.
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil)
+ @ach = ach
+ @type = type
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ attr_accessor :tracking_details
+
+ def initialize(expand: nil, tracking_details: nil)
+ @expand = expand
+ @tracking_details = tracking_details
+ end
+ end
+
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReturnOutboundPaymentParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # The return code to be set on the OutboundPayment object.
+ attr_accessor :code
+
+ def initialize(code: nil)
+ @code = code
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Optional hash to set the return code.
+ attr_accessor :returned_details
+
+ def initialize(expand: nil, returned_details: nil)
+ @expand = expand
+ @returned_details = returned_details
+ end
+ end
+
# Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
def fail(id, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb b/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb
index c5716bd9..bebd5c54 100644
--- a/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb
+++ b/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb
@@ -5,6 +5,93 @@ module Stripe
module TestHelpers
module Treasury
class OutboundTransferService < StripeService
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ attr_accessor :trace_id
+
+ def initialize(trace_id: nil)
+ @trace_id = trace_id
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ attr_accessor :omad
+
+ def initialize(chips: nil, imad: nil, omad: nil)
+ @chips = chips
+ @imad = imad
+ @omad = omad
+ end
+ end
+ # ACH network tracking details.
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil)
+ @ach = ach
+ @type = type
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ attr_accessor :tracking_details
+
+ def initialize(expand: nil, tracking_details: nil)
+ @expand = expand
+ @tracking_details = tracking_details
+ end
+ end
+
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class ReturnOutboundTransferParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # Reason for the return.
+ attr_accessor :code
+
+ def initialize(code: nil)
+ @code = code
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Details about a returned OutboundTransfer.
+ attr_accessor :returned_details
+
+ def initialize(expand: nil, returned_details: nil)
+ @expand = expand
+ @returned_details = returned_details
+ end
+ end
+
# Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
def fail(outbound_transfer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/treasury/received_credit_service.rb b/lib/stripe/services/test_helpers/treasury/received_credit_service.rb
index f5a033aa..53e76a28 100644
--- a/lib/stripe/services/test_helpers/treasury/received_credit_service.rb
+++ b/lib/stripe/services/test_helpers/treasury/received_credit_service.rb
@@ -5,6 +5,66 @@ module Stripe
module TestHelpers
module Treasury
class ReceivedCreditService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ attr_accessor :account_holder_name
+ # The bank account number.
+ attr_accessor :account_number
+ # The bank account's routing number.
+ attr_accessor :routing_number
+
+ def initialize(account_holder_name: nil, account_number: nil, routing_number: nil)
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @routing_number = routing_number
+ end
+ end
+ # The source type.
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(type: nil, us_bank_account: nil)
+ @type = type
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @financial_account = financial_account
+ @initiating_payment_method_details = initiating_payment_method_details
+ @network = network
+ end
+ end
+
# Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/test_helpers/treasury/received_debit_service.rb b/lib/stripe/services/test_helpers/treasury/received_debit_service.rb
index cf0ca97c..b281d0ac 100644
--- a/lib/stripe/services/test_helpers/treasury/received_debit_service.rb
+++ b/lib/stripe/services/test_helpers/treasury/received_debit_service.rb
@@ -5,6 +5,66 @@ module Stripe
module TestHelpers
module Treasury
class ReceivedDebitService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ attr_accessor :account_holder_name
+ # The bank account number.
+ attr_accessor :account_number
+ # The bank account's routing number.
+ attr_accessor :routing_number
+
+ def initialize(account_holder_name: nil, account_number: nil, routing_number: nil)
+ @account_holder_name = account_holder_name
+ @account_number = account_number
+ @routing_number = routing_number
+ end
+ end
+ # The source type.
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(type: nil, us_bank_account: nil)
+ @type = type
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @financial_account = financial_account
+ @initiating_payment_method_details = initiating_payment_method_details
+ @network = network
+ end
+ end
+
# Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/token_service.rb b/lib/stripe/services/token_service.rb
index 49994a74..c1879557 100644
--- a/lib/stripe/services/token_service.rb
+++ b/lib/stripe/services/token_service.rb
@@ -3,6 +3,1146 @@
module Stripe
class TokenService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document verifying the business.
+ attr_accessor :document
+
+ def initialize(document: nil)
+ @document = document
+ end
+ end
+ # The company's primary address.
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ attr_accessor :ownership_declaration
+ # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct.
+ attr_accessor :ownership_declaration_shown_and_signed
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_declaration_shown_and_signed: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @directors_provided = directors_provided
+ @directorship_declaration = directorship_declaration
+ @executives_provided = executives_provided
+ @export_license_id = export_license_id
+ @export_purpose_code = export_purpose_code
+ @name = name
+ @name_kana = name_kana
+ @name_kanji = name_kanji
+ @owners_provided = owners_provided
+ @ownership_declaration = ownership_declaration
+ @ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed
+ @ownership_exemption_reason = ownership_exemption_reason
+ @phone = phone
+ @registration_number = registration_number
+ @structure = structure
+ @tax_id = tax_id
+ @tax_id_registrar = tax_id_registrar
+ @vat_id = vat_id
+ @verification = verification
+ end
+ end
+
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ )
+ @director = director
+ @executive = executive
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # The individual's primary address.
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ attr_accessor :dob
+ # The individual's email address.
+ attr_accessor :email
+ # The individual's first name.
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The individual's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ attr_accessor :verification
+
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+ # The business type.
+ attr_accessor :business_type
+ # Information about the company or business.
+ attr_accessor :company
+ # Information about the person represented by the account.
+ attr_accessor :individual
+ # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
+ attr_accessor :tos_shown_and_accepted
+
+ def initialize(
+ business_type: nil,
+ company: nil,
+ individual: nil,
+ tos_shown_and_accepted: nil
+ )
+ @business_type = business_type
+ @company = company
+ @individual = individual
+ @tos_shown_and_accepted = tos_shown_and_accepted
+ end
+ end
+
+ class BankAccount < Stripe::RequestParams
+ # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ attr_accessor :account_number
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ attr_accessor :account_type
+ # The country in which the bank account is located.
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts)
+ attr_accessor :currency
+ # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`.
+ attr_accessor :payment_method
+ # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ country: nil,
+ currency: nil,
+ payment_method: nil,
+ routing_number: nil
+ )
+ @account_holder_name = account_holder_name
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @country = country
+ @currency = currency
+ @payment_method = payment_method
+ @routing_number = routing_number
+ end
+ end
+
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ attr_accessor :preferred
+
+ def initialize(preferred: nil)
+ @preferred = preferred
+ end
+ end
+ # City / District / Suburb / Town / Village.
+ attr_accessor :address_city
+ # Billing address country, if provided.
+ attr_accessor :address_country
+ # Address line 1 (Street address / PO Box / Company name).
+ attr_accessor :address_line1
+ # Address line 2 (Apartment / Suite / Unit / Building).
+ attr_accessor :address_line2
+ # State / County / Province / Region.
+ attr_accessor :address_state
+ # ZIP or postal code.
+ attr_accessor :address_zip
+ # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.
+ attr_accessor :currency
+ # Card security code. Highly recommended to always include this value.
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ attr_accessor :exp_month
+ # Two- or four-digit number representing the card's expiration year.
+ attr_accessor :exp_year
+ # Cardholder's full name.
+ attr_accessor :name
+ # Contains information about card networks used to process the payment.
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ attr_accessor :number
+
+ def initialize(
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ networks: nil,
+ number: nil
+ )
+ @address_city = address_city
+ @address_country = address_country
+ @address_line1 = address_line1
+ @address_line2 = address_line2
+ @address_state = address_state
+ @address_zip = address_zip
+ @currency = currency
+ @cvc = cvc
+ @exp_month = exp_month
+ @exp_year = exp_year
+ @name = name
+ @networks = networks
+ @number = number
+ end
+ end
+
+ class CvcUpdate < Stripe::RequestParams
+ # The CVC value, in string form.
+ attr_accessor :cvc
+
+ def initialize(cvc: nil)
+ @cvc = cvc
+ end
+ end
+
+ class Person < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ attr_accessor :user_agent
+
+ def initialize(date: nil, ip: nil, user_agent: nil)
+ @date = date
+ @ip = ip
+ @user_agent = user_agent
+ end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ attr_accessor :account
+
+ def initialize(account: nil)
+ @account = account
+ end
+ end
+
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Block or building number.
+ attr_accessor :line1
+ # Building details.
+ attr_accessor :line2
+ # Postal code.
+ attr_accessor :postal_code
+ # Prefecture.
+ attr_accessor :state
+ # Town or cho-me.
+ attr_accessor :town
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ @town = town
+ end
+ end
+
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ attr_accessor :month
+ # The four-digit year of birth.
+ attr_accessor :year
+
+ def initialize(day: nil, month: nil, year: nil)
+ @day = day
+ @month = month
+ @year = year
+ end
+ end
+
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ attr_accessor :files
+
+ def initialize(files: nil)
+ @files = files
+ end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ attr_accessor :visa
+
+ def initialize(company_authorization: nil, passport: nil, visa: nil)
+ @company_authorization = company_authorization
+ @passport = passport
+ @visa = visa
+ end
+ end
+
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ attr_accessor :title
+
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ )
+ @authorizer = authorizer
+ @director = director
+ @executive = executive
+ @legal_guardian = legal_guardian
+ @owner = owner
+ @percent_ownership = percent_ownership
+ @representative = representative
+ @title = title
+ end
+ end
+
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ attr_accessor :front
+
+ def initialize(back: nil, front: nil)
+ @back = back
+ @front = front
+ end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ attr_accessor :document
+
+ def initialize(additional_document: nil, document: nil)
+ @additional_document = additional_document
+ @document = document
+ end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ attr_accessor :documents
+ # The person's email address.
+ attr_accessor :email
+ # The person's first name.
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ attr_accessor :maiden_name
+ # 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`.
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ attr_accessor :nationality
+ # The person's phone number.
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ attr_accessor :political_exposure
+ # The person's registered address.
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ attr_accessor :verification
+
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ )
+ @additional_tos_acceptances = additional_tos_acceptances
+ @address = address
+ @address_kana = address_kana
+ @address_kanji = address_kanji
+ @dob = dob
+ @documents = documents
+ @email = email
+ @first_name = first_name
+ @first_name_kana = first_name_kana
+ @first_name_kanji = first_name_kanji
+ @full_name_aliases = full_name_aliases
+ @gender = gender
+ @id_number = id_number
+ @id_number_secondary = id_number_secondary
+ @last_name = last_name
+ @last_name_kana = last_name_kana
+ @last_name_kanji = last_name_kanji
+ @maiden_name = maiden_name
+ @metadata = metadata
+ @nationality = nationality
+ @phone = phone
+ @political_exposure = political_exposure
+ @registered_address = registered_address
+ @relationship = relationship
+ @ssn_last_4 = ssn_last_4
+ @verification = verification
+ end
+ end
+
+ class Pii < Stripe::RequestParams
+ # The `id_number` for the PII, in string form.
+ attr_accessor :id_number
+
+ def initialize(id_number: nil)
+ @id_number = id_number
+ end
+ end
+ # Information for the account this token represents.
+ attr_accessor :account
+ # The bank account this token will represent.
+ attr_accessor :bank_account
+ # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
+ attr_accessor :card
+ # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
+ attr_accessor :customer
+ # The updated CVC value this token represents.
+ attr_accessor :cvc_update
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Information for the person this token represents.
+ attr_accessor :person
+ # The PII this token represents.
+ attr_accessor :pii
+
+ def initialize(
+ account: nil,
+ bank_account: nil,
+ card: nil,
+ customer: nil,
+ cvc_update: nil,
+ expand: nil,
+ person: nil,
+ pii: nil
+ )
+ @account = account
+ @bank_account = bank_account
+ @card = card
+ @customer = customer
+ @cvc_update = cvc_update
+ @expand = expand
+ @person = person
+ @pii = pii
+ end
+ end
+
# Creates a single-use token that represents a bank account's details.
# You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
def create(params = {}, opts = {})
diff --git a/lib/stripe/services/topup_service.rb b/lib/stripe/services/topup_service.rb
index cafa677f..b5430cc4 100644
--- a/lib/stripe/services/topup_service.rb
+++ b/lib/stripe/services/topup_service.rb
@@ -3,6 +3,148 @@
module Stripe
class TopupService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # A positive integer representing how much to transfer.
+ attr_accessor :amount
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.
+ attr_accessor :status
+
+ def initialize(
+ amount: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @amount = amount
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer representing how much to transfer.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).
+ attr_accessor :source
+ # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.
+ attr_accessor :statement_descriptor
+ # A string that identifies this top-up as part of a group.
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ source: nil,
+ statement_descriptor: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @source = source
+ @statement_descriptor = statement_descriptor
+ @transfer_group = transfer_group
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(description: nil, expand: nil, metadata: nil)
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Cancels a top-up. Only pending top-ups can be canceled.
def cancel(topup, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/transfer_reversal_service.rb b/lib/stripe/services/transfer_reversal_service.rb
index 4f300086..33ea03b5 100644
--- a/lib/stripe/services/transfer_reversal_service.rb
+++ b/lib/stripe/services/transfer_reversal_service.rb
@@ -3,6 +3,72 @@
module Stripe
class TransferReversalService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.
+ attr_accessor :amount
+ # An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.
+ attr_accessor :refund_application_fee
+
+ def initialize(
+ amount: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ refund_application_fee: nil
+ )
+ @amount = amount
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ @refund_application_fee = refund_application_fee
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(expand: nil, metadata: nil)
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# When you create a new reversal, you must specify a transfer to create it on.
#
# When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.
diff --git a/lib/stripe/services/transfer_service.rb b/lib/stripe/services/transfer_service.rb
index 3c7cdc69..38400aa1 100644
--- a/lib/stripe/services/transfer_service.rb
+++ b/lib/stripe/services/transfer_service.rb
@@ -10,6 +10,125 @@ module Stripe
@reversals = Stripe::TransferReversalService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return transfers that were created during the given date interval.
+ attr_accessor :created
+ # Only return transfers for the destination specified by this account ID.
+ attr_accessor :destination
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return transfers with the specified transfer group.
+ attr_accessor :transfer_group
+
+ def initialize(
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transfer_group: nil
+ )
+ @created = created
+ @destination = destination
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ @transfer_group = transfer_group
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents (or local equivalent) representing how much to transfer.
+ attr_accessor :amount
+ # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The ID of a connected Stripe account. See the Connect documentation for details.
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
+ attr_accessor :source_transaction
+ # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.
+ attr_accessor :source_type
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ attr_accessor :transfer_group
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ source_transaction: nil,
+ source_type: nil,
+ transfer_group: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @destination = destination
+ @expand = expand
+ @metadata = metadata
+ @source_transaction = source_transaction
+ @source_type = source_type
+ @transfer_group = transfer_group
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+
+ def initialize(description: nil, expand: nil, metadata: nil)
+ @description = description
+ @expand = expand
+ @metadata = metadata
+ end
+ end
+
# To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/transfers", params: params, opts: opts, base_address: :api)
diff --git a/lib/stripe/services/treasury/credit_reversal_service.rb b/lib/stripe/services/treasury/credit_reversal_service.rb
index 1ae6aafa..24bda434 100644
--- a/lib/stripe/services/treasury/credit_reversal_service.rb
+++ b/lib/stripe/services/treasury/credit_reversal_service.rb
@@ -4,6 +4,65 @@
module Stripe
module Treasury
class CreditReversalService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return CreditReversals for the ReceivedCredit ID.
+ attr_accessor :received_credit
+ # 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.
+ attr_accessor :starting_after
+ # Only return CreditReversals for a given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_credit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @received_credit = received_credit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ReceivedCredit to reverse.
+ attr_accessor :received_credit
+
+ def initialize(expand: nil, metadata: nil, received_credit: nil)
+ @expand = expand
+ @metadata = metadata
+ @received_credit = received_credit
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Reverses a ReceivedCredit and creates a CreditReversal object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/debit_reversal_service.rb b/lib/stripe/services/treasury/debit_reversal_service.rb
index 03cfc39f..a57a2931 100644
--- a/lib/stripe/services/treasury/debit_reversal_service.rb
+++ b/lib/stripe/services/treasury/debit_reversal_service.rb
@@ -4,6 +4,69 @@
module Stripe
module Treasury
class DebitReversalService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return DebitReversals for the ReceivedDebit ID.
+ attr_accessor :received_debit
+ # Only return DebitReversals for a given resolution.
+ attr_accessor :resolution
+ # 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.
+ attr_accessor :starting_after
+ # Only return DebitReversals for a given status.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_debit: nil,
+ resolution: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @received_debit = received_debit
+ @resolution = resolution
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The ReceivedDebit to reverse.
+ attr_accessor :received_debit
+
+ def initialize(expand: nil, metadata: nil, received_debit: nil)
+ @expand = expand
+ @metadata = metadata
+ @received_debit = received_debit
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Reverses a ReceivedDebit and creates a DebitReversal object.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/financial_account_features_service.rb b/lib/stripe/services/treasury/financial_account_features_service.rb
index 5255a1ec..161d5bec 100644
--- a/lib/stripe/services/treasury/financial_account_features_service.rb
+++ b/lib/stripe/services/treasury/financial_account_features_service.rb
@@ -4,6 +4,172 @@
module Stripe
module Treasury
class FinancialAccountFeaturesService < StripeService
+ class UpdateParams < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ attr_accessor :aba
+
+ def initialize(aba: nil)
+ @aba = aba
+ end
+ end
+
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ attr_accessor :ach
+
+ def initialize(ach: nil)
+ @ach = ach
+ end
+ end
+
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ attr_accessor :deposit_insurance
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ attr_accessor :outbound_transfers
+
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ expand: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ )
+ @card_issuing = card_issuing
+ @deposit_insurance = deposit_insurance
+ @expand = expand
+ @financial_addresses = financial_addresses
+ @inbound_transfers = inbound_transfers
+ @intra_stripe_flows = intra_stripe_flows
+ @outbound_payments = outbound_payments
+ @outbound_transfers = outbound_transfers
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieves Features information associated with the FinancialAccount.
def retrieve(financial_account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/financial_account_service.rb b/lib/stripe/services/treasury/financial_account_service.rb
index eaf694b7..294cc48f 100644
--- a/lib/stripe/services/treasury/financial_account_service.rb
+++ b/lib/stripe/services/treasury/financial_account_service.rb
@@ -11,6 +11,490 @@ module Stripe
@features = Stripe::Treasury::FinancialAccountFeaturesService.new(@requestor)
end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return FinancialAccounts that were created during the given date interval.
+ attr_accessor :created
+ # An object ID cursor for use in pagination.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit ranging from 1 to 100 (defaults to 10).
+ attr_accessor :limit
+ # An object ID cursor for use in pagination.
+ attr_accessor :starting_after
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ attr_accessor :aba
+
+ def initialize(aba: nil)
+ @aba = aba
+ end
+ end
+
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ attr_accessor :ach
+
+ def initialize(ach: nil)
+ @ach = ach
+ end
+ end
+
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ attr_accessor :outbound_transfers
+
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ )
+ @card_issuing = card_issuing
+ @deposit_insurance = deposit_insurance
+ @financial_addresses = financial_addresses
+ @inbound_transfers = inbound_transfers
+ @intra_stripe_flows = intra_stripe_flows
+ @outbound_payments = outbound_payments
+ @outbound_transfers = outbound_transfers
+ end
+ end
+
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ attr_accessor :outbound_flows
+
+ def initialize(inbound_flows: nil, outbound_flows: nil)
+ @inbound_flows = inbound_flows
+ @outbound_flows = outbound_flows
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
+ attr_accessor :features
+ # 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`.
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ attr_accessor :platform_restrictions
+ # The currencies the FinancialAccount can hold a balance in.
+ attr_accessor :supported_currencies
+
+ def initialize(
+ expand: nil,
+ features: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil,
+ supported_currencies: nil
+ )
+ @expand = expand
+ @features = features
+ @metadata = metadata
+ @nickname = nickname
+ @platform_restrictions = platform_restrictions
+ @supported_currencies = supported_currencies
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ attr_accessor :aba
+
+ def initialize(aba: nil)
+ @aba = aba
+ end
+ end
+
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ attr_accessor :ach
+
+ def initialize(ach: nil)
+ @ach = ach
+ end
+ end
+
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ attr_accessor :requested
+
+ def initialize(requested: nil)
+ @requested = requested
+ end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ attr_accessor :us_domestic_wire
+
+ def initialize(ach: nil, us_domestic_wire: nil)
+ @ach = ach
+ @us_domestic_wire = us_domestic_wire
+ end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ attr_accessor :outbound_transfers
+
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ )
+ @card_issuing = card_issuing
+ @deposit_insurance = deposit_insurance
+ @financial_addresses = financial_addresses
+ @inbound_transfers = inbound_transfers
+ @intra_stripe_flows = intra_stripe_flows
+ @outbound_payments = outbound_payments
+ @outbound_transfers = outbound_transfers
+ end
+ end
+
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ attr_accessor :type
+
+ def initialize(financial_account: nil, payment_method: nil, type: nil)
+ @financial_account = financial_account
+ @payment_method = payment_method
+ @type = type
+ end
+ end
+
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ attr_accessor :outbound_flows
+
+ def initialize(inbound_flows: nil, outbound_flows: nil)
+ @inbound_flows = inbound_flows
+ @outbound_flows = outbound_flows
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
+ attr_accessor :features
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ attr_accessor :forwarding_settings
+ # 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`.
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ attr_accessor :platform_restrictions
+
+ def initialize(
+ expand: nil,
+ features: nil,
+ forwarding_settings: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil
+ )
+ @expand = expand
+ @features = features
+ @forwarding_settings = forwarding_settings
+ @metadata = metadata
+ @nickname = nickname
+ @platform_restrictions = platform_restrictions
+ end
+ end
+
+ class CloseParams < Stripe::RequestParams
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ attr_accessor :type
+
+ def initialize(financial_account: nil, payment_method: nil, type: nil)
+ @financial_account = financial_account
+ @payment_method = payment_method
+ @type = type
+ end
+ end
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ attr_accessor :forwarding_settings
+
+ def initialize(expand: nil, forwarding_settings: nil)
+ @expand = expand
+ @forwarding_settings = forwarding_settings
+ end
+ end
+
# Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
def close(financial_account, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/inbound_transfer_service.rb b/lib/stripe/services/treasury/inbound_transfer_service.rb
index f1737e28..84c49ea7 100644
--- a/lib/stripe/services/treasury/inbound_transfer_service.rb
+++ b/lib/stripe/services/treasury/inbound_transfer_service.rb
@@ -4,6 +4,94 @@
module Stripe
module Treasury
class InboundTransferService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The origin payment method to be debited for the InboundTransfer.
+ attr_accessor :origin_payment_method
+ # The complete description that appears on your customers' statements. Maximum 10 characters.
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ origin_payment_method: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @origin_payment_method = origin_payment_method
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Cancels an InboundTransfer.
def cancel(inbound_transfer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/outbound_payment_service.rb b/lib/stripe/services/treasury/outbound_payment_service.rb
index 9f1c21f5..c79f13ef 100644
--- a/lib/stripe/services/treasury/outbound_payment_service.rb
+++ b/lib/stripe/services/treasury/outbound_payment_service.rb
@@ -4,6 +4,264 @@
module Stripe
module Treasury
class OutboundPaymentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return OutboundPayments that were created during the given date interval.
+ attr_accessor :created
+ # Only return OutboundPayments sent to this customer.
+ attr_accessor :customer
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
+ attr_accessor :status
+
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @created = created
+ @customer = customer
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ attr_accessor :line2
+ # ZIP or postal code.
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ attr_accessor :state
+
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ )
+ @city = city
+ @country = country
+ @line1 = line1
+ @line2 = line2
+ @postal_code = postal_code
+ @state = state
+ end
+ end
+ # Billing address.
+ attr_accessor :address
+ # Email address.
+ attr_accessor :email
+ # Full name.
+ attr_accessor :name
+ # Billing phone number (including extension).
+ attr_accessor :phone
+
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
+ @address = address
+ @email = email
+ @name = name
+ @phone = phone
+ end
+ end
+
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ attr_accessor :routing_number
+
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ )
+ @account_holder_type = account_holder_type
+ @account_number = account_number
+ @account_type = account_type
+ @financial_connections_account = financial_connections_account
+ @routing_number = routing_number
+ end
+ end
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ attr_accessor :billing_details
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ attr_accessor :type
+ # Required hash if type is set to `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(
+ billing_details: nil,
+ financial_account: nil,
+ metadata: nil,
+ type: nil,
+ us_bank_account: nil
+ )
+ @billing_details = billing_details
+ @financial_account = financial_account
+ @metadata = metadata
+ @type = type
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(network: nil)
+ @network = network
+ end
+ end
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(us_bank_account: nil)
+ @us_bank_account = us_bank_account
+ end
+ end
+
+ class EndUserDetails < Stripe::RequestParams
+ # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
+ attr_accessor :ip_address
+ # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ attr_accessor :present
+
+ def initialize(ip_address: nil, present: nil)
+ @ip_address = ip_address
+ @present = present
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
+ attr_accessor :destination_payment_method_data
+ # Payment method-specific configuration for this OutboundPayment.
+ attr_accessor :destination_payment_method_options
+ # End user details.
+ attr_accessor :end_user_details
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment".
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ end_user_details: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @customer = customer
+ @description = description
+ @destination_payment_method = destination_payment_method
+ @destination_payment_method_data = destination_payment_method_data
+ @destination_payment_method_options = destination_payment_method_options
+ @end_user_details = end_user_details
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Cancel an OutboundPayment.
def cancel(id, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/outbound_transfer_service.rb b/lib/stripe/services/treasury/outbound_transfer_service.rb
index 1fa42438..75582454 100644
--- a/lib/stripe/services/treasury/outbound_transfer_service.rb
+++ b/lib/stripe/services/treasury/outbound_transfer_service.rb
@@ -4,6 +4,130 @@
module Stripe
module Treasury
class OutboundTransferService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ attr_accessor :financial_account
+ # The type of the destination.
+ attr_accessor :type
+
+ def initialize(financial_account: nil, type: nil)
+ @financial_account = financial_account
+ @type = type
+ end
+ end
+
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ attr_accessor :network
+
+ def initialize(network: nil)
+ @network = network
+ end
+ end
+ # Optional fields for `us_bank_account`.
+ attr_accessor :us_bank_account
+
+ def initialize(us_bank_account: nil)
+ @us_bank_account = us_bank_account
+ end
+ end
+ # Amount (in cents) to be transferred.
+ attr_accessor :amount
+ # 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).
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundTransfer.
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
+ attr_accessor :destination_payment_method_data
+ # Hash describing payment method configuration details.
+ attr_accessor :destination_payment_method_options
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ attr_accessor :financial_account
+ # 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`.
+ attr_accessor :metadata
+ # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer".
+ attr_accessor :statement_descriptor
+
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ )
+ @amount = amount
+ @currency = currency
+ @description = description
+ @destination_payment_method = destination_payment_method
+ @destination_payment_method_data = destination_payment_method_data
+ @destination_payment_method_options = destination_payment_method_options
+ @expand = expand
+ @financial_account = financial_account
+ @metadata = metadata
+ @statement_descriptor = statement_descriptor
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# An OutboundTransfer can be canceled if the funds have not yet been paid out.
def cancel(outbound_transfer, params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/received_credit_service.rb b/lib/stripe/services/treasury/received_credit_service.rb
index 8d8d4e23..8c812881 100644
--- a/lib/stripe/services/treasury/received_credit_service.rb
+++ b/lib/stripe/services/treasury/received_credit_service.rb
@@ -4,6 +4,58 @@
module Stripe
module Treasury
class ReceivedCreditService < StripeService
+ class ListParams < Stripe::RequestParams
+ class LinkedFlows < Stripe::RequestParams
+ # The source flow type.
+ attr_accessor :source_flow_type
+
+ def initialize(source_flow_type: nil)
+ @source_flow_type = source_flow_type
+ end
+ end
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount that received the funds.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # Only return ReceivedCredits described by the flow.
+ attr_accessor :linked_flows
+ # 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.
+ attr_accessor :starting_after
+ # Only return ReceivedCredits that have the given status: `succeeded` or `failed`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ linked_flows: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @linked_flows = linked_flows
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of ReceivedCredits.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/received_debit_service.rb b/lib/stripe/services/treasury/received_debit_service.rb
index 204b6f20..57347fb7 100644
--- a/lib/stripe/services/treasury/received_debit_service.rb
+++ b/lib/stripe/services/treasury/received_debit_service.rb
@@ -4,6 +4,46 @@
module Stripe
module Treasury
class ReceivedDebitService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # The FinancialAccount that funds were pulled from.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+ # Only return ReceivedDebits that have the given status: `succeeded` or `failed`.
+ attr_accessor :status
+
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ )
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @starting_after = starting_after
+ @status = status
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Returns a list of ReceivedDebits.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/transaction_entry_service.rb b/lib/stripe/services/treasury/transaction_entry_service.rb
index 342bafa2..157ff43f 100644
--- a/lib/stripe/services/treasury/transaction_entry_service.rb
+++ b/lib/stripe/services/treasury/transaction_entry_service.rb
@@ -4,6 +4,93 @@
module Stripe
module Treasury
class TransactionEntryService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class EffectiveAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Only return TransactionEntries that were created during the given date interval.
+ attr_accessor :created
+ # Attribute for param field effective_at
+ attr_accessor :effective_at
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.
+ attr_accessor :order_by
+ # 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.
+ attr_accessor :starting_after
+ # Only return TransactionEntries associated with this Transaction.
+ attr_accessor :transaction
+
+ def initialize(
+ created: nil,
+ effective_at: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ transaction: nil
+ )
+ @created = created
+ @effective_at = effective_at
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @order_by = order_by
+ @starting_after = starting_after
+ @transaction = transaction
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieves a list of TransactionEntry objects.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/treasury/transaction_service.rb b/lib/stripe/services/treasury/transaction_service.rb
index 4f684eb7..1bfa98ba 100644
--- a/lib/stripe/services/treasury/transaction_service.rb
+++ b/lib/stripe/services/treasury/transaction_service.rb
@@ -4,6 +4,101 @@
module Stripe
module Treasury
class TransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+
+ class StatusTransitions < Stripe::RequestParams
+ class PostedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ attr_accessor :lte
+
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
+ @gt = gt
+ @gte = gte
+ @lt = lt
+ @lte = lte
+ end
+ end
+ # Returns Transactions with `posted_at` within the specified range.
+ attr_accessor :posted_at
+
+ def initialize(posted_at: nil)
+ @posted_at = posted_at
+ end
+ end
+ # Only return Transactions that were created during the given date interval.
+ attr_accessor :created
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.
+ attr_accessor :order_by
+ # 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.
+ attr_accessor :starting_after
+ # Only return Transactions that have the given status: `open`, `posted`, or `void`.
+ attr_accessor :status
+ # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
+ attr_accessor :status_transitions
+
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ status: nil,
+ status_transitions: nil
+ )
+ @created = created
+ @ending_before = ending_before
+ @expand = expand
+ @financial_account = financial_account
+ @limit = limit
+ @order_by = order_by
+ @starting_after = starting_after
+ @status = status
+ @status_transitions = status_transitions
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
# Retrieves a list of Transaction objects.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb b/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb
index 6d9f5f80..69b3286c 100644
--- a/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb
+++ b/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb
@@ -5,6 +5,29 @@ module Stripe
module V2
module Billing
class MeterEventAdjustmentService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Cancel < Stripe::RequestParams
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ attr_accessor :identifier
+
+ def initialize(identifier: nil)
+ @identifier = identifier
+ end
+ end
+ # Specifies which event to cancel.
+ attr_accessor :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ attr_accessor :type
+
+ def initialize(cancel: nil, event_name: nil, type: nil)
+ @cancel = cancel
+ @event_name = event_name
+ @type = type
+ end
+ end
+
# Creates a meter event adjustment to cancel a previously sent meter event.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/v2/billing/meter_event_service.rb b/lib/stripe/services/v2/billing/meter_event_service.rb
index 1fbf17d4..c139f1db 100644
--- a/lib/stripe/services/v2/billing/meter_event_service.rb
+++ b/lib/stripe/services/v2/billing/meter_event_service.rb
@@ -5,6 +5,31 @@ module Stripe
module V2
module Billing
class MeterEventService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # A unique identifier for the event. If not provided, one will be generated.
+ # We recommend using a globally unique identifier for this. We’ll enforce
+ # uniqueness within a rolling 24 hour period.
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter’s
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
+ # `value_settings.event_payload_key` (default is `value`). Read more about
+ # the
+ # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ attr_accessor :payload
+ # The time of the event. Must be within the past 35 calendar days or up to
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
+ attr_accessor :timestamp
+
+ def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil)
+ @event_name = event_name
+ @identifier = identifier
+ @payload = payload
+ @timestamp = timestamp
+ end
+ end
+
# Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/v2/billing/meter_event_session_service.rb b/lib/stripe/services/v2/billing/meter_event_session_service.rb
index 3ab5e323..adf6a500 100644
--- a/lib/stripe/services/v2/billing/meter_event_session_service.rb
+++ b/lib/stripe/services/v2/billing/meter_event_session_service.rb
@@ -5,6 +5,9 @@ module Stripe
module V2
module Billing
class MeterEventSessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ end
+
# Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/v2/billing/meter_event_stream_service.rb b/lib/stripe/services/v2/billing/meter_event_stream_service.rb
index 7c306860..14837e91 100644
--- a/lib/stripe/services/v2/billing/meter_event_stream_service.rb
+++ b/lib/stripe/services/v2/billing/meter_event_stream_service.rb
@@ -5,6 +5,39 @@ module Stripe
module V2
module Billing
class MeterEventStreamService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Event < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ attr_accessor :event_name
+ # A unique identifier for the event. If not provided, one will be generated.
+ # We recommend using a globally unique identifier for this. We’ll enforce
+ # uniqueness within a rolling 24 hour period.
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter’s
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
+ # `value_settings.event_payload_key` (default is `value`). Read more about
+ # the
+ # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ attr_accessor :payload
+ # The time of the event. Must be within the past 35 calendar days or up to
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
+ attr_accessor :timestamp
+
+ def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil)
+ @event_name = event_name
+ @identifier = identifier
+ @payload = payload
+ @timestamp = timestamp
+ end
+ end
+ # List of meter events to include in the request.
+ attr_accessor :events
+
+ def initialize(events: nil)
+ @events = events
+ end
+ end
+
# Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales.
#
# ** raises TemporarySessionExpiredError
diff --git a/lib/stripe/services/v2/core/event_destination_service.rb b/lib/stripe/services/v2/core/event_destination_service.rb
index 11dd45c9..1c9e7611 100644
--- a/lib/stripe/services/v2/core/event_destination_service.rb
+++ b/lib/stripe/services/v2/core/event_destination_service.rb
@@ -5,6 +5,149 @@ module Stripe
module V2
module Core
class EventDestinationService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class AmazonEventbridge < Stripe::RequestParams
+ # The AWS account ID.
+ attr_accessor :aws_account_id
+ # The region of the AWS event source.
+ attr_accessor :aws_region
+
+ def initialize(aws_account_id: nil, aws_region: nil)
+ @aws_account_id = aws_account_id
+ @aws_region = aws_region
+ end
+ end
+
+ class WebhookEndpoint < Stripe::RequestParams
+ # The URL of the webhook endpoint.
+ attr_accessor :url
+
+ def initialize(url: nil)
+ @url = url
+ end
+ end
+ # An optional description of what the event destination is used for.
+ attr_accessor :description
+ # The list of events to enable for this endpoint.
+ attr_accessor :enabled_events
+ # Payload type of events being subscribed to.
+ attr_accessor :event_payload
+ # Where events should be routed from.
+ attr_accessor :events_from
+ # Additional fields to include in the response.
+ attr_accessor :include
+ # Metadata.
+ attr_accessor :metadata
+ # Event destination name.
+ attr_accessor :name
+ # If using the snapshot event payload, the API version events are rendered as.
+ attr_accessor :snapshot_api_version
+ # Event destination type.
+ attr_accessor :type
+ # Amazon EventBridge configuration.
+ attr_accessor :amazon_eventbridge
+ # Webhook endpoint configuration.
+ attr_accessor :webhook_endpoint
+
+ def initialize(
+ description: nil,
+ enabled_events: nil,
+ event_payload: nil,
+ events_from: nil,
+ include: nil,
+ metadata: nil,
+ name: nil,
+ snapshot_api_version: nil,
+ type: nil,
+ amazon_eventbridge: nil,
+ webhook_endpoint: nil
+ )
+ @description = description
+ @enabled_events = enabled_events
+ @event_payload = event_payload
+ @events_from = events_from
+ @include = include
+ @metadata = metadata
+ @name = name
+ @snapshot_api_version = snapshot_api_version
+ @type = type
+ @amazon_eventbridge = amazon_eventbridge
+ @webhook_endpoint = webhook_endpoint
+ end
+ end
+
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class DisableParams < Stripe::RequestParams
+ end
+
+ class EnableParams < Stripe::RequestParams
+ end
+
+ class ListParams < Stripe::RequestParams
+ # Additional fields to include in the response. Currently supports `webhook_endpoint.url`.
+ attr_accessor :include
+ # The page size.
+ attr_accessor :limit
+
+ def initialize(include: nil, limit: nil)
+ @include = include
+ @limit = limit
+ end
+ end
+
+ class PingParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Additional fields to include in the response.
+ attr_accessor :include
+
+ def initialize(include: nil)
+ @include = include
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ class WebhookEndpoint < Stripe::RequestParams
+ # The URL of the webhook endpoint.
+ attr_accessor :url
+
+ def initialize(url: nil)
+ @url = url
+ end
+ end
+ # An optional description of what the event destination is used for.
+ attr_accessor :description
+ # The list of events to enable for this endpoint.
+ attr_accessor :enabled_events
+ # Additional fields to include in the response. Currently supports `webhook_endpoint.url`.
+ attr_accessor :include
+ # Metadata.
+ attr_accessor :metadata
+ # Event destination name.
+ attr_accessor :name
+ # Webhook endpoint configuration.
+ attr_accessor :webhook_endpoint
+
+ def initialize(
+ description: nil,
+ enabled_events: nil,
+ include: nil,
+ metadata: nil,
+ name: nil,
+ webhook_endpoint: nil
+ )
+ @description = description
+ @enabled_events = enabled_events
+ @include = include
+ @metadata = metadata
+ @name = name
+ @webhook_endpoint = webhook_endpoint
+ end
+ end
+
# Create a new event destination.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/v2/core/event_service.rb b/lib/stripe/services/v2/core/event_service.rb
index 86b96bce..180f1a7f 100644
--- a/lib/stripe/services/v2/core/event_service.rb
+++ b/lib/stripe/services/v2/core/event_service.rb
@@ -5,6 +5,21 @@ module Stripe
module V2
module Core
class EventService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The page size.
+ attr_accessor :limit
+ # Primary object ID used to retrieve related events.
+ attr_accessor :object_id
+
+ def initialize(limit: nil, object_id: nil)
+ @limit = limit
+ @object_id = object_id
+ end
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ end
+
# List events, going back up to 30 days.
def list(params = {}, opts = {})
request(
diff --git a/lib/stripe/services/webhook_endpoint_service.rb b/lib/stripe/services/webhook_endpoint_service.rb
index 222b745b..d24e632c 100644
--- a/lib/stripe/services/webhook_endpoint_service.rb
+++ b/lib/stripe/services/webhook_endpoint_service.rb
@@ -3,6 +3,102 @@
module Stripe
class WebhookEndpointService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ end
+
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+
+ def initialize(expand: nil)
+ @expand = expand
+ end
+ end
+
+ class UpdateParams < Stripe::RequestParams
+ # An optional description of what the webhook is used for.
+ attr_accessor :description
+ # Disable the webhook endpoint if set to true.
+ attr_accessor :disabled
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ attr_accessor :url
+
+ def initialize(
+ description: nil,
+ disabled: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ )
+ @description = description
+ @disabled = disabled
+ @enabled_events = enabled_events
+ @expand = expand
+ @metadata = metadata
+ @url = url
+ end
+ end
+
+ class ListParams < Stripe::RequestParams
+ # 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.
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ attr_accessor :limit
+ # 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.
+ attr_accessor :starting_after
+
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
+ @ending_before = ending_before
+ @expand = expand
+ @limit = limit
+ @starting_after = starting_after
+ end
+ end
+
+ class CreateParams < Stripe::RequestParams
+ # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
+ attr_accessor :api_version
+ # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
+ attr_accessor :connect
+ # An optional description of what the webhook is used for.
+ attr_accessor :description
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ attr_accessor :expand
+ # 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`.
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ attr_accessor :url
+
+ def initialize(
+ api_version: nil,
+ connect: nil,
+ description: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ )
+ @api_version = api_version
+ @connect = connect
+ @description = description
+ @enabled_events = enabled_events
+ @expand = expand
+ @metadata = metadata
+ @url = url
+ end
+ end
+
# A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
def create(params = {}, opts = {})
request(
diff --git a/lib/stripe/stripe_client.rb b/lib/stripe/stripe_client.rb
index d5eda673..5aa54bce 100644
--- a/lib/stripe/stripe_client.rb
+++ b/lib/stripe/stripe_client.rb
@@ -15,7 +15,7 @@ module Stripe
CLIENT_OPTIONS = Set.new(%i[api_key stripe_account stripe_context api_version api_base uploads_base connect_base meter_events_base client_id])
# Initializes a new StripeClient
- def initialize(api_key, # rubocop:todo Metrics/ParameterLists
+ def initialize(api_key,
stripe_account: nil,
stripe_context: nil,
stripe_version: nil,
@@ -74,6 +74,7 @@ module Stripe
opts = Util.normalize_opts(opts)
req_opts = RequestOptions.extract_opts_from_hash(opts)
+ params = params.to_h if params.is_a?(Stripe::RequestParams)
resp, = @requestor.send(:execute_request_internal, method, url, base_address, params, req_opts, usage: ["raw_request"])
@requestor.interpret_response(resp)
diff --git a/lib/stripe/stripe_object.rb b/lib/stripe/stripe_object.rb
index 2b262e2b..b7a92b52 100644
--- a/lib/stripe/stripe_object.rb
+++ b/lib/stripe/stripe_object.rb
@@ -83,6 +83,7 @@ module Stripe
@unsaved_values = Set.new
@transient_values = Set.new
@values[:id] = id if id
+ @id = id
@last_response = nil
@requestor = requestor || APIRequestor.active_requestor
end
@@ -369,6 +370,10 @@ module Stripe
define_method(:"#{k}?") { @values[k] } if [FalseClass, TrueClass].include?(values[k].class)
end
end
+
+ keys.each do |k|
+ instance_variable_set(:"@#{k}", values[k])
+ end
end
# Disabling the cop because it's confused by the fact that the methods are
diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi
new file mode 100644
index 00000000..b1c01bcb
--- /dev/null
+++ b/rbi/stripe/resources/account.rbi
@@ -0,0 +1,4811 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # This is an object representing a Stripe account. You can retrieve it to see
+ # properties on the account like its current requirements or if the account is
+ # enabled to make live charges or receive payouts.
+ #
+ # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ # is `application`, which includes Custom accounts, the properties below are always
+ # returned.
+ #
+ # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ # is `stripe`, which includes Standard and Express accounts, some properties are only returned
+ # until you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions)
+ # to start Connect Onboarding. Learn about the [differences between accounts](https://stripe.com/connect/accounts).
+ class Account < APIResource
+ class BusinessProfile < Stripe::StripeObject
+ class AnnualRevenue < Stripe::StripeObject
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fiscal_year_end
+ end
+ class MonthlyEstimatedRevenue < Stripe::StripeObject
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ end
+ class SupportAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ sig { returns(T.nilable(AnnualRevenue)) }
+ attr_reader :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ sig { returns(T.nilable(String)) }
+ attr_reader :mcc
+ # Attribute for field monthly_estimated_revenue
+ sig { returns(MonthlyEstimatedRevenue) }
+ attr_reader :monthly_estimated_revenue
+ # The customer-facing business name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # A publicly available mailing address for sending support issues to.
+ sig { returns(T.nilable(SupportAddress)) }
+ attr_reader :support_address
+ # A publicly available email address for sending support issues to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :support_email
+ # A publicly available phone number to call with support issues.
+ sig { returns(T.nilable(String)) }
+ attr_reader :support_phone
+ # A publicly available website for handling support issues.
+ sig { returns(T.nilable(String)) }
+ attr_reader :support_url
+ # The business's publicly available website.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ class Capabilities < Stripe::StripeObject
+ # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.
+ sig { returns(String) }
+ attr_reader :acss_debit_payments
+ # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.
+ sig { returns(String) }
+ attr_reader :affirm_payments
+ # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.
+ sig { returns(String) }
+ attr_reader :afterpay_clearpay_payments
+ # The status of the Alma capability of the account, or whether the account can directly process Alma payments.
+ sig { returns(String) }
+ attr_reader :alma_payments
+ # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.
+ sig { returns(String) }
+ attr_reader :amazon_pay_payments
+ # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.
+ sig { returns(String) }
+ attr_reader :au_becs_debit_payments
+ # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.
+ sig { returns(String) }
+ attr_reader :bacs_debit_payments
+ # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.
+ sig { returns(String) }
+ attr_reader :bancontact_payments
+ # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.
+ sig { returns(String) }
+ attr_reader :bank_transfer_payments
+ # The status of the Billie capability of the account, or whether the account can directly process Billie payments.
+ sig { returns(String) }
+ attr_reader :billie_payments
+ # The status of the blik payments capability of the account, or whether the account can directly process blik charges.
+ sig { returns(String) }
+ attr_reader :blik_payments
+ # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.
+ sig { returns(String) }
+ attr_reader :boleto_payments
+ # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards
+ sig { returns(String) }
+ attr_reader :card_issuing
+ # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.
+ sig { returns(String) }
+ attr_reader :card_payments
+ # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.
+ sig { returns(String) }
+ attr_reader :cartes_bancaires_payments
+ # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.
+ sig { returns(String) }
+ attr_reader :cashapp_payments
+ # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.
+ sig { returns(String) }
+ attr_reader :eps_payments
+ # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.
+ sig { returns(String) }
+ attr_reader :fpx_payments
+ # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges.
+ sig { returns(String) }
+ attr_reader :gb_bank_transfer_payments
+ # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges.
+ sig { returns(String) }
+ attr_reader :giropay_payments
+ # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.
+ sig { returns(String) }
+ attr_reader :grabpay_payments
+ # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.
+ sig { returns(String) }
+ attr_reader :ideal_payments
+ # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.
+ sig { returns(String) }
+ attr_reader :india_international_payments
+ # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency.
+ sig { returns(String) }
+ attr_reader :jcb_payments
+ # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges.
+ sig { returns(String) }
+ attr_reader :jp_bank_transfer_payments
+ # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments.
+ sig { returns(String) }
+ attr_reader :kakao_pay_payments
+ # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges.
+ sig { returns(String) }
+ attr_reader :klarna_payments
+ # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges.
+ sig { returns(String) }
+ attr_reader :konbini_payments
+ # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments.
+ sig { returns(String) }
+ attr_reader :kr_card_payments
+ # The status of the legacy payments capability of the account.
+ sig { returns(String) }
+ attr_reader :legacy_payments
+ # The status of the link_payments capability of the account, or whether the account can directly process Link charges.
+ sig { returns(String) }
+ attr_reader :link_payments
+ # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.
+ sig { returns(String) }
+ attr_reader :mobilepay_payments
+ # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.
+ sig { returns(String) }
+ attr_reader :multibanco_payments
+ # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges.
+ sig { returns(String) }
+ attr_reader :mx_bank_transfer_payments
+ # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.
+ sig { returns(String) }
+ attr_reader :naver_pay_payments
+ # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.
+ sig { returns(String) }
+ attr_reader :oxxo_payments
+ # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges.
+ sig { returns(String) }
+ attr_reader :p24_payments
+ # The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.
+ sig { returns(String) }
+ attr_reader :pay_by_bank_payments
+ # The status of the Payco capability of the account, or whether the account can directly process Payco payments.
+ sig { returns(String) }
+ attr_reader :payco_payments
+ # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.
+ sig { returns(String) }
+ attr_reader :paynow_payments
+ # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
+ sig { returns(String) }
+ attr_reader :promptpay_payments
+ # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
+ sig { returns(String) }
+ attr_reader :revolut_pay_payments
+ # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments.
+ sig { returns(String) }
+ attr_reader :samsung_pay_payments
+ # The status of the Satispay capability of the account, or whether the account can directly process Satispay payments.
+ sig { returns(String) }
+ attr_reader :satispay_payments
+ # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges.
+ sig { returns(String) }
+ attr_reader :sepa_bank_transfer_payments
+ # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
+ sig { returns(String) }
+ attr_reader :sepa_debit_payments
+ # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.
+ sig { returns(String) }
+ attr_reader :sofort_payments
+ # The status of the Swish capability of the account, or whether the account can directly process Swish payments.
+ sig { returns(String) }
+ attr_reader :swish_payments
+ # The status of the tax reporting 1099-K (US) capability of the account.
+ sig { returns(String) }
+ attr_reader :tax_reporting_us_1099_k
+ # The status of the tax reporting 1099-MISC (US) capability of the account.
+ sig { returns(String) }
+ attr_reader :tax_reporting_us_1099_misc
+ # The status of the transfers capability of the account, or whether your platform can transfer funds to the account.
+ sig { returns(String) }
+ attr_reader :transfers
+ # The status of the banking capability, or whether the account can have bank accounts.
+ sig { returns(String) }
+ attr_reader :treasury
+ # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.
+ sig { returns(String) }
+ attr_reader :twint_payments
+ # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
+ sig { returns(String) }
+ attr_reader :us_bank_account_ach_payments
+ # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges.
+ sig { returns(String) }
+ attr_reader :us_bank_transfer_payments
+ # The status of the Zip capability of the account, or whether the account can directly process Zip charges.
+ sig { returns(String) }
+ attr_reader :zip_payments
+ end
+ class Company < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class AddressKana < Stripe::StripeObject
+ # City/Ward.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Block/Building number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # Town/cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_reader :town
+ end
+ class AddressKanji < Stripe::StripeObject
+ # City/Ward.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Block/Building number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # Town/cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_reader :town
+ end
+ class DirectorshipDeclaration < Stripe::StripeObject
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user-agent string from the browser where the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ class OwnershipDeclaration < Stripe::StripeObject
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user-agent string from the browser where the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ class Verification < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :back
+ # A user-displayable string describing the verification state of this document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :details
+ # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :details_code
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :front
+ end
+ # Attribute for field document
+ sig { returns(Document) }
+ attr_reader :document
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(AddressKana)) }
+ attr_reader :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(AddressKanji)) }
+ attr_reader :address_kanji
+ # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).
+ sig { returns(T::Boolean) }
+ attr_reader :directors_provided
+ # This hash is used to attest that the director information provided to Stripe is both current and correct.
+ sig { returns(T.nilable(DirectorshipDeclaration)) }
+ attr_reader :directorship_declaration
+ # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.
+ sig { returns(T::Boolean) }
+ attr_reader :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(String) }
+ attr_reader :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(String) }
+ attr_reader :export_purpose_code
+ # The company's legal name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # The Kana variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name_kana
+ # The Kanji variation of the company's legal name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name_kanji
+ # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).
+ sig { returns(T::Boolean) }
+ attr_reader :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig { returns(T.nilable(OwnershipDeclaration)) }
+ attr_reader :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(String) }
+ attr_reader :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
+ sig { returns(String) }
+ attr_reader :structure
+ # Whether the company's business ID number was provided.
+ sig { returns(T::Boolean) }
+ attr_reader :tax_id_provided
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(String) }
+ attr_reader :tax_id_registrar
+ # Whether the company's business VAT number was provided.
+ sig { returns(T::Boolean) }
+ attr_reader :vat_id_provided
+ # Information on the verification state of the company.
+ sig { returns(T.nilable(Verification)) }
+ attr_reader :verification
+ end
+ class Controller < Stripe::StripeObject
+ class Fees < Stripe::StripeObject
+ # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
+ sig { returns(String) }
+ attr_reader :payer
+ end
+ class Losses < Stripe::StripeObject
+ # A value indicating who is liable when this account can't pay back negative balances from payments.
+ sig { returns(String) }
+ attr_reader :payments
+ end
+ class StripeDashboard < Stripe::StripeObject
+ # A value indicating the Stripe dashboard this account has access to independent of the Connect application.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Attribute for field fees
+ sig { returns(Fees) }
+ attr_reader :fees
+ # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.
+ sig { returns(T::Boolean) }
+ attr_reader :is_controller
+ # Attribute for field losses
+ sig { returns(Losses) }
+ attr_reader :losses
+ # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.
+ sig { returns(String) }
+ attr_reader :requirement_collection
+ # Attribute for field stripe_dashboard
+ sig { returns(StripeDashboard) }
+ attr_reader :stripe_dashboard
+ # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class FutureRequirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :original_fields_due
+ end
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ sig { returns(T.nilable(T::Array[Alternative])) }
+ attr_reader :alternatives
+ # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :currently_due
+ # This is typed as an enum for consistency with `requirements.disabled_reason`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T.nilable(T::Array[Error])) }
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :eventually_due
+ # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :pending_verification
+ end
+ class Groups < Stripe::StripeObject
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payments_pricing
+ end
+ class Requirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :original_fields_due
+ end
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ sig { returns(T.nilable(T::Array[Alternative])) }
+ attr_reader :alternatives
+ # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :currently_due
+ # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T.nilable(T::Array[Error])) }
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :eventually_due
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :pending_verification
+ end
+ class Settings < Stripe::StripeObject
+ class BacsDebitPayments < Stripe::StripeObject
+ # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ sig { returns(T.nilable(String)) }
+ attr_reader :display_name
+ # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners.
+ sig { returns(T.nilable(String)) }
+ attr_reader :service_user_number
+ end
+ class Branding < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :logo
+ # A CSS hex color value representing the primary branding color for this account
+ sig { returns(T.nilable(String)) }
+ attr_reader :primary_color
+ # A CSS hex color value representing the secondary branding color for this account
+ sig { returns(T.nilable(String)) }
+ attr_reader :secondary_color
+ end
+ class CardIssuing < Stripe::StripeObject
+ class TosAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(String) }
+ attr_reader :user_agent
+ end
+ # Attribute for field tos_acceptance
+ sig { returns(TosAcceptance) }
+ attr_reader :tos_acceptance
+ end
+ class CardPayments < Stripe::StripeObject
+ class DeclineOn < Stripe::StripeObject
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ sig { returns(T::Boolean) }
+ attr_reader :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ sig { returns(T::Boolean) }
+ attr_reader :cvc_failure
+ end
+ # Attribute for field decline_on
+ sig { returns(DeclineOn) }
+ attr_reader :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_prefix_kanji
+ end
+ class Dashboard < Stripe::StripeObject
+ # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.
+ sig { returns(T.nilable(String)) }
+ attr_reader :display_name
+ # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).
+ sig { returns(T.nilable(String)) }
+ attr_reader :timezone
+ end
+ class Invoices < Stripe::StripeObject
+ # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :default_account_tax_ids
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_payment_method_save
+ end
+ class Payments < Stripe::StripeObject
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_kanji
+ # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_prefix_kana
+ # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_prefix_kanji
+ end
+ class Payouts < Stripe::StripeObject
+ class Schedule < Stripe::StripeObject
+ # The number of days charges for the account will be held before being paid out.
+ sig { returns(Integer) }
+ attr_reader :delay_days
+ # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
+ sig { returns(Integer) }
+ attr_reader :monthly_anchor
+ # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.
+ sig { returns(String) }
+ attr_reader :weekly_anchor
+ end
+ # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :debit_negative_balances
+ # Attribute for field schedule
+ sig { returns(Schedule) }
+ attr_reader :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class SepaDebitPayments < Stripe::StripeObject
+ # SEPA creditor identifier that identifies the company making the payment.
+ sig { returns(String) }
+ attr_reader :creditor_id
+ end
+ class Treasury < Stripe::StripeObject
+ class TosAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(String) }
+ attr_reader :user_agent
+ end
+ # Attribute for field tos_acceptance
+ sig { returns(TosAcceptance) }
+ attr_reader :tos_acceptance
+ end
+ # Attribute for field bacs_debit_payments
+ sig { returns(BacsDebitPayments) }
+ attr_reader :bacs_debit_payments
+ # Attribute for field branding
+ sig { returns(Branding) }
+ attr_reader :branding
+ # Attribute for field card_issuing
+ sig { returns(CardIssuing) }
+ attr_reader :card_issuing
+ # Attribute for field card_payments
+ sig { returns(CardPayments) }
+ attr_reader :card_payments
+ # Attribute for field dashboard
+ sig { returns(Dashboard) }
+ attr_reader :dashboard
+ # Attribute for field invoices
+ sig { returns(Invoices) }
+ attr_reader :invoices
+ # Attribute for field payments
+ sig { returns(Payments) }
+ attr_reader :payments
+ # Attribute for field payouts
+ sig { returns(Payouts) }
+ attr_reader :payouts
+ # Attribute for field sepa_debit_payments
+ sig { returns(SepaDebitPayments) }
+ attr_reader :sepa_debit_payments
+ # Attribute for field treasury
+ sig { returns(Treasury) }
+ attr_reader :treasury
+ end
+ class TosAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the account representative accepted their service agreement
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the account representative accepted their service agreement
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user's service agreement type
+ sig { returns(String) }
+ attr_reader :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ # Business information about the account.
+ sig { returns(T.nilable(BusinessProfile)) }
+ attr_reader :business_profile
+ # The business type.
+ sig { returns(T.nilable(String)) }
+ attr_reader :business_type
+ # Attribute for field capabilities
+ sig { returns(Capabilities) }
+ attr_reader :capabilities
+ # Whether the account can process charges.
+ sig { returns(T::Boolean) }
+ attr_reader :charges_enabled
+ # Attribute for field company
+ sig { returns(Company) }
+ attr_reader :company
+ # Attribute for field controller
+ sig { returns(Controller) }
+ attr_reader :controller
+ # The account's country.
+ sig { returns(String) }
+ attr_reader :country
+ # Time at which the account was connected. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).
+ sig { returns(String) }
+ attr_reader :default_currency
+ # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details.
+ sig { returns(T::Boolean) }
+ attr_reader :details_submitted
+ # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :external_accounts
+ # Attribute for field future_requirements
+ sig { returns(FutureRequirements) }
+ attr_reader :future_requirements
+ # The groups associated with the account.
+ sig { returns(T.nilable(Groups)) }
+ attr_reader :groups
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # This is an object representing a person associated with a Stripe account.
+ #
+ # A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
+ #
+ # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information).
+ sig { returns(Stripe::Person) }
+ attr_reader :individual
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Whether the funds in this account can be paid out.
+ sig { returns(T::Boolean) }
+ attr_reader :payouts_enabled
+ # Attribute for field requirements
+ sig { returns(Requirements) }
+ attr_reader :requirements
+ # Options for customizing how the account functions within Stripe.
+ sig { returns(T.nilable(Settings)) }
+ attr_reader :settings
+ # Attribute for field tos_acceptance
+ sig { returns(TosAcceptance) }
+ attr_reader :tos_acceptance
+ # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`.
+ sig { returns(String) }
+ attr_reader :type
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(object: String, account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, country: String, currency: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ ); end
+ end
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ sig { returns(String) }
+ attr_accessor :fiscal_year_end
+ sig { params(amount: Integer, currency: String, fiscal_year_end: String).void }
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end
+ end
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ sig { params(amount: Integer, currency: String).void }
+ def initialize(amount: nil, currency: nil); end
+ end
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::BusinessProfile::AnnualRevenue)) }
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue))
+ }
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::BusinessProfile::SupportAddress)) }
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :support_url
+ # The business's publicly available website.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(annual_revenue: T.nilable(::Stripe::Account::UpdateParams::BusinessProfile::AnnualRevenue), estimated_worker_count: T.nilable(Integer), mcc: T.nilable(String), monthly_estimated_revenue: T.nilable(::Stripe::Account::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue), name: T.nilable(String), product_description: T.nilable(String), support_address: T.nilable(::Stripe::Account::UpdateParams::BusinessProfile::SupportAddress), support_email: T.nilable(String), support_phone: T.nilable(String), support_url: T.nilable(T.nilable(String)), url: T.nilable(String)).void
+ }
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ ); end
+ end
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ # The acss_debit_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::AcssDebitPayments)) }
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::AffirmPayments)) }
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::AfterpayClearpayPayments))
+ }
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::AlmaPayments)) }
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::AmazonPayPayments)) }
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::AuBecsDebitPayments))
+ }
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::BacsDebitPayments)) }
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::BancontactPayments))
+ }
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::BankTransferPayments))
+ }
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::BilliePayments)) }
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::BlikPayments)) }
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::BoletoPayments)) }
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardIssuing)) }
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardPayments)) }
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::CartesBancairesPayments))
+ }
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::CashappPayments)) }
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::EpsPayments)) }
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::FpxPayments)) }
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::GbBankTransferPayments))
+ }
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::GiropayPayments)) }
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::GrabpayPayments)) }
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::IdealPayments)) }
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::IndiaInternationalPayments))
+ }
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::JcbPayments)) }
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::JpBankTransferPayments))
+ }
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::KakaoPayPayments)) }
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::KlarnaPayments)) }
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::KonbiniPayments)) }
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::KrCardPayments)) }
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::LegacyPayments)) }
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::LinkPayments)) }
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::MobilepayPayments)) }
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::MultibancoPayments))
+ }
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::MxBankTransferPayments))
+ }
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::NaverPayPayments)) }
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::OxxoPayments)) }
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::P24Payments)) }
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::PayByBankPayments)) }
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaycoPayments)) }
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaynowPayments)) }
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::PromptpayPayments)) }
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::RevolutPayPayments))
+ }
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::SamsungPayPayments))
+ }
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::SatispayPayments)) }
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaBankTransferPayments))
+ }
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaDebitPayments)) }
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::SofortPayments)) }
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::SwishPayments)) }
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099K))
+ }
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099Misc))
+ }
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::Transfers)) }
+ attr_accessor :transfers
+ # The treasury capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::Treasury)) }
+ attr_accessor :treasury
+ # The twint_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::TwintPayments)) }
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankAccountAchPayments))
+ }
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankTransferPayments))
+ }
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities::ZipPayments)) }
+ attr_accessor :zip_payments
+ sig {
+ params(acss_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::NaverPayPayments), oxxo_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PaynowPayments), promptpay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::Account::UpdateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::Account::UpdateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::Account::UpdateParams::Capabilities::ZipPayments)).void
+ }
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field address_city
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field cvc
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ sig { returns(Integer) }
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ sig { returns(Integer) }
+ attr_accessor :exp_year
+ # Attribute for param field name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Attribute for param field number
+ sig { returns(String) }
+ attr_accessor :number
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :default_for_currency
+ sig {
+ params(object: String, address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: Integer, exp_year: Integer, name: T.nilable(String), number: String, metadata: T.nilable(T::Hash[String, String]), default_for_currency: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ ); end
+ end
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field token
+ sig { returns(String) }
+ attr_accessor :token
+ sig { params(object: String, currency: T.nilable(String), token: String).void }
+ def initialize(object: nil, currency: nil, token: nil); end
+ end
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document verifying the business.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Company::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Account::UpdateParams::Company::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # The company's primary address.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company::Address)) }
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company::AddressKanji)) }
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Company::DirectorshipDeclaration))
+ }
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company::OwnershipDeclaration)) }
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::Account::UpdateParams::Company::Address), address_kana: T.nilable(::Stripe::Account::UpdateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::Account::UpdateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Account::UpdateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Account::UpdateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Account::UpdateParams::Company::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ ); end
+ end
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Documents::BankAccountOwnershipVerification))
+ }
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyLicense)) }
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMemorandumOfAssociation))
+ }
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMinisterialDecree))
+ }
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyRegistrationVerification))
+ }
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification))
+ }
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfRegistration)) }
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership))
+ }
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+ sig {
+ params(bank_account_ownership_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::Account::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership)).void
+ }
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ ); end
+ end
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :payments_pricing
+ sig { params(payments_pricing: T.nilable(T.nilable(String))).void }
+ def initialize(payments_pricing: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), title: T.nilable(String)).void
+ }
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Individual::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::Account::UpdateParams::Individual::Verification::AdditionalDocument), document: T.nilable(::Stripe::Account::UpdateParams::Individual::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # The individual's primary address.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::Address)) }
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Account::UpdateParams::Individual::Dob))))
+ }
+ attr_accessor :dob
+ # The individual's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The individual's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The individual's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::RegisteredAddress)) }
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::Account::UpdateParams::Individual::Address), address_kana: T.nilable(::Stripe::Account::UpdateParams::Individual::AddressKana), address_kanji: T.nilable(::Stripe::Account::UpdateParams::Individual::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::Account::UpdateParams::Individual::Dob))), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::Account::UpdateParams::Individual::RegisteredAddress), relationship: T.nilable(::Stripe::Account::UpdateParams::Individual::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::Account::UpdateParams::Individual::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ sig { params(display_name: T.nilable(String)).void }
+ def initialize(display_name: nil); end
+ end
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :secondary_color
+ sig {
+ params(icon: T.nilable(String), logo: T.nilable(String), primary_color: T.nilable(String), secondary_color: T.nilable(String)).void
+ }
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Settings::CardIssuing::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::Account::UpdateParams::Settings::CardIssuing::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cvc_failure
+ sig {
+ params(avs_failure: T.nilable(T::Boolean), cvc_failure: T.nilable(T::Boolean)).void
+ }
+ def initialize(avs_failure: nil, cvc_failure: nil); end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Settings::CardPayments::DeclineOn))
+ }
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kanji
+ sig {
+ params(decline_on: T.nilable(::Stripe::Account::UpdateParams::Settings::CardPayments::DeclineOn), statement_descriptor_prefix: T.nilable(String), statement_descriptor_prefix_kana: T.nilable(T.nilable(String)), statement_descriptor_prefix_kanji: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ ); end
+ end
+ class Invoices < Stripe::RequestParams
+ # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_account_tax_ids
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :hosted_payment_method_save
+ sig {
+ params(default_account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), hosted_payment_method_save: T.nilable(String)).void
+ }
+ def initialize(default_account_tax_ids: nil, hosted_payment_method_save: nil); end
+ end
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kanji
+ sig {
+ params(statement_descriptor: T.nilable(String), statement_descriptor_kana: T.nilable(String), statement_descriptor_kanji: T.nilable(String)).void
+ }
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ ); end
+ end
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :weekly_anchor
+ sig {
+ params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void
+ }
+ def initialize(
+ delay_days: nil,
+ interval: nil,
+ monthly_anchor: nil,
+ weekly_anchor: nil
+ ); end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Payouts::Schedule)) }
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(debit_negative_balances: T.nilable(T::Boolean), schedule: T.nilable(::Stripe::Account::UpdateParams::Settings::Payouts::Schedule), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ debit_negative_balances: nil,
+ schedule: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ sig {
+ returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Treasury::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::Account::UpdateParams::Settings::Treasury::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ # Settings specific to Bacs Direct Debit payments.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::BacsDebitPayments)) }
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Branding)) }
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::CardIssuing)) }
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::CardPayments)) }
+ attr_accessor :card_payments
+ # Settings specific to the account's use of Invoices.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Invoices)) }
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Payments)) }
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Payouts)) }
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings::Treasury)) }
+ attr_accessor :treasury
+ sig {
+ params(bacs_debit_payments: T.nilable(::Stripe::Account::UpdateParams::Settings::BacsDebitPayments), branding: T.nilable(::Stripe::Account::UpdateParams::Settings::Branding), card_issuing: T.nilable(::Stripe::Account::UpdateParams::Settings::CardIssuing), card_payments: T.nilable(::Stripe::Account::UpdateParams::Settings::CardPayments), invoices: T.nilable(::Stripe::Account::UpdateParams::Settings::Invoices), payments: T.nilable(::Stripe::Account::UpdateParams::Settings::Payments), payouts: T.nilable(::Stripe::Account::UpdateParams::Settings::Payouts), treasury: T.nilable(::Stripe::Account::UpdateParams::Settings::Treasury)).void
+ }
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ ); end
+ end
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user's service agreement type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), service_agreement: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_token
+ # Business information about the account.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::BusinessProfile)) }
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Capabilities)) }
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company)) }
+ attr_accessor :company
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Documents)) }
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T.any(String, ::Stripe::Account::UpdateParams::BankAccount, ::Stripe::Account::UpdateParams::Card, ::Stripe::Account::UpdateParams::CardToken)))))
+ }
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Groups)) }
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::Settings)) }
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ sig { returns(T.nilable(::Stripe::Account::UpdateParams::TosAcceptance)) }
+ attr_accessor :tos_acceptance
+ sig {
+ params(account_token: T.nilable(String), business_profile: T.nilable(::Stripe::Account::UpdateParams::BusinessProfile), business_type: T.nilable(String), capabilities: T.nilable(::Stripe::Account::UpdateParams::Capabilities), company: T.nilable(::Stripe::Account::UpdateParams::Company), default_currency: T.nilable(String), documents: T.nilable(::Stripe::Account::UpdateParams::Documents), email: T.nilable(String), expand: T.nilable(T::Array[String]), external_account: T.nilable(T.nilable(T.any(String, T.any(String, ::Stripe::Account::UpdateParams::BankAccount, ::Stripe::Account::UpdateParams::Card, ::Stripe::Account::UpdateParams::CardToken)))), groups: T.nilable(::Stripe::Account::UpdateParams::Groups), individual: T.nilable(::Stripe::Account::UpdateParams::Individual), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), settings: T.nilable(::Stripe::Account::UpdateParams::Settings), tos_acceptance: T.nilable(::Stripe::Account::UpdateParams::TosAcceptance)).void
+ }
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return connected accounts that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Account::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Account::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(object: String, account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, country: String, currency: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ ); end
+ end
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ sig { returns(String) }
+ attr_accessor :fiscal_year_end
+ sig { params(amount: Integer, currency: String, fiscal_year_end: String).void }
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end
+ end
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ sig { params(amount: Integer, currency: String).void }
+ def initialize(amount: nil, currency: nil); end
+ end
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::BusinessProfile::AnnualRevenue)) }
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::BusinessProfile::MonthlyEstimatedRevenue))
+ }
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::BusinessProfile::SupportAddress)) }
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :support_url
+ # The business's publicly available website.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(annual_revenue: T.nilable(::Stripe::Account::CreateParams::BusinessProfile::AnnualRevenue), estimated_worker_count: T.nilable(Integer), mcc: T.nilable(String), monthly_estimated_revenue: T.nilable(::Stripe::Account::CreateParams::BusinessProfile::MonthlyEstimatedRevenue), name: T.nilable(String), product_description: T.nilable(String), support_address: T.nilable(::Stripe::Account::CreateParams::BusinessProfile::SupportAddress), support_email: T.nilable(String), support_phone: T.nilable(String), support_url: T.nilable(T.nilable(String)), url: T.nilable(String)).void
+ }
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ ); end
+ end
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ # The acss_debit_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::AcssDebitPayments)) }
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::AffirmPayments)) }
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::AfterpayClearpayPayments))
+ }
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::AlmaPayments)) }
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::AmazonPayPayments)) }
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::AuBecsDebitPayments))
+ }
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::BacsDebitPayments)) }
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::BancontactPayments))
+ }
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::BankTransferPayments))
+ }
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::BilliePayments)) }
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::BlikPayments)) }
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::BoletoPayments)) }
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::CardIssuing)) }
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::CardPayments)) }
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::CartesBancairesPayments))
+ }
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::CashappPayments)) }
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::EpsPayments)) }
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::FpxPayments)) }
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::GbBankTransferPayments))
+ }
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::GiropayPayments)) }
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::GrabpayPayments)) }
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::IdealPayments)) }
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::IndiaInternationalPayments))
+ }
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::JcbPayments)) }
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::JpBankTransferPayments))
+ }
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::KakaoPayPayments)) }
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::KlarnaPayments)) }
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::KonbiniPayments)) }
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::KrCardPayments)) }
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::LegacyPayments)) }
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::LinkPayments)) }
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::MobilepayPayments)) }
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::MultibancoPayments))
+ }
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::MxBankTransferPayments))
+ }
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::NaverPayPayments)) }
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::OxxoPayments)) }
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::P24Payments)) }
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::PayByBankPayments)) }
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::PaycoPayments)) }
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::PaynowPayments)) }
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::PromptpayPayments)) }
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::RevolutPayPayments))
+ }
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::SamsungPayPayments))
+ }
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::SatispayPayments)) }
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaBankTransferPayments))
+ }
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaDebitPayments)) }
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::SofortPayments)) }
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::SwishPayments)) }
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099K))
+ }
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099Misc))
+ }
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::Transfers)) }
+ attr_accessor :transfers
+ # The treasury capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::Treasury)) }
+ attr_accessor :treasury
+ # The twint_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::TwintPayments)) }
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankAccountAchPayments))
+ }
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankTransferPayments))
+ }
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities::ZipPayments)) }
+ attr_accessor :zip_payments
+ sig {
+ params(acss_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::Account::CreateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::NaverPayPayments), oxxo_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PaynowPayments), promptpay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::Account::CreateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::Account::CreateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::Account::CreateParams::Capabilities::ZipPayments)).void
+ }
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field address_city
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field cvc
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ sig { returns(Integer) }
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ sig { returns(Integer) }
+ attr_accessor :exp_year
+ # Attribute for param field name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Attribute for param field number
+ sig { returns(String) }
+ attr_accessor :number
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :default_for_currency
+ sig {
+ params(object: String, address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: Integer, exp_year: Integer, name: T.nilable(String), number: String, metadata: T.nilable(T::Hash[String, String]), default_for_currency: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ ); end
+ end
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field token
+ sig { returns(String) }
+ attr_accessor :token
+ sig { params(object: String, currency: T.nilable(String), token: String).void }
+ def initialize(object: nil, currency: nil, token: nil); end
+ end
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document verifying the business.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Company::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Account::CreateParams::Company::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # The company's primary address.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Company::Address)) }
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Company::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Company::AddressKanji)) }
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Company::DirectorshipDeclaration))
+ }
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Company::OwnershipDeclaration)) }
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Company::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::Account::CreateParams::Company::Address), address_kana: T.nilable(::Stripe::Account::CreateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::Account::CreateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Account::CreateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Account::CreateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Account::CreateParams::Company::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ ); end
+ end
+ class Controller < Stripe::RequestParams
+ class Fees < Stripe::RequestParams
+ # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payer
+ sig { params(payer: T.nilable(String)).void }
+ def initialize(payer: nil); end
+ end
+ class Losses < Stripe::RequestParams
+ # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payments
+ sig { params(payments: T.nilable(String)).void }
+ def initialize(payments: nil); end
+ end
+ class StripeDashboard < Stripe::RequestParams
+ # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig { params(type: T.nilable(String)).void }
+ def initialize(type: nil); end
+ end
+ # A hash of configuration for who pays Stripe fees for product usage on this account.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Controller::Fees)) }
+ attr_accessor :fees
+ # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Controller::Losses)) }
+ attr_accessor :losses
+ # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requirement_collection
+ # A hash of configuration for Stripe-hosted dashboards.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Controller::StripeDashboard)) }
+ attr_accessor :stripe_dashboard
+ sig {
+ params(fees: T.nilable(::Stripe::Account::CreateParams::Controller::Fees), losses: T.nilable(::Stripe::Account::CreateParams::Controller::Losses), requirement_collection: T.nilable(String), stripe_dashboard: T.nilable(::Stripe::Account::CreateParams::Controller::StripeDashboard)).void
+ }
+ def initialize(
+ fees: nil,
+ losses: nil,
+ requirement_collection: nil,
+ stripe_dashboard: nil
+ ); end
+ end
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Documents::BankAccountOwnershipVerification))
+ }
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Documents::CompanyLicense)) }
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMemorandumOfAssociation))
+ }
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMinisterialDecree))
+ }
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Documents::CompanyRegistrationVerification))
+ }
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification))
+ }
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfRegistration)) }
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfUltimateBeneficialOwnership))
+ }
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+ sig {
+ params(bank_account_ownership_verification: T.nilable(::Stripe::Account::CreateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::Account::CreateParams::Documents::ProofOfUltimateBeneficialOwnership)).void
+ }
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ ); end
+ end
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :payments_pricing
+ sig { params(payments_pricing: T.nilable(T.nilable(String))).void }
+ def initialize(payments_pricing: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), title: T.nilable(String)).void
+ }
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Individual::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::Account::CreateParams::Individual::Verification::AdditionalDocument), document: T.nilable(::Stripe::Account::CreateParams::Individual::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # The individual's primary address.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::Address)) }
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Account::CreateParams::Individual::Dob))))
+ }
+ attr_accessor :dob
+ # The individual's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The individual's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The individual's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::RegisteredAddress)) }
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::Account::CreateParams::Individual::Address), address_kana: T.nilable(::Stripe::Account::CreateParams::Individual::AddressKana), address_kanji: T.nilable(::Stripe::Account::CreateParams::Individual::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::Account::CreateParams::Individual::Dob))), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::Account::CreateParams::Individual::RegisteredAddress), relationship: T.nilable(::Stripe::Account::CreateParams::Individual::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::Account::CreateParams::Individual::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ sig { params(display_name: T.nilable(String)).void }
+ def initialize(display_name: nil); end
+ end
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :secondary_color
+ sig {
+ params(icon: T.nilable(String), logo: T.nilable(String), primary_color: T.nilable(String), secondary_color: T.nilable(String)).void
+ }
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Settings::CardIssuing::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::Account::CreateParams::Settings::CardIssuing::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cvc_failure
+ sig {
+ params(avs_failure: T.nilable(T::Boolean), cvc_failure: T.nilable(T::Boolean)).void
+ }
+ def initialize(avs_failure: nil, cvc_failure: nil); end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Settings::CardPayments::DeclineOn))
+ }
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kanji
+ sig {
+ params(decline_on: T.nilable(::Stripe::Account::CreateParams::Settings::CardPayments::DeclineOn), statement_descriptor_prefix: T.nilable(String), statement_descriptor_prefix_kana: T.nilable(T.nilable(String)), statement_descriptor_prefix_kanji: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ ); end
+ end
+ class Invoices < Stripe::RequestParams
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :hosted_payment_method_save
+ sig { params(hosted_payment_method_save: T.nilable(String)).void }
+ def initialize(hosted_payment_method_save: nil); end
+ end
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kanji
+ sig {
+ params(statement_descriptor: T.nilable(String), statement_descriptor_kana: T.nilable(String), statement_descriptor_kanji: T.nilable(String)).void
+ }
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ ); end
+ end
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :weekly_anchor
+ sig {
+ params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void
+ }
+ def initialize(
+ delay_days: nil,
+ interval: nil,
+ monthly_anchor: nil,
+ weekly_anchor: nil
+ ); end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::Payouts::Schedule)) }
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(debit_negative_balances: T.nilable(T::Boolean), schedule: T.nilable(::Stripe::Account::CreateParams::Settings::Payouts::Schedule), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ debit_negative_balances: nil,
+ schedule: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ sig {
+ returns(T.nilable(::Stripe::Account::CreateParams::Settings::Treasury::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::Account::CreateParams::Settings::Treasury::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ # Settings specific to Bacs Direct Debit.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::BacsDebitPayments)) }
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::Branding)) }
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::CardIssuing)) }
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::CardPayments)) }
+ attr_accessor :card_payments
+ # Settings specific to the account’s use of Invoices.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::Invoices)) }
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::Payments)) }
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::Payouts)) }
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings::Treasury)) }
+ attr_accessor :treasury
+ sig {
+ params(bacs_debit_payments: T.nilable(::Stripe::Account::CreateParams::Settings::BacsDebitPayments), branding: T.nilable(::Stripe::Account::CreateParams::Settings::Branding), card_issuing: T.nilable(::Stripe::Account::CreateParams::Settings::CardIssuing), card_payments: T.nilable(::Stripe::Account::CreateParams::Settings::CardPayments), invoices: T.nilable(::Stripe::Account::CreateParams::Settings::Invoices), payments: T.nilable(::Stripe::Account::CreateParams::Settings::Payments), payouts: T.nilable(::Stripe::Account::CreateParams::Settings::Payouts), treasury: T.nilable(::Stripe::Account::CreateParams::Settings::Treasury)).void
+ }
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ ); end
+ end
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user's service agreement type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), service_agreement: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_token
+ # Business information about the account.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::BusinessProfile)) }
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Capabilities)) }
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Company)) }
+ attr_accessor :company
+ # A hash of configuration describing the account controller's attributes.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Controller)) }
+ attr_accessor :controller
+ # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Documents)) }
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig {
+ returns(T.nilable(T.any(String, ::Stripe::Account::CreateParams::BankAccount, ::Stripe::Account::CreateParams::Card, ::Stripe::Account::CreateParams::CardToken)))
+ }
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Groups)) }
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::Settings)) }
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ sig { returns(T.nilable(::Stripe::Account::CreateParams::TosAcceptance)) }
+ attr_accessor :tos_acceptance
+ # The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(account_token: T.nilable(String), business_profile: T.nilable(::Stripe::Account::CreateParams::BusinessProfile), business_type: T.nilable(String), capabilities: T.nilable(::Stripe::Account::CreateParams::Capabilities), company: T.nilable(::Stripe::Account::CreateParams::Company), controller: T.nilable(::Stripe::Account::CreateParams::Controller), country: T.nilable(String), default_currency: T.nilable(String), documents: T.nilable(::Stripe::Account::CreateParams::Documents), email: T.nilable(String), expand: T.nilable(T::Array[String]), external_account: T.nilable(T.any(String, ::Stripe::Account::CreateParams::BankAccount, ::Stripe::Account::CreateParams::Card, ::Stripe::Account::CreateParams::CardToken)), groups: T.nilable(::Stripe::Account::CreateParams::Groups), individual: T.nilable(::Stripe::Account::CreateParams::Individual), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), settings: T.nilable(::Stripe::Account::CreateParams::Settings), tos_acceptance: T.nilable(::Stripe::Account::CreateParams::TosAcceptance), type: T.nilable(String)).void
+ }
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ controller: nil,
+ country: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil,
+ type: nil
+ ); end
+ end
+ class PersonsParams < Stripe::RequestParams
+ class Relationship < Stripe::RequestParams
+ # A filter on the list of people returned based on whether these people are authorizers of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :authorizer
+ # A filter on the list of people returned based on whether these people are directors of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # A filter on the list of people returned based on whether these people are executives of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # A filter on the list of people returned based on whether these people are legal guardians of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :legal_guardian
+ # A filter on the list of people returned based on whether these people are owners of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # A filter on the list of people returned based on whether these people are the representative of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :representative
+ sig {
+ params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), representative: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ representative: nil
+ ); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filters on the list of people returned based on the person's relationship to the account's company.
+ sig { returns(T.nilable(::Stripe::Account::PersonsParams::Relationship)) }
+ attr_accessor :relationship
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), relationship: T.nilable(::Stripe::Account::PersonsParams::Relationship), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ relationship: nil,
+ starting_after: nil
+ ); end
+ end
+ class RejectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.
+ sig { returns(String) }
+ attr_accessor :reason
+ sig { params(expand: T.nilable(T::Array[String]), reason: String).void }
+ def initialize(expand: nil, reason: nil); end
+ end
+ # With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
+ # To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
+ #
+ # If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when
+ # creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding.
+ # You can prefill any information on the account.
+ sig {
+ params(params: T.any(::Stripe::Account::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+ #
+ # Test-mode accounts can be deleted at any time.
+ #
+ # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.
+ #
+ # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
+ sig {
+ params(account: String, params: T.any(::Stripe::Account::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def self.delete(account, params = {}, opts = {}); end
+
+ # With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+ #
+ # Test-mode accounts can be deleted at any time.
+ #
+ # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.
+ #
+ # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
+ sig {
+ params(params: T.any(::Stripe::Account::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
+ sig {
+ params(params: T.any(::Stripe::Account::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
+ sig {
+ params(params: T.any(::Stripe::Account::PersonsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def persons(params = {}, opts = {}); end
+
+ # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
+ sig {
+ params(account: String, params: T.any(::Stripe::Account::PersonsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.persons(account, params = {}, opts = {}); end
+
+ # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
+ #
+ # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
+ sig {
+ params(params: T.any(::Stripe::Account::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def reject(params = {}, opts = {}); end
+
+ # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
+ #
+ # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
+ sig {
+ params(account: String, params: T.any(::Stripe::Account::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def self.reject(account, params = {}, opts = {}); end
+
+ # Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
+ # left unchanged.
+ #
+ # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ # is application, which includes Custom accounts, you can update any information on the account.
+ #
+ # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ # is stripe, which includes Standard and Express accounts, you can update all information until you create
+ # an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding,
+ # after which some properties can no longer be updated.
+ #
+ # To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
+ # [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
+ sig {
+ params(account: String, params: T.any(::Stripe::Account::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def self.update(account, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/account_link.rbi b/rbi/stripe/resources/account_link.rbi
new file mode 100644
index 00000000..d8e8d448
--- /dev/null
+++ b/rbi/stripe/resources/account_link.rbi
@@ -0,0 +1,74 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Account Links are the means by which a Connect platform grants a connected account permission to access
+ # Stripe-hosted applications, such as Connect Onboarding.
+ #
+ # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)
+ class AccountLink < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The timestamp at which this account link will expire.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The URL for the account link.
+ sig { returns(String) }
+ attr_reader :url
+ class CreateParams < Stripe::RequestParams
+ class CollectionOptions < Stripe::RequestParams
+ # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :fields
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :future_requirements
+ sig { params(fields: T.nilable(String), future_requirements: T.nilable(String)).void }
+ def initialize(fields: nil, future_requirements: nil); end
+ end
+ # The identifier of the account to create an account link for.
+ sig { returns(String) }
+ attr_accessor :account
+ # The collect parameter is deprecated. Use `collection_options` instead.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collect
+ # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
+ sig { returns(T.nilable(::Stripe::AccountLink::CreateParams::CollectionOptions)) }
+ attr_accessor :collection_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refresh_url
+ # The URL that the user will be redirected to upon leaving or completing the linked flow.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(account: String, collect: T.nilable(String), collection_options: T.nilable(::Stripe::AccountLink::CreateParams::CollectionOptions), expand: T.nilable(T::Array[String]), refresh_url: T.nilable(String), return_url: T.nilable(String), type: String).void
+ }
+ def initialize(
+ account: nil,
+ collect: nil,
+ collection_options: nil,
+ expand: nil,
+ refresh_url: nil,
+ return_url: nil,
+ type: nil
+ ); end
+ end
+ # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
+ sig {
+ params(params: T.any(::Stripe::AccountLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountLink)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi
new file mode 100644
index 00000000..bd5f0085
--- /dev/null
+++ b/rbi/stripe/resources/account_session.rbi
@@ -0,0 +1,894 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
+ #
+ # We recommend that you create an AccountSession each time you need to display an embedded component
+ # to your user. Do not save AccountSessions to your database as they expire relatively
+ # quickly, and cannot be used more than once.
+ #
+ # Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
+ class AccountSession < APIResource
+ class Components < Stripe::StripeObject
+ class AccountManagement < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :external_account_collection
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class AccountOnboarding < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :external_account_collection
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class Balances < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :standard_payouts
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class Documents < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class FinancialAccount < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow external accounts to be linked for money transfer.
+ sig { returns(T::Boolean) }
+ attr_reader :external_account_collection
+ # Whether to allow sending money.
+ sig { returns(T::Boolean) }
+ attr_reader :send_money
+ # Whether to allow transferring balance.
+ sig { returns(T::Boolean) }
+ attr_reader :transfer_balance
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class FinancialAccountTransactions < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow card spend dispute management features.
+ sig { returns(T::Boolean) }
+ attr_reader :card_spend_dispute_management
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class IssuingCard < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow card management features.
+ sig { returns(T::Boolean) }
+ attr_reader :card_management
+ # Whether to allow card spend dispute management features.
+ sig { returns(T::Boolean) }
+ attr_reader :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ sig { returns(T::Boolean) }
+ attr_reader :cardholder_management
+ # Whether to allow spend control management features.
+ sig { returns(T::Boolean) }
+ attr_reader :spend_control_management
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class IssuingCardsList < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow card management features.
+ sig { returns(T::Boolean) }
+ attr_reader :card_management
+ # Whether to allow card spend dispute management features.
+ sig { returns(T::Boolean) }
+ attr_reader :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ sig { returns(T::Boolean) }
+ attr_reader :cardholder_management
+ # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow spend control management features.
+ sig { returns(T::Boolean) }
+ attr_reader :spend_control_management
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class NotificationBanner < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :external_account_collection
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class PaymentDetails < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :refund_management
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class Payments < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ sig { returns(T::Boolean) }
+ attr_reader :refund_management
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class Payouts < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T::Boolean) }
+ attr_reader :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :standard_payouts
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class PayoutsList < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class TaxRegistrations < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ class TaxSettings < Stripe::StripeObject
+ class Features < Stripe::StripeObject; end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ end
+ # Attribute for field account_management
+ sig { returns(AccountManagement) }
+ attr_reader :account_management
+ # Attribute for field account_onboarding
+ sig { returns(AccountOnboarding) }
+ attr_reader :account_onboarding
+ # Attribute for field balances
+ sig { returns(Balances) }
+ attr_reader :balances
+ # Attribute for field documents
+ sig { returns(Documents) }
+ attr_reader :documents
+ # Attribute for field financial_account
+ sig { returns(FinancialAccount) }
+ attr_reader :financial_account
+ # Attribute for field financial_account_transactions
+ sig { returns(FinancialAccountTransactions) }
+ attr_reader :financial_account_transactions
+ # Attribute for field issuing_card
+ sig { returns(IssuingCard) }
+ attr_reader :issuing_card
+ # Attribute for field issuing_cards_list
+ sig { returns(IssuingCardsList) }
+ attr_reader :issuing_cards_list
+ # Attribute for field notification_banner
+ sig { returns(NotificationBanner) }
+ attr_reader :notification_banner
+ # Attribute for field payment_details
+ sig { returns(PaymentDetails) }
+ attr_reader :payment_details
+ # Attribute for field payments
+ sig { returns(Payments) }
+ attr_reader :payments
+ # Attribute for field payouts
+ sig { returns(Payouts) }
+ attr_reader :payouts
+ # Attribute for field payouts_list
+ sig { returns(PayoutsList) }
+ attr_reader :payouts_list
+ # Attribute for field tax_registrations
+ sig { returns(TaxRegistrations) }
+ attr_reader :tax_registrations
+ # Attribute for field tax_settings
+ sig { returns(TaxSettings) }
+ attr_reader :tax_settings
+ end
+ # The ID of the account the AccountSession was created for
+ sig { returns(String) }
+ attr_reader :account
+ # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.
+ #
+ # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
+ #
+ # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
+ sig { returns(String) }
+ attr_reader :client_secret
+ # Attribute for field components
+ sig { returns(Components) }
+ attr_reader :components
+ # The timestamp at which this AccountSession will expire.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class AccountManagement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class AccountOnboarding < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Balances < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :standard_payouts
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), edit_payout_schedule: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean), instant_payouts: T.nilable(T::Boolean), standard_payouts: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Documents < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class FinancialAccount < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow external accounts to be linked for money transfer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ # Whether to allow sending money.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :send_money
+ # Whether to allow transferring balance.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_balance
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean), send_money: T.nilable(T::Boolean), transfer_balance: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil,
+ send_money: nil,
+ transfer_balance: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class FinancialAccountTransactions < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card spend dispute management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_spend_dispute_management
+ sig { params(card_spend_dispute_management: T.nilable(T::Boolean)).void }
+ def initialize(card_spend_dispute_management: nil); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class IssuingCard < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cardholder_management
+ # Whether to allow spend control management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :spend_control_management
+ sig {
+ params(card_management: T.nilable(T::Boolean), card_spend_dispute_management: T.nilable(T::Boolean), cardholder_management: T.nilable(T::Boolean), spend_control_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ spend_control_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class IssuingCardsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cardholder_management
+ # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow spend control management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :spend_control_management
+ sig {
+ params(card_management: T.nilable(T::Boolean), card_spend_dispute_management: T.nilable(T::Boolean), cardholder_management: T.nilable(T::Boolean), disable_stripe_user_authentication: T.nilable(T::Boolean), spend_control_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ disable_stripe_user_authentication: nil,
+ spend_control_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class NotificationBanner < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class PaymentDetails < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_management
+ sig {
+ params(capture_payments: T.nilable(T::Boolean), destination_on_behalf_of_charge_management: T.nilable(T::Boolean), dispute_management: T.nilable(T::Boolean), refund_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Payments < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_management
+ sig {
+ params(capture_payments: T.nilable(T::Boolean), destination_on_behalf_of_charge_management: T.nilable(T::Boolean), dispute_management: T.nilable(T::Boolean), refund_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Payouts < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :standard_payouts
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), edit_payout_schedule: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean), instant_payouts: T.nilable(T::Boolean), standard_payouts: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class PayoutsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class TaxRegistrations < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class TaxSettings < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ # Configuration for the account management embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement))
+ }
+ attr_accessor :account_management
+ # Configuration for the account onboarding embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding))
+ }
+ attr_accessor :account_onboarding
+ # Configuration for the balances embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances)) }
+ attr_accessor :balances
+ # Configuration for the documents embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents)) }
+ attr_accessor :documents
+ # Configuration for the financial account embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount))
+ }
+ attr_accessor :financial_account
+ # Configuration for the financial account transactions embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions))
+ }
+ attr_accessor :financial_account_transactions
+ # Configuration for the issuing card embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard)) }
+ attr_accessor :issuing_card
+ # Configuration for the issuing cards list embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList))
+ }
+ attr_accessor :issuing_cards_list
+ # Configuration for the notification banner embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner))
+ }
+ attr_accessor :notification_banner
+ # Configuration for the payment details embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails))
+ }
+ attr_accessor :payment_details
+ # Configuration for the payments embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments)) }
+ attr_accessor :payments
+ # Configuration for the payouts embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts)) }
+ attr_accessor :payouts
+ # Configuration for the payouts list embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList)) }
+ attr_accessor :payouts_list
+ # Configuration for the tax registrations embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations))
+ }
+ attr_accessor :tax_registrations
+ # Configuration for the tax settings embedded component.
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings)) }
+ attr_accessor :tax_settings
+ sig {
+ params(account_management: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement), account_onboarding: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding), balances: T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances), documents: T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents), financial_account: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount), financial_account_transactions: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions), issuing_card: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard), issuing_cards_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList), notification_banner: T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner), payment_details: T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails), payments: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments), payouts: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts), payouts_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList), tax_registrations: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations), tax_settings: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings)).void
+ }
+ def initialize(
+ account_management: nil,
+ account_onboarding: nil,
+ balances: nil,
+ documents: nil,
+ financial_account: nil,
+ financial_account_transactions: nil,
+ issuing_card: nil,
+ issuing_cards_list: nil,
+ notification_banner: nil,
+ payment_details: nil,
+ payments: nil,
+ payouts: nil,
+ payouts_list: nil,
+ tax_registrations: nil,
+ tax_settings: nil
+ ); end
+ end
+ # The identifier of the account to create an Account Session for.
+ sig { returns(String) }
+ attr_accessor :account
+ # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
+ sig { returns(::Stripe::AccountSession::CreateParams::Components) }
+ attr_accessor :components
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(account: String, components: ::Stripe::AccountSession::CreateParams::Components, expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(account: nil, components: nil, expand: nil); end
+ end
+ # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
+ sig {
+ params(params: T.any(::Stripe::AccountSession::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountSession)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/apple_pay_domain.rbi b/rbi/stripe/resources/apple_pay_domain.rbi
new file mode 100644
index 00000000..4302bfee
--- /dev/null
+++ b/rbi/stripe/resources/apple_pay_domain.rbi
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Domains registered for Apple Pay on the Web
+ class ApplePayDomain < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Attribute for field domain_name
+ sig { returns(String) }
+ attr_reader :domain_name
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :domain_name
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(domain_name: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ domain_name: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ sig { returns(String) }
+ attr_accessor :domain_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(domain_name: String, expand: T.nilable(T::Array[String])).void }
+ def initialize(domain_name: nil, expand: nil); end
+ end
+ # Create an apple pay domain.
+ sig {
+ params(params: T.any(::Stripe::ApplePayDomain::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Delete an apple pay domain.
+ sig {
+ params(domain: String, params: T.any(::Stripe::ApplePayDomain::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain)
+ }
+ def self.delete(domain, params = {}, opts = {}); end
+
+ # Delete an apple pay domain.
+ sig {
+ params(params: T.any(::Stripe::ApplePayDomain::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # List apple pay domains.
+ sig {
+ params(params: T.any(::Stripe::ApplePayDomain::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/application.rbi b/rbi/stripe/resources/application.rbi
new file mode 100644
index 00000000..ececc351
--- /dev/null
+++ b/rbi/stripe/resources/application.rbi
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class Application < APIResource
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The name of the application.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/application_fee.rbi b/rbi/stripe/resources/application_fee.rbi
new file mode 100644
index 00000000..cec14bd1
--- /dev/null
+++ b/rbi/stripe/resources/application_fee.rbi
@@ -0,0 +1,118 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ApplicationFee < APIResource
+ class FeeSource < Stripe::StripeObject
+ # Charge ID that created this application fee.
+ sig { returns(String) }
+ attr_reader :charge
+ # Payout ID that created this application fee.
+ sig { returns(String) }
+ attr_reader :payout
+ # Type of object that created the application fee.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # ID of the Stripe account this fee was taken from.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Amount earned, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)
+ sig { returns(Integer) }
+ attr_reader :amount_refunded
+ # ID of the Connect application that earned the fee.
+ sig { returns(T.any(String, Stripe::Application)) }
+ attr_reader :application
+ # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # ID of the charge that the application fee was taken from.
+ sig { returns(T.any(String, Stripe::Charge)) }
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
+ sig { returns(T.nilable(FeeSource)) }
+ attr_reader :fee_source
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :originating_transaction
+ # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
+ sig { returns(T::Boolean) }
+ attr_reader :refunded
+ # A list of refunds that have been applied to the fee.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :refunds
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return application fees for the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return applications fees that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::ApplicationFee::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::ApplicationFee::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
+ sig {
+ params(params: T.any(::Stripe::ApplicationFee::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/application_fee_refund.rbi b/rbi/stripe/resources/application_fee_refund.rbi
new file mode 100644
index 00000000..fd595463
--- /dev/null
+++ b/rbi/stripe/resources/application_fee_refund.rbi
@@ -0,0 +1,37 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # `Application Fee Refund` objects allow you to refund an application fee that
+ # has previously been created but not yet refunded. Funds will be refunded to
+ # the Stripe account from which the fee was originally collected.
+ #
+ # Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee)
+ class ApplicationFeeRefund < APIResource
+ # Amount, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Balance transaction that describes the impact on your account balance.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the application fee that was refunded.
+ sig { returns(T.any(String, Stripe::ApplicationFee)) }
+ attr_reader :fee
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/apps/secret.rbi b/rbi/stripe/resources/apps/secret.rbi
new file mode 100644
index 00000000..68166e81
--- /dev/null
+++ b/rbi/stripe/resources/apps/secret.rbi
@@ -0,0 +1,195 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Apps
+ # Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
+ #
+ # The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
+ #
+ # All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.
+ #
+ # A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
+ #
+ # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
+ class Secret < APIResource
+ class Scope < Stripe::StripeObject
+ # The secret scope type.
+ sig { returns(String) }
+ attr_reader :type
+ # The user ID, if type is set to "user"
+ sig { returns(String) }
+ attr_reader :user
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # If true, indicates that this secret has been deleted
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ # The Unix timestamp for the expiry time of the secret, after which the secret deletes.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The plaintext secret value to be stored.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payload
+ # Attribute for field scope
+ sig { returns(Scope) }
+ attr_reader :scope
+ class ListParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::Secret::ListParams::Scope) }
+ attr_accessor :scope
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), scope: ::Stripe::Apps::Secret::ListParams::Scope, starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ scope: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The Unix timestamp for the expiry time of the secret, after which the secret deletes.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_accessor :name
+ # The plaintext secret value to be stored.
+ sig { returns(String) }
+ attr_accessor :payload
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::Secret::CreateParams::Scope) }
+ attr_accessor :scope
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), name: String, payload: String, scope: ::Stripe::Apps::Secret::CreateParams::Scope).void
+ }
+ def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil); end
+ end
+ class FindParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::Secret::FindParams::Scope) }
+ attr_accessor :scope
+ sig {
+ params(expand: T.nilable(T::Array[String]), name: String, scope: ::Stripe::Apps::Secret::FindParams::Scope).void
+ }
+ def initialize(expand: nil, name: nil, scope: nil); end
+ end
+ class DeleteWhereParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::Secret::DeleteWhereParams::Scope) }
+ attr_accessor :scope
+ sig {
+ params(expand: T.nilable(T::Array[String]), name: String, scope: ::Stripe::Apps::Secret::DeleteWhereParams::Scope).void
+ }
+ def initialize(expand: nil, name: nil, scope: nil); end
+ end
+ # Create or replace a secret in the secret store.
+ sig {
+ params(params: T.any(::Stripe::Apps::Secret::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a secret from the secret store by name and scope.
+ sig {
+ params(params: T.any(::Stripe::Apps::Secret::DeleteWhereParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret)
+ }
+ def self.delete_where(params = {}, opts = {}); end
+
+ # Finds a secret in the secret store by name and scope.
+ sig {
+ params(params: T.any(::Stripe::Apps::Secret::FindParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret)
+ }
+ def self.find(params = {}, opts = {}); end
+
+ # List all secrets stored on the given scope.
+ sig {
+ params(params: T.any(::Stripe::Apps::Secret::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/balance.rbi b/rbi/stripe/resources/balance.rbi
new file mode 100644
index 00000000..8adeebfa
--- /dev/null
+++ b/rbi/stripe/resources/balance.rbi
@@ -0,0 +1,180 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # This is an object representing your Stripe balance. You can retrieve it to see
+ # the balance currently on your Stripe account.
+ #
+ # You can also retrieve the balance history, which contains a list of
+ # [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance
+ # (charges, payouts, and so forth).
+ #
+ # The available and pending amounts for each currency are broken down further by
+ # payment source types.
+ #
+ # Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
+ class Balance < SingletonAPIResource
+ class Available < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ sig { returns(Integer) }
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ sig { returns(Integer) }
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ sig { returns(Integer) }
+ attr_reader :fpx
+ end
+ # Balance amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field source_types
+ sig { returns(SourceTypes) }
+ attr_reader :source_types
+ end
+ class ConnectReserved < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ sig { returns(Integer) }
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ sig { returns(Integer) }
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ sig { returns(Integer) }
+ attr_reader :fpx
+ end
+ # Balance amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field source_types
+ sig { returns(SourceTypes) }
+ attr_reader :source_types
+ end
+ class InstantAvailable < Stripe::StripeObject
+ class NetAvailable < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ sig { returns(Integer) }
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ sig { returns(Integer) }
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ sig { returns(Integer) }
+ attr_reader :fpx
+ end
+ # Net balance amount, subtracting fees from platform-set pricing.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # ID of the external account for this net balance (not expandable).
+ sig { returns(String) }
+ attr_reader :destination
+ # Attribute for field source_types
+ sig { returns(SourceTypes) }
+ attr_reader :source_types
+ end
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ sig { returns(Integer) }
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ sig { returns(Integer) }
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ sig { returns(Integer) }
+ attr_reader :fpx
+ end
+ # Balance amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Breakdown of balance by destination.
+ sig { returns(T::Array[NetAvailable]) }
+ attr_reader :net_available
+ # Attribute for field source_types
+ sig { returns(SourceTypes) }
+ attr_reader :source_types
+ end
+ class Issuing < Stripe::StripeObject
+ class Available < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ sig { returns(Integer) }
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ sig { returns(Integer) }
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ sig { returns(Integer) }
+ attr_reader :fpx
+ end
+ # Balance amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field source_types
+ sig { returns(SourceTypes) }
+ attr_reader :source_types
+ end
+ # Funds that are available for use.
+ sig { returns(T::Array[Available]) }
+ attr_reader :available
+ end
+ class Pending < Stripe::StripeObject
+ class SourceTypes < Stripe::StripeObject
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
+ sig { returns(Integer) }
+ attr_reader :bank_account
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
+ sig { returns(Integer) }
+ attr_reader :card
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
+ sig { returns(Integer) }
+ attr_reader :fpx
+ end
+ # Balance amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field source_types
+ sig { returns(SourceTypes) }
+ attr_reader :source_types
+ end
+ # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
+ sig { returns(T::Array[Available]) }
+ attr_reader :available
+ # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
+ sig { returns(T::Array[ConnectReserved]) }
+ attr_reader :connect_reserved
+ # Funds that you can pay out using Instant Payouts.
+ sig { returns(T::Array[InstantAvailable]) }
+ attr_reader :instant_available
+ # Attribute for field issuing
+ sig { returns(Issuing) }
+ attr_reader :issuing
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.
+ sig { returns(T::Array[Pending]) }
+ attr_reader :pending
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/balance_transaction.rbi b/rbi/stripe/resources/balance_transaction.rbi
new file mode 100644
index 00000000..cecc9fcf
--- /dev/null
+++ b/rbi/stripe/resources/balance_transaction.rbi
@@ -0,0 +1,144 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Balance transactions represent funds moving through your Stripe account.
+ # Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.
+ #
+ # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
+ class BalanceTransaction < APIResource
+ class FeeDetail < Stripe::StripeObject
+ # Amount of the fee, in cents.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # ID of the Connect application that earned the fee.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The date that the transaction's net funds become available in the Stripe balance.
+ sig { returns(Integer) }
+ attr_reader :available_on
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :exchange_rate
+ # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
+ sig { returns(Integer) }
+ attr_reader :fee
+ # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
+ sig { returns(T::Array[FeeDetail]) }
+ attr_reader :fee_details
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`
+ sig { returns(Integer) }
+ attr_reader :net
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
+ sig { returns(String) }
+ attr_reader :reporting_category
+ # This transaction relates to the Stripe object.
+ sig {
+ returns(T.nilable(T.any(String, T.any(Stripe::ApplicationFee, Stripe::Charge, Stripe::ConnectCollectionTransfer, Stripe::CustomerCashBalanceTransaction, Stripe::Dispute, Stripe::ApplicationFeeRefund, Stripe::Issuing::Authorization, Stripe::Issuing::Dispute, Stripe::Issuing::Transaction, Stripe::Payout, Stripe::Refund, Stripe::ReserveTransaction, Stripe::TaxDeductedAtSource, Stripe::Topup, Stripe::Transfer, Stripe::Reversal))))
+ }
+ attr_reader :source
+ # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
+ sig { returns(String) }
+ attr_reader :status
+ # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return transactions that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::BalanceTransaction::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return transactions in a certain currency. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payout
+ # Only returns the original transaction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(created: T.nilable(T.any(::Stripe::BalanceTransaction::ListParams::Created, Integer)), currency: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payout: T.nilable(String), source: T.nilable(String), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payout: nil,
+ source: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
+ #
+ # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
+ sig {
+ params(params: T.any(::Stripe::BalanceTransaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/bank_account.rbi b/rbi/stripe/resources/bank_account.rbi
new file mode 100644
index 00000000..0ebd435c
--- /dev/null
+++ b/rbi/stripe/resources/bank_account.rbi
@@ -0,0 +1,127 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # These bank accounts are payment methods on `Customer` objects.
+ #
+ # On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
+ # destinations on `Account` objects for connected accounts.
+ # They can be bank accounts or debit cards as well, and are documented in the links above.
+ #
+ # Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
+ class BankAccount < APIResource
+ class FutureRequirements < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T.nilable(T::Array[Error])) }
+ attr_reader :errors
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :pending_verification
+ end
+ class Requirements < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T.nilable(T::Array[Error])) }
+ attr_reader :errors
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :pending_verification
+ end
+ # The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :account
+ # The name of the person or business that owns the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_name
+ # The type of entity that holds the account. This can be either `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :available_payout_methods
+ # Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_reader :country
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
+ sig { returns(String) }
+ attr_reader :currency
+ # The ID of the customer that the bank account is associated with.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Whether this bank account is the default external account for its currency.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :default_for_currency
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
+ sig { returns(T.nilable(FutureRequirements)) }
+ attr_reader :future_requirements
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The last four digits of the bank account number.
+ sig { returns(String) }
+ attr_reader :last4
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Information about the requirements for the bank account, including what information needs to be collected.
+ sig { returns(T.nilable(Requirements)) }
+ attr_reader :requirements
+ # The routing transit number for the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
+ #
+ # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
+ sig { returns(String) }
+ attr_reader :status
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi
new file mode 100644
index 00000000..31dc2bbc
--- /dev/null
+++ b/rbi/stripe/resources/billing/alert.rbi
@@ -0,0 +1,201 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
+ class Alert < APIResource
+ class UsageThreshold < Stripe::StripeObject
+ class Filter < Stripe::StripeObject
+ # Limit the scope of the alert to this customer ID
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Attribute for field type
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ sig { returns(T.nilable(T::Array[Filter])) }
+ attr_reader :filters
+ # The value at which this alert will trigger.
+ sig { returns(Integer) }
+ attr_reader :gte
+ # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
+ sig { returns(T.any(String, Stripe::Billing::Meter)) }
+ attr_reader :meter
+ # Defines how the alert will behave.
+ sig { returns(String) }
+ attr_reader :recurrence
+ end
+ # Defines the type of the alert.
+ sig { returns(String) }
+ attr_reader :alert_type
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Status of the alert. This can be active, inactive or archived.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # Title of the alert.
+ sig { returns(String) }
+ attr_reader :title
+ # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).
+ sig { returns(T.nilable(UsageThreshold)) }
+ attr_reader :usage_threshold
+ class ListParams < Stripe::RequestParams
+ # Filter results to only include this type of alert.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :alert_type
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filter results to only include alerts with the given meter.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(alert_type: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), meter: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ alert_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ meter: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class UsageThreshold < Stripe::RequestParams
+ class Filter < Stripe::RequestParams
+ # Limit the scope to this usage alert only to this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # What type of filter is being applied to this usage alert.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(customer: T.nilable(String), type: String).void }
+ def initialize(customer: nil, type: nil); end
+ end
+ # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Billing::Alert::CreateParams::UsageThreshold::Filter]))
+ }
+ attr_accessor :filters
+ # Defines at which value the alert will fire.
+ sig { returns(Integer) }
+ attr_accessor :gte
+ # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # Whether the alert should only fire only once, or once per billing cycle.
+ sig { returns(String) }
+ attr_accessor :recurrence
+ sig {
+ params(filters: T.nilable(T::Array[::Stripe::Billing::Alert::CreateParams::UsageThreshold::Filter]), gte: Integer, meter: T.nilable(String), recurrence: String).void
+ }
+ def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil); end
+ end
+ # The type of alert to create.
+ sig { returns(String) }
+ attr_accessor :alert_type
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The title of the alert.
+ sig { returns(String) }
+ attr_accessor :title
+ # The configuration of the usage threshold.
+ sig { returns(T.nilable(::Stripe::Billing::Alert::CreateParams::UsageThreshold)) }
+ attr_accessor :usage_threshold
+ sig {
+ params(alert_type: String, expand: T.nilable(T::Array[String]), title: String, usage_threshold: T.nilable(::Stripe::Billing::Alert::CreateParams::UsageThreshold)).void
+ }
+ def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil); end
+ end
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Reactivates this alert, allowing it to trigger again.
+ sig {
+ params(params: T.any(::Stripe::Billing::Alert::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def activate(params = {}, opts = {}); end
+
+ # Reactivates this alert, allowing it to trigger again.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::Alert::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def self.activate(id, params = {}, opts = {}); end
+
+ # Archives this alert, removing it from the list view and APIs. This is non-reversible.
+ sig {
+ params(params: T.any(::Stripe::Billing::Alert::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def archive(params = {}, opts = {}); end
+
+ # Archives this alert, removing it from the list view and APIs. This is non-reversible.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::Alert::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def self.archive(id, params = {}, opts = {}); end
+
+ # Creates a billing alert
+ sig {
+ params(params: T.any(::Stripe::Billing::Alert::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deactivates this alert, preventing it from triggering.
+ sig {
+ params(params: T.any(::Stripe::Billing::Alert::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def deactivate(params = {}, opts = {}); end
+
+ # Deactivates this alert, preventing it from triggering.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::Alert::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def self.deactivate(id, params = {}, opts = {}); end
+
+ # Lists billing active and inactive alerts
+ sig {
+ params(params: T.any(::Stripe::Billing::Alert::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/alert_triggered.rbi b/rbi/stripe/resources/billing/alert_triggered.rbi
new file mode 100644
index 00000000..88e1dcac
--- /dev/null
+++ b/rbi/stripe/resources/billing/alert_triggered.rbi
@@ -0,0 +1,28 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class AlertTriggered < APIResource
+ # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
+ sig { returns(Stripe::Billing::Alert) }
+ attr_reader :alert
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # ID of customer for which the alert triggered
+ sig { returns(String) }
+ attr_reader :customer
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The value triggering the alert
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi
new file mode 100644
index 00000000..157ffeba
--- /dev/null
+++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi
@@ -0,0 +1,63 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # Indicates the billing credit balance for billing credits granted to a customer.
+ class CreditBalanceSummary < SingletonAPIResource
+ class Balance < Stripe::StripeObject
+ class AvailableBalance < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # A positive integer representing the amount.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ # The monetary amount.
+ sig { returns(T.nilable(Monetary)) }
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class LedgerBalance < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # A positive integer representing the amount.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ # The monetary amount.
+ sig { returns(T.nilable(Monetary)) }
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Attribute for field available_balance
+ sig { returns(AvailableBalance) }
+ attr_reader :available_balance
+ # Attribute for field ledger_balance
+ sig { returns(LedgerBalance) }
+ attr_reader :ledger_balance
+ end
+ # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
+ sig { returns(T::Array[Balance]) }
+ attr_reader :balances
+ # The customer the balance is for.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi
new file mode 100644
index 00000000..730a9ca2
--- /dev/null
+++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi
@@ -0,0 +1,147 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant.
+ class CreditBalanceTransaction < APIResource
+ class Credit < Stripe::StripeObject
+ class Amount < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # A positive integer representing the amount.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ # The monetary amount.
+ sig { returns(T.nilable(Monetary)) }
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class CreditsApplicationInvoiceVoided < Stripe::StripeObject
+ # The invoice to which the reinstated billing credits were originally applied.
+ sig { returns(T.any(String, Stripe::Invoice)) }
+ attr_reader :invoice
+ # The invoice line item to which the reinstated billing credits were originally applied.
+ sig { returns(String) }
+ attr_reader :invoice_line_item
+ end
+ # Attribute for field amount
+ sig { returns(Amount) }
+ attr_reader :amount
+ # Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
+ sig { returns(T.nilable(CreditsApplicationInvoiceVoided)) }
+ attr_reader :credits_application_invoice_voided
+ # The type of credit transaction.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Debit < Stripe::StripeObject
+ class Amount < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # A positive integer representing the amount.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ # The monetary amount.
+ sig { returns(T.nilable(Monetary)) }
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class CreditsApplied < Stripe::StripeObject
+ # The invoice to which the billing credits were applied.
+ sig { returns(T.any(String, Stripe::Invoice)) }
+ attr_reader :invoice
+ # The invoice line item to which the billing credits were applied.
+ sig { returns(String) }
+ attr_reader :invoice_line_item
+ end
+ # Attribute for field amount
+ sig { returns(Amount) }
+ attr_reader :amount
+ # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.
+ sig { returns(T.nilable(CreditsApplied)) }
+ attr_reader :credits_applied
+ # The type of debit transaction.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Credit details for this credit balance transaction. Only present if type is `credit`.
+ sig { returns(T.nilable(Credit)) }
+ attr_reader :credit
+ # The credit grant associated with this credit balance transaction.
+ sig { returns(T.any(String, Stripe::Billing::CreditGrant)) }
+ attr_reader :credit_grant
+ # Debit details for this credit balance transaction. Only present if type is `debit`.
+ sig { returns(T.nilable(Debit)) }
+ attr_reader :debit
+ # The effective time of this credit balance transaction.
+ sig { returns(Integer) }
+ attr_reader :effective_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the test clock this credit balance transaction belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # The type of credit balance transaction (credit or debit).
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ # The credit grant for which to fetch credit balance transactions.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :credit_grant
+ # The customer for which to fetch credit balance transactions.
+ sig { returns(String) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(credit_grant: T.nilable(String), customer: String, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ credit_grant: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ # Retrieve a list of credit balance transactions.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditBalanceTransaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi
new file mode 100644
index 00000000..f6460e01
--- /dev/null
+++ b/rbi/stripe/resources/billing/credit_grant.rbi
@@ -0,0 +1,291 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # A credit grant is an API resource that documents the allocation of some billing credits to a customer.
+ #
+ # Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
+ class CreditGrant < APIResource
+ class Amount < Stripe::StripeObject
+ class Monetary < Stripe::StripeObject
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # A positive integer representing the amount.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ # The monetary amount.
+ sig { returns(T.nilable(Monetary)) }
+ attr_reader :monetary
+ # The type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class ApplicabilityConfig < Stripe::StripeObject
+ class Scope < Stripe::StripeObject
+ class Price < Stripe::StripeObject
+ # Unique identifier for the object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`.
+ sig { returns(String) }
+ attr_reader :price_type
+ # The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`.
+ sig { returns(T::Array[Price]) }
+ attr_reader :prices
+ end
+ # Attribute for field scope
+ sig { returns(Scope) }
+ attr_reader :scope
+ end
+ # Attribute for field amount
+ sig { returns(Amount) }
+ attr_reader :amount
+ # Attribute for field applicability_config
+ sig { returns(ApplicabilityConfig) }
+ attr_reader :applicability_config
+ # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
+ sig { returns(String) }
+ attr_reader :category
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # ID of the customer receiving the billing credits.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # The time when the billing credits become effective-when they're eligible for use.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :effective_at
+ # The time when the billing credits expire. If not present, the billing credits don't expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # A descriptive name shown in dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :priority
+ # ID of the test clock this credit grant belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :updated
+ # The time when this credit grant was voided. If not present, the credit grant hasn't been voided.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :voided_at
+ class ListParams < Stripe::RequestParams
+ # Only return credit grants for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ class Monetary < Stripe::RequestParams
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
+ sig { returns(String) }
+ attr_accessor :currency
+ # A positive integer representing the amount of the credit grant.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(currency: String, value: Integer).void }
+ def initialize(currency: nil, value: nil); end
+ end
+ # The monetary amount.
+ sig { returns(T.nilable(::Stripe::Billing::CreditGrant::CreateParams::Amount::Monetary)) }
+ attr_accessor :monetary
+ # Specify the type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(monetary: T.nilable(::Stripe::Billing::CreditGrant::CreateParams::Amount::Monetary), type: String).void
+ }
+ def initialize(monetary: nil, type: nil); end
+ end
+ class ApplicabilityConfig < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ class Price < Stripe::RequestParams
+ # The price ID this credit grant should apply to.
+ sig { returns(String) }
+ attr_accessor :id
+ sig { params(id: String).void }
+ def initialize(id: nil); end
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price_type
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig::Scope::Price]))
+ }
+ attr_accessor :prices
+ sig {
+ params(price_type: T.nilable(String), prices: T.nilable(T::Array[::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig::Scope::Price])).void
+ }
+ def initialize(price_type: nil, prices: nil); end
+ end
+ # Specify the scope of this applicability config.
+ sig { returns(::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig::Scope) }
+ attr_accessor :scope
+ sig {
+ params(scope: ::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig::Scope).void
+ }
+ def initialize(scope: nil); end
+ end
+ # Amount of this credit grant.
+ sig { returns(::Stripe::Billing::CreditGrant::CreateParams::Amount) }
+ attr_accessor :amount
+ # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
+ sig { returns(::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig) }
+ attr_accessor :applicability_config
+ # The category of this credit grant.
+ sig { returns(String) }
+ attr_accessor :category
+ # ID of the customer to receive the billing credits.
+ sig { returns(String) }
+ attr_accessor :customer
+ # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The time when the billing credits expire. If not specified, the billing credits don't expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A descriptive name shown in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :priority
+ sig {
+ params(amount: ::Stripe::Billing::CreditGrant::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: T.nilable(Integer), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(String), priority: T.nilable(Integer)).void
+ }
+ def initialize(
+ amount: nil,
+ applicability_config: nil,
+ category: nil,
+ customer: nil,
+ effective_at: nil,
+ expand: nil,
+ expires_at: nil,
+ metadata: nil,
+ name: nil,
+ priority: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, Integer))), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(expand: nil, expires_at: nil, metadata: nil); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class VoidGrantParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a credit grant.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditGrant::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Expires a credit grant.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditGrant::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def expire(params = {}, opts = {}); end
+
+ # Expires a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrant::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def self.expire(id, params = {}, opts = {}); end
+
+ # Retrieve a list of credit grants.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditGrant::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrant::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def self.update(id, params = {}, opts = {}); end
+
+ # Voids a credit grant.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditGrant::VoidGrantParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def void_grant(params = {}, opts = {}); end
+
+ # Voids a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrant::VoidGrantParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def self.void_grant(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/meter.rbi b/rbi/stripe/resources/billing/meter.rbi
new file mode 100644
index 00000000..7b7684da
--- /dev/null
+++ b/rbi/stripe/resources/billing/meter.rbi
@@ -0,0 +1,226 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill.
+ #
+ # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)
+ class Meter < APIResource
+ class CustomerMapping < Stripe::StripeObject
+ # The key in the meter event payload to use for mapping the event to a customer.
+ sig { returns(String) }
+ attr_reader :event_payload_key
+ # The method for mapping a meter event to a customer.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class DefaultAggregation < Stripe::StripeObject
+ # Specifies how events are aggregated.
+ sig { returns(String) }
+ attr_reader :formula
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # The time the meter was deactivated, if any. Measured in seconds since Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :deactivated_at
+ end
+ class ValueSettings < Stripe::StripeObject
+ # The key in the meter event payload to use as the value for this meter.
+ sig { returns(String) }
+ attr_reader :event_payload_key
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Attribute for field customer_mapping
+ sig { returns(CustomerMapping) }
+ attr_reader :customer_mapping
+ # Attribute for field default_aggregation
+ sig { returns(DefaultAggregation) }
+ attr_reader :default_aggregation
+ # The meter's name.
+ sig { returns(String) }
+ attr_reader :display_name
+ # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
+ sig { returns(String) }
+ attr_reader :event_name
+ # The time window to pre-aggregate meter events for, if any.
+ sig { returns(T.nilable(String)) }
+ attr_reader :event_time_window
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The meter's status.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :updated
+ # Attribute for field value_settings
+ sig { returns(ValueSettings) }
+ attr_reader :value_settings
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Filter results to only include meters with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CustomerMapping < Stripe::RequestParams
+ # The key in the meter event payload to use for mapping the event to a customer.
+ sig { returns(String) }
+ attr_accessor :event_payload_key
+ # The method for mapping a meter event to a customer. Must be `by_id`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(event_payload_key: String, type: String).void }
+ def initialize(event_payload_key: nil, type: nil); end
+ end
+ class DefaultAggregation < Stripe::RequestParams
+ # Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window.
+ sig { returns(String) }
+ attr_accessor :formula
+ sig { params(formula: String).void }
+ def initialize(formula: nil); end
+ end
+ class ValueSettings < Stripe::RequestParams
+ # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
+ sig { returns(String) }
+ attr_accessor :event_payload_key
+ sig { params(event_payload_key: String).void }
+ def initialize(event_payload_key: nil); end
+ end
+ # Fields that specify how to map a meter event to a customer.
+ sig { returns(T.nilable(::Stripe::Billing::Meter::CreateParams::CustomerMapping)) }
+ attr_accessor :customer_mapping
+ # The default settings to aggregate a meter's events with.
+ sig { returns(::Stripe::Billing::Meter::CreateParams::DefaultAggregation) }
+ attr_accessor :default_aggregation
+ # The meter’s name. Not visible to the customer.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # The time window to pre-aggregate meter events for, if any.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :event_time_window
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Fields that specify how to calculate a meter event's value.
+ sig { returns(T.nilable(::Stripe::Billing::Meter::CreateParams::ValueSettings)) }
+ attr_accessor :value_settings
+ sig {
+ params(customer_mapping: T.nilable(::Stripe::Billing::Meter::CreateParams::CustomerMapping), default_aggregation: ::Stripe::Billing::Meter::CreateParams::DefaultAggregation, display_name: String, event_name: String, event_time_window: T.nilable(String), expand: T.nilable(T::Array[String]), value_settings: T.nilable(::Stripe::Billing::Meter::CreateParams::ValueSettings)).void
+ }
+ def initialize(
+ customer_mapping: nil,
+ default_aggregation: nil,
+ display_name: nil,
+ event_name: nil,
+ event_time_window: nil,
+ expand: nil,
+ value_settings: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # The meter’s name. Not visible to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(display_name: T.nilable(String), expand: T.nilable(T::Array[String])).void }
+ def initialize(display_name: nil, expand: nil); end
+ end
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a billing meter.
+ sig {
+ params(params: T.any(::Stripe::Billing::Meter::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
+ sig {
+ params(params: T.any(::Stripe::Billing::Meter::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def deactivate(params = {}, opts = {}); end
+
+ # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::Meter::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def self.deactivate(id, params = {}, opts = {}); end
+
+ # Retrieve a list of billing meters.
+ sig {
+ params(params: T.any(::Stripe::Billing::Meter::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
+ sig {
+ params(params: T.any(::Stripe::Billing::Meter::ReactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def reactivate(params = {}, opts = {}); end
+
+ # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::Meter::ReactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def self.reactivate(id, params = {}, opts = {}); end
+
+ # Updates a billing meter.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::Meter::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def self.update(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/meter_event.rbi b/rbi/stripe/resources/billing/meter_event.rbi
new file mode 100644
index 00000000..4679dfef
--- /dev/null
+++ b/rbi/stripe/resources/billing/meter_event.rbi
@@ -0,0 +1,64 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events.
+ class MeterEvent < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_reader :event_name
+ # A unique identifier for the event.
+ sig { returns(String) }
+ attr_reader :identifier
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :payload
+ # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :timestamp
+ class CreateParams < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ sig { returns(T::Hash[String, String]) }
+ attr_accessor :payload
+ # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :timestamp
+ sig {
+ params(event_name: String, expand: T.nilable(T::Array[String]), identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(Integer)).void
+ }
+ def initialize(
+ event_name: nil,
+ expand: nil,
+ identifier: nil,
+ payload: nil,
+ timestamp: nil
+ ); end
+ end
+ # Creates a billing meter event.
+ sig {
+ params(params: T.any(::Stripe::Billing::MeterEvent::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEvent)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/billing/meter_event_adjustment.rbi
new file mode 100644
index 00000000..a574fe93
--- /dev/null
+++ b/rbi/stripe/resources/billing/meter_event_adjustment.rbi
@@ -0,0 +1,64 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer.
+ class MeterEventAdjustment < APIResource
+ class Cancel < Stripe::StripeObject
+ # Unique identifier for the event.
+ sig { returns(T.nilable(String)) }
+ attr_reader :identifier
+ end
+ # Specifies which event to cancel.
+ sig { returns(T.nilable(Cancel)) }
+ attr_reader :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_reader :event_name
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The meter event adjustment's status.
+ sig { returns(String) }
+ attr_reader :status
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ sig { returns(String) }
+ attr_reader :type
+ class CreateParams < Stripe::RequestParams
+ class Cancel < Stripe::RequestParams
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :identifier
+ sig { params(identifier: T.nilable(String)).void }
+ def initialize(identifier: nil); end
+ end
+ # Specifies which event to cancel.
+ sig { returns(T.nilable(::Stripe::Billing::MeterEventAdjustment::CreateParams::Cancel)) }
+ attr_accessor :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cancel: T.nilable(::Stripe::Billing::MeterEventAdjustment::CreateParams::Cancel), event_name: String, expand: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(cancel: nil, event_name: nil, expand: nil, type: nil); end
+ end
+ # Creates a billing meter event adjustment.
+ sig {
+ params(params: T.any(::Stripe::Billing::MeterEventAdjustment::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEventAdjustment)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing/meter_event_summary.rbi b/rbi/stripe/resources/billing/meter_event_summary.rbi
new file mode 100644
index 00000000..678b1fd0
--- /dev/null
+++ b/rbi/stripe/resources/billing/meter_event_summary.rbi
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
+ # usage was accrued by a customer for that period.
+ #
+ # Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.
+ class MeterEventSummary < APIResource
+ # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.
+ sig { returns(Float) }
+ attr_reader :aggregated_value
+ # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
+ sig { returns(Integer) }
+ attr_reader :end_time
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The meter associated with this event summary.
+ sig { returns(String) }
+ attr_reader :meter
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
+ sig { returns(Integer) }
+ attr_reader :start_time
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing_portal/configuration.rbi b/rbi/stripe/resources/billing_portal/configuration.rbi
new file mode 100644
index 00000000..9a28cd53
--- /dev/null
+++ b/rbi/stripe/resources/billing_portal/configuration.rbi
@@ -0,0 +1,645 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module BillingPortal
+ # A portal configuration describes the functionality and behavior of a portal session.
+ class Configuration < APIResource
+ class BusinessProfile < Stripe::StripeObject
+ # The messaging shown to customers in the portal.
+ sig { returns(T.nilable(String)) }
+ attr_reader :headline
+ # A link to the business’s publicly available privacy policy.
+ sig { returns(T.nilable(String)) }
+ attr_reader :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terms_of_service_url
+ end
+ class Features < Stripe::StripeObject
+ class CustomerUpdate < Stripe::StripeObject
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ sig { returns(T::Array[String]) }
+ attr_reader :allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class InvoiceHistory < Stripe::StripeObject
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class PaymentMethodUpdate < Stripe::StripeObject
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class SubscriptionCancel < Stripe::StripeObject
+ class CancellationReason < Stripe::StripeObject
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ sig { returns(T::Array[String]) }
+ attr_reader :options
+ end
+ # Attribute for field cancellation_reason
+ sig { returns(CancellationReason) }
+ attr_reader :cancellation_reason
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ sig { returns(String) }
+ attr_reader :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.
+ sig { returns(String) }
+ attr_reader :proration_behavior
+ end
+ class SubscriptionUpdate < Stripe::StripeObject
+ class Product < Stripe::StripeObject
+ # The list of price IDs which, when subscribed to, a subscription can be updated.
+ sig { returns(T::Array[String]) }
+ attr_reader :prices
+ # The product ID.
+ sig { returns(String) }
+ attr_reader :product
+ end
+ class ScheduleAtPeriodEnd < Stripe::StripeObject
+ class Condition < Stripe::StripeObject
+ # The type of condition.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # List of conditions. When any condition is true, an update will be scheduled at the end of the current period.
+ sig { returns(T::Array[Condition]) }
+ attr_reader :conditions
+ end
+ # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.
+ sig { returns(T::Array[String]) }
+ attr_reader :default_allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # The list of up to 10 products that support subscription updates.
+ sig { returns(T.nilable(T::Array[Product])) }
+ attr_reader :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
+ sig { returns(String) }
+ attr_reader :proration_behavior
+ # Attribute for field schedule_at_period_end
+ sig { returns(ScheduleAtPeriodEnd) }
+ attr_reader :schedule_at_period_end
+ end
+ # Attribute for field customer_update
+ sig { returns(CustomerUpdate) }
+ attr_reader :customer_update
+ # Attribute for field invoice_history
+ sig { returns(InvoiceHistory) }
+ attr_reader :invoice_history
+ # Attribute for field payment_method_update
+ sig { returns(PaymentMethodUpdate) }
+ attr_reader :payment_method_update
+ # Attribute for field subscription_cancel
+ sig { returns(SubscriptionCancel) }
+ attr_reader :subscription_cancel
+ # Attribute for field subscription_update
+ sig { returns(SubscriptionUpdate) }
+ attr_reader :subscription_update
+ end
+ class LoginPage < Stripe::StripeObject
+ # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.
+ #
+ # If `false`, the previously generated `url`, if any, will be deactivated.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ # Whether the configuration is active and can be used to create portal sessions.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # ID of the Connect Application that created the configuration.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # Attribute for field business_profile
+ sig { returns(BusinessProfile) }
+ attr_reader :business_profile
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_return_url
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
+ sig { returns(T::Boolean) }
+ attr_reader :is_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Attribute for field login_page
+ sig { returns(LoginPage) }
+ attr_reader :login_page
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :updated
+ class ListParams < Stripe::RequestParams
+ # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), is_default: T.nilable(T::Boolean), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ ending_before: nil,
+ expand: nil,
+ is_default: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terms_of_service_url
+ sig {
+ params(headline: T.nilable(T.nilable(String)), privacy_policy_url: T.nilable(String), terms_of_service_url: T.nilable(String)).void
+ }
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end
+ end
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig {
+ params(allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T::Boolean).void
+ }
+ def initialize(allowed_updates: nil, enabled: nil); end
+ end
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ sig { returns(T.nilable(T.any(String, T::Array[String]))) }
+ attr_accessor :options
+ sig {
+ params(enabled: T::Boolean, options: T.nilable(T.any(String, T::Array[String]))).void
+ }
+ def initialize(enabled: nil, options: nil); end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel::CancellationReason))
+ }
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(cancellation_reason: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel::CancellationReason), enabled: T::Boolean, mode: T.nilable(String), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ ); end
+ end
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ sig { returns(T::Array[String]) }
+ attr_accessor :prices
+ # The product id.
+ sig { returns(String) }
+ attr_accessor :product
+ sig { params(prices: T::Array[String], product: String).void }
+ def initialize(prices: nil, product: nil); end
+ end
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]))
+ }
+ attr_accessor :conditions
+ sig {
+ params(conditions: T.nilable(T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])).void
+ }
+ def initialize(conditions: nil); end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::Product]))))
+ }
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd))
+ }
+ attr_accessor :schedule_at_period_end
+ sig {
+ params(default_allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T::Boolean, products: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::Product]))), proration_behavior: T.nilable(String), schedule_at_period_end: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd)).void
+ }
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ ); end
+ end
+ # Information about updating the customer details in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::CustomerUpdate))
+ }
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::InvoiceHistory))
+ }
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::PaymentMethodUpdate))
+ }
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel))
+ }
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate))
+ }
+ attr_accessor :subscription_update
+ sig {
+ params(customer_update: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::CustomerUpdate), invoice_history: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::InvoiceHistory), payment_method_update: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::PaymentMethodUpdate), subscription_cancel: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel), subscription_update: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate)).void
+ }
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ ); end
+ end
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ # The business information shown to customers in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::BusinessProfile))
+ }
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ sig { returns(::Stripe::BillingPortal::Configuration::CreateParams::Features) }
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ sig { returns(T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::LoginPage)) }
+ attr_accessor :login_page
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(business_profile: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::BusinessProfile), default_return_url: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), features: ::Stripe::BillingPortal::Configuration::CreateParams::Features, login_page: T.nilable(::Stripe::BillingPortal::Configuration::CreateParams::LoginPage), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :terms_of_service_url
+ sig {
+ params(headline: T.nilable(T.nilable(String)), privacy_policy_url: T.nilable(T.nilable(String)), terms_of_service_url: T.nilable(T.nilable(String))).void
+ }
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end
+ end
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ sig {
+ params(allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T.nilable(T::Boolean)).void
+ }
+ def initialize(allowed_updates: nil, enabled: nil); end
+ end
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :options
+ sig {
+ params(enabled: T::Boolean, options: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(enabled: nil, options: nil); end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel::CancellationReason))
+ }
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(cancellation_reason: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel::CancellationReason), enabled: T.nilable(T::Boolean), mode: T.nilable(String), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ ); end
+ end
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ sig { returns(T::Array[String]) }
+ attr_accessor :prices
+ # The product id.
+ sig { returns(String) }
+ attr_accessor :product
+ sig { params(prices: T::Array[String], product: String).void }
+ def initialize(prices: nil, product: nil); end
+ end
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]))))
+ }
+ attr_accessor :conditions
+ sig {
+ params(conditions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])))).void
+ }
+ def initialize(conditions: nil); end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::Product]))))
+ }
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd))
+ }
+ attr_accessor :schedule_at_period_end
+ sig {
+ params(default_allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T.nilable(T::Boolean), products: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::Product]))), proration_behavior: T.nilable(String), schedule_at_period_end: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd)).void
+ }
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ ); end
+ end
+ # Information about updating the customer details in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::CustomerUpdate))
+ }
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::InvoiceHistory))
+ }
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::PaymentMethodUpdate))
+ }
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel))
+ }
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate))
+ }
+ attr_accessor :subscription_update
+ sig {
+ params(customer_update: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::CustomerUpdate), invoice_history: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::InvoiceHistory), payment_method_update: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::PaymentMethodUpdate), subscription_cancel: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel), subscription_update: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate)).void
+ }
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ ); end
+ end
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ #
+ # Set to `false` to deactivate the `login_page.url`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ # Whether the configuration is active and can be used to create portal sessions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The business information shown to customers in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::BusinessProfile))
+ }
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ sig { returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features)) }
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ sig { returns(T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::LoginPage)) }
+ attr_accessor :login_page
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(active: T.nilable(T::Boolean), business_profile: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::BusinessProfile), default_return_url: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), features: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::Features), login_page: T.nilable(::Stripe::BillingPortal::Configuration::UpdateParams::LoginPage), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(
+ active: nil,
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ ); end
+ end
+ # Creates a configuration that describes the functionality and behavior of a PortalSession
+ sig {
+ params(params: T.any(::Stripe::BillingPortal::Configuration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of configurations that describe the functionality of the customer portal.
+ sig {
+ params(params: T.any(::Stripe::BillingPortal::Configuration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a configuration that describes the functionality of the customer portal.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::BillingPortal::Configuration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration)
+ }
+ def self.update(configuration, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi
new file mode 100644
index 00000000..f343b9f6
--- /dev/null
+++ b/rbi/stripe/resources/billing_portal/session.rbi
@@ -0,0 +1,345 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module BillingPortal
+ # The Billing customer portal is a Stripe-hosted UI for subscription and
+ # billing management.
+ #
+ # A portal configuration describes the functionality and features that you
+ # want to provide to your customers through the portal.
+ #
+ # A portal session describes the instantiation of the customer portal for
+ # a particular customer. By visiting the session's URL, the customer
+ # can manage their subscriptions and billing details. For security reasons,
+ # sessions are short-lived and will expire if the customer does not visit the URL.
+ # Create sessions on-demand when customers intend to manage their subscriptions
+ # and billing details.
+ #
+ # Related guide: [Customer management](https://stripe.com/customer-management)
+ class Session < APIResource
+ class Flow < Stripe::StripeObject
+ class AfterCompletion < Stripe::StripeObject
+ class HostedConfirmation < Stripe::StripeObject
+ # A custom message to display to the customer after the flow is completed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :custom_message
+ end
+ class Redirect < Stripe::StripeObject
+ # The URL the customer will be redirected to after the flow is completed.
+ sig { returns(String) }
+ attr_reader :return_url
+ end
+ # Configuration when `after_completion.type=hosted_confirmation`.
+ sig { returns(T.nilable(HostedConfirmation)) }
+ attr_reader :hosted_confirmation
+ # Configuration when `after_completion.type=redirect`.
+ sig { returns(T.nilable(Redirect)) }
+ attr_reader :redirect
+ # The specified type of behavior after the flow is completed.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class SubscriptionCancel < Stripe::StripeObject
+ class Retention < Stripe::StripeObject
+ class CouponOffer < Stripe::StripeObject
+ # The ID of the coupon to be offered.
+ sig { returns(String) }
+ attr_reader :coupon
+ end
+ # Configuration when `retention.type=coupon_offer`.
+ sig { returns(T.nilable(CouponOffer)) }
+ attr_reader :coupon_offer
+ # Type of retention strategy that will be used.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Specify a retention strategy to be used in the cancellation flow.
+ sig { returns(T.nilable(Retention)) }
+ attr_reader :retention
+ # The ID of the subscription to be canceled.
+ sig { returns(String) }
+ attr_reader :subscription
+ end
+ class SubscriptionUpdate < Stripe::StripeObject
+ # The ID of the subscription to be updated.
+ sig { returns(String) }
+ attr_reader :subscription
+ end
+ class SubscriptionUpdateConfirm < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The ID of the coupon to apply to this subscription update.
+ sig { returns(T.nilable(String)) }
+ attr_reader :coupon
+ # The ID of a promotion code to apply to this subscription update.
+ sig { returns(T.nilable(String)) }
+ attr_reader :promotion_code
+ end
+ class Item < Stripe::StripeObject
+ # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id
+ # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
+ sig { returns(T.nilable(String)) }
+ attr_reader :price
+ # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ end
+ # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ sig { returns(T.nilable(T::Array[Discount])) }
+ attr_reader :discounts
+ # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
+ sig { returns(T::Array[Item]) }
+ attr_reader :items
+ # The ID of the subscription to be updated.
+ sig { returns(String) }
+ attr_reader :subscription
+ end
+ # Attribute for field after_completion
+ sig { returns(AfterCompletion) }
+ attr_reader :after_completion
+ # Configuration when `flow.type=subscription_cancel`.
+ sig { returns(T.nilable(SubscriptionCancel)) }
+ attr_reader :subscription_cancel
+ # Configuration when `flow.type=subscription_update`.
+ sig { returns(T.nilable(SubscriptionUpdate)) }
+ attr_reader :subscription_update
+ # Configuration when `flow.type=subscription_update_confirm`.
+ sig { returns(T.nilable(SubscriptionUpdateConfirm)) }
+ attr_reader :subscription_update_confirm
+ # Type of flow that the customer will go through.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The configuration used by this session, describing the features available.
+ sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) }
+ attr_reader :configuration
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The ID of the customer for this session.
+ sig { returns(String) }
+ attr_reader :customer
+ # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
+ sig { returns(T.nilable(Flow)) }
+ attr_reader :flow
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :locale
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
+ sig { returns(T.nilable(String)) }
+ attr_reader :on_behalf_of
+ # The URL to redirect customers to when they click on the portal's link to return to your website.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_url
+ # The short-lived URL of the session that gives customers access to the customer portal.
+ sig { returns(String) }
+ attr_reader :url
+ class CreateParams < Stripe::RequestParams
+ class FlowData < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the flow is completed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :custom_message
+ sig { params(custom_message: T.nilable(String)).void }
+ def initialize(custom_message: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # The URL the customer will be redirected to after the flow is completed.
+ sig { returns(String) }
+ attr_accessor :return_url
+ sig { params(return_url: String).void }
+ def initialize(return_url: nil); end
+ end
+ # Configuration when `after_completion.type=hosted_confirmation`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::HostedConfirmation))
+ }
+ attr_accessor :hosted_confirmation
+ # Configuration when `after_completion.type=redirect`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::Redirect))
+ }
+ attr_accessor :redirect
+ # The specified behavior after the flow is completed.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(hosted_confirmation: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::Redirect), type: String).void
+ }
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
+ end
+ class SubscriptionCancel < Stripe::RequestParams
+ class Retention < Stripe::RequestParams
+ class CouponOffer < Stripe::RequestParams
+ # The ID of the coupon to be offered.
+ sig { returns(String) }
+ attr_accessor :coupon
+ sig { params(coupon: String).void }
+ def initialize(coupon: nil); end
+ end
+ # Configuration when `retention.type=coupon_offer`.
+ sig {
+ returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer)
+ }
+ attr_accessor :coupon_offer
+ # Type of retention strategy to use with the customer.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(coupon_offer: ::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer, type: String).void
+ }
+ def initialize(coupon_offer: nil, type: nil); end
+ end
+ # Specify a retention strategy to be used in the cancellation flow.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention))
+ }
+ attr_accessor :retention
+ # The ID of the subscription to be canceled.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig {
+ params(retention: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention), subscription: String).void
+ }
+ def initialize(retention: nil, subscription: nil); end
+ end
+ class SubscriptionUpdate < Stripe::RequestParams
+ # The ID of the subscription to be updated.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig { params(subscription: String).void }
+ def initialize(subscription: nil); end
+ end
+ class SubscriptionUpdateConfirm < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this subscription update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this subscription update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig { params(coupon: T.nilable(String), promotion_code: T.nilable(String)).void }
+ def initialize(coupon: nil, promotion_code: nil); end
+ end
+ class Item < Stripe::RequestParams
+ # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
+ sig { returns(String) }
+ attr_accessor :id
+ # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ sig {
+ params(id: String, price: T.nilable(String), quantity: T.nilable(Integer)).void
+ }
+ def initialize(id: nil, price: nil, quantity: nil); end
+ end
+ # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount]))
+ }
+ attr_accessor :discounts
+ # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
+ sig {
+ returns(T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Item])
+ }
+ attr_accessor :items
+ # The ID of the subscription to be updated.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount]), items: T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Item], subscription: String).void
+ }
+ def initialize(discounts: nil, items: nil, subscription: nil); end
+ end
+ # Behavior after the flow is completed.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion))
+ }
+ attr_accessor :after_completion
+ # Configuration when `flow_data.type=subscription_cancel`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel))
+ }
+ attr_accessor :subscription_cancel
+ # Configuration when `flow_data.type=subscription_update`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdate))
+ }
+ attr_accessor :subscription_update
+ # Configuration when `flow_data.type=subscription_update_confirm`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm))
+ }
+ attr_accessor :subscription_update_confirm
+ # Type of flow that the customer will go through.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(after_completion: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion), subscription_cancel: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel), subscription_update: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdate), subscription_update_confirm: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm), type: String).void
+ }
+ def initialize(
+ after_completion: nil,
+ subscription_cancel: nil,
+ subscription_update: nil,
+ subscription_update_confirm: nil,
+ type: nil
+ ); end
+ end
+ # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :configuration
+ # The ID of an existing customer.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
+ sig { returns(T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData)) }
+ attr_accessor :flow_data
+ # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :locale
+ # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # The default URL to redirect customers to when they click on the portal's link to return to your website.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(configuration: T.nilable(String), customer: String, expand: T.nilable(T::Array[String]), flow_data: T.nilable(::Stripe::BillingPortal::Session::CreateParams::FlowData), locale: T.nilable(String), on_behalf_of: T.nilable(String), return_url: T.nilable(String)).void
+ }
+ def initialize(
+ configuration: nil,
+ customer: nil,
+ expand: nil,
+ flow_data: nil,
+ locale: nil,
+ on_behalf_of: nil,
+ return_url: nil
+ ); end
+ end
+ # Creates a session of the customer portal.
+ sig {
+ params(params: T.any(::Stripe::BillingPortal::Session::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Session)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi
new file mode 100644
index 00000000..47088571
--- /dev/null
+++ b/rbi/stripe/resources/capability.rbi
@@ -0,0 +1,125 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # This is an object representing a capability for a Stripe account.
+ #
+ # Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities)
+ class Capability < APIResource
+ class FutureRequirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :original_fields_due
+ end
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ sig { returns(T.nilable(T::Array[Alternative])) }
+ attr_reader :alternatives
+ # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
+ sig { returns(T::Array[String]) }
+ attr_reader :currently_due
+ # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T::Array[Error]) }
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.
+ sig { returns(T::Array[String]) }
+ attr_reader :eventually_due
+ # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T::Array[String]) }
+ attr_reader :pending_verification
+ end
+ class Requirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :original_fields_due
+ end
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ sig { returns(T.nilable(T::Array[Alternative])) }
+ attr_reader :alternatives
+ # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :current_deadline
+ # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
+ sig { returns(T::Array[String]) }
+ attr_reader :currently_due
+ # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T::Array[Error]) }
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
+ sig { returns(T::Array[String]) }
+ attr_reader :eventually_due
+ # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.
+ sig { returns(T::Array[String]) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T::Array[String]) }
+ attr_reader :pending_verification
+ end
+ # The account for which the capability enables functionality.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Attribute for field future_requirements
+ sig { returns(FutureRequirements) }
+ attr_reader :future_requirements
+ # The identifier for the capability.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Whether the capability has been requested.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Time at which the capability was requested. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :requested_at
+ # Attribute for field requirements
+ sig { returns(Requirements) }
+ attr_reader :requirements
+ # The status of the capability.
+ sig { returns(String) }
+ attr_reader :status
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/card.rbi b/rbi/stripe/resources/card.rbi
new file mode 100644
index 00000000..44875ba6
--- /dev/null
+++ b/rbi/stripe/resources/card.rbi
@@ -0,0 +1,125 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # You can store multiple cards on a customer in order to charge the customer
+ # later. You can also store multiple debit cards on a recipient in order to
+ # transfer to those cards later.
+ #
+ # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
+ class Card < APIResource
+ class Networks < Stripe::StripeObject
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ # Attribute for field account
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :account
+ # City/District/Suburb/Town/Village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_city
+ # Billing address country, if provided when creating card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_country
+ # Address line 1 (Street address/PO Box/Company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1
+ # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # Address line 2 (Apartment/Suite/Unit/Building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line2
+ # State/County/Province/Region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_state
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_zip
+ # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_zip_check
+ # 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. The field defaults to “unspecified”.
+ sig { returns(T.nilable(String)) }
+ attr_reader :allow_redisplay
+ # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :available_payout_methods
+ # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
+ sig { returns(String) }
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :default_for_currency
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(String) }
+ attr_reader :description
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dynamic_last4
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :funding
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(String) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(String) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(String) }
+ attr_reader :last4
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Cardholder name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Attribute for field networks
+ sig { returns(Networks) }
+ attr_reader :networks
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Status of a card based on the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :regulated_status
+ # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tokenization_method
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/cash_balance.rbi b/rbi/stripe/resources/cash_balance.rbi
new file mode 100644
index 00000000..8942596f
--- /dev/null
+++ b/rbi/stripe/resources/cash_balance.rbi
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
+ class CashBalance < APIResource
+ class Settings < Stripe::StripeObject
+ # The configuration for how funds that land in the customer cash balance are reconciled.
+ sig { returns(String) }
+ attr_reader :reconciliation_mode
+ # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance
+ sig { returns(T::Boolean) }
+ attr_reader :using_merchant_default
+ end
+ # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(T::Hash[String, Integer])) }
+ attr_reader :available
+ # The ID of the customer whose cash balance this object represents.
+ sig { returns(String) }
+ attr_reader :customer
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field settings
+ sig { returns(Settings) }
+ attr_reader :settings
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi
new file mode 100644
index 00000000..2bf8483d
--- /dev/null
+++ b/rbi/stripe/resources/charge.rbi
@@ -0,0 +1,2054 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # The `Charge` object represents a single attempt to move money into your Stripe account.
+ # PaymentIntent confirmation is the most common way to create Charges, but transferring
+ # money to a different Stripe account through Connect also creates Charges.
+ # Some legacy payment flows create Charges directly, which is not recommended for new integrations.
+ class Charge < APIResource
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Billing address.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ end
+ class FraudDetails < Stripe::StripeObject
+ # Assessments from Stripe. If set, the value is `fraudulent`.
+ sig { returns(String) }
+ attr_reader :stripe_report
+ # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
+ sig { returns(String) }
+ attr_reader :user_report
+ end
+ class Level3 < Stripe::StripeObject
+ class LineItem < Stripe::StripeObject
+ # Attribute for field discount_amount
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :discount_amount
+ # Attribute for field product_code
+ sig { returns(String) }
+ attr_reader :product_code
+ # Attribute for field product_description
+ sig { returns(String) }
+ attr_reader :product_description
+ # Attribute for field quantity
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :quantity
+ # Attribute for field tax_amount
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :tax_amount
+ # Attribute for field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_cost
+ end
+ # Attribute for field customer_reference
+ sig { returns(String) }
+ attr_reader :customer_reference
+ # Attribute for field line_items
+ sig { returns(T::Array[LineItem]) }
+ attr_reader :line_items
+ # Attribute for field merchant_reference
+ sig { returns(String) }
+ attr_reader :merchant_reference
+ # Attribute for field shipping_address_zip
+ sig { returns(String) }
+ attr_reader :shipping_address_zip
+ # Attribute for field shipping_amount
+ sig { returns(Integer) }
+ attr_reader :shipping_amount
+ # Attribute for field shipping_from_zip
+ sig { returns(String) }
+ attr_reader :shipping_from_zip
+ end
+ class Outcome < Stripe::StripeObject
+ class Rule < Stripe::StripeObject
+ # The action taken on the payment.
+ sig { returns(String) }
+ attr_reader :action
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The predicate to evaluate the payment against.
+ sig { returns(String) }
+ attr_reader :predicate
+ end
+ # An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
+ sig { returns(T.nilable(String)) }
+ attr_reader :advice_code
+ # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_advice_code
+ # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_decline_code
+ # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_status
+ # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
+ sig { returns(String) }
+ attr_reader :risk_level
+ # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
+ sig { returns(Integer) }
+ attr_reader :risk_score
+ # The ID of the Radar rule that matched the payment, if applicable.
+ sig { returns(T.any(String, Rule)) }
+ attr_reader :rule
+ # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :seller_message
+ # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AchCreditTransfer < Stripe::StripeObject
+ # Account number to transfer funds to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_number
+ # Name of the bank associated with the routing number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Routing transit number for the bank account to transfer funds to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ # SWIFT code of the bank associated with the routing number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :swift_code
+ end
+ class AchDebit < Stripe::StripeObject
+ # Type of entity that holds the account. This can be either `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Routing transit number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ class AcssDebit < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Institution number of the bank account
+ sig { returns(T.nilable(String)) }
+ attr_reader :institution_number
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(String) }
+ attr_reader :mandate
+ # Transit number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transit_number
+ end
+ class Affirm < Stripe::StripeObject
+ # The Affirm transaction ID associated with this payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class AfterpayClearpay < Stripe::StripeObject
+ # The Afterpay order ID associated with this payment intent.
+ sig { returns(T.nilable(String)) }
+ attr_reader :order_id
+ # Order identifier shown to the merchant in Afterpay’s online portal.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class Alipay < Stripe::StripeObject
+ # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
+ sig { returns(String) }
+ attr_reader :buyer_id
+ # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Transaction ID of this particular Alipay transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject
+ class Funding < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # funding type of the underlying payment method.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # Attribute for field funding
+ sig { returns(Funding) }
+ attr_reader :funding
+ end
+ class AuBecsDebit < Stripe::StripeObject
+ # Bank-State-Branch number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bsb_number
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(String) }
+ attr_reader :mandate
+ end
+ class BacsDebit < Stripe::StripeObject
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :mandate
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_reader :sort_code
+ end
+ class Bancontact < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ # Can be one of `en`, `de`, `fr`, or `nl`
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by Bancontact directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class Billie < Stripe::StripeObject; end
+ class Blik < Stripe::StripeObject
+ # A unique and immutable identifier assigned by BLIK to every buyer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ end
+ class Boleto < Stripe::StripeObject
+ # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_reader :tax_id
+ end
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ end
+ class ExtendedAuthorization < Stripe::StripeObject
+ # Indicates whether or not the capture window is extended beyond the standard authorization.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class IncrementalAuthorization < Stripe::StripeObject
+ # Indicates whether or not the incremental authorization feature is supported.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class Installments < Stripe::StripeObject
+ class Plan < Stripe::StripeObject
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :count
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Installment plan selected for the payment.
+ sig { returns(T.nilable(Plan)) }
+ attr_reader :plan
+ end
+ class Multicapture < Stripe::StripeObject
+ # Indicates whether or not multiple captures are supported.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class NetworkToken < Stripe::StripeObject
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
+ sig { returns(T::Boolean) }
+ attr_reader :used
+ end
+ class Overcapture < Stripe::StripeObject
+ # The maximum amount that can be captured.
+ sig { returns(Integer) }
+ attr_reader :maximum_amount_capturable
+ # Indicates whether or not the authorized amount can be over-captured.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class ThreeDSecure < Stripe::StripeObject
+ # For authenticated transactions: how the customer was authenticated by
+ # the issuing bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authentication_flow
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
+ # indicating what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_reader :exemption_indicator
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
+ # the outcome of Stripe's internal risk assessment.
+ sig { returns(T::Boolean) }
+ attr_reader :exemption_indicator_applied
+ # Indicates the outcome of 3D Secure authentication.
+ sig { returns(T.nilable(String)) }
+ attr_reader :result
+ # Additional information about why 3D Secure succeeded or failed based
+ # on the `result`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :result_reason
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
+ # (dsTransId) for this payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ # The version of 3D Secure that was used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :version
+ end
+ class Wallet < Stripe::StripeObject
+ class AmexExpressCheckout < Stripe::StripeObject; end
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+ class Masterpass < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(BillingAddress)) }
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ class SamsungPay < Stripe::StripeObject; end
+ class VisaCheckout < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(BillingAddress)) }
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ # Attribute for field amex_express_checkout
+ sig { returns(AmexExpressCheckout) }
+ attr_reader :amex_express_checkout
+ # Attribute for field apple_pay
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dynamic_last4
+ # Attribute for field google_pay
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field masterpass
+ sig { returns(Masterpass) }
+ attr_reader :masterpass
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field visa_checkout
+ sig { returns(VisaCheckout) }
+ attr_reader :visa_checkout
+ end
+ # The authorized amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_authorized
+ # Authorization code on the charge.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
+ sig { returns(Integer) }
+ attr_reader :capture_before
+ # Check results by Card networks on Card address and CVC at time of payment.
+ sig { returns(T.nilable(Checks)) }
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Attribute for field extended_authorization
+ sig { returns(ExtendedAuthorization) }
+ attr_reader :extended_authorization
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # Attribute for field incremental_authorization
+ sig { returns(IncrementalAuthorization) }
+ attr_reader :incremental_authorization
+ # Installment details for this payment (Mexico only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig { returns(T.nilable(Installments)) }
+ attr_reader :installments
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment or created by it.
+ sig { returns(T.nilable(String)) }
+ attr_reader :mandate
+ # True if this payment was marked as MOTO and out of scope for SCA.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :moto
+ # Attribute for field multicapture
+ sig { returns(Multicapture) }
+ attr_reader :multicapture
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # If this card has network token credentials, this contains the details of the network token credentials.
+ sig { returns(T.nilable(NetworkToken)) }
+ attr_reader :network_token
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_transaction_id
+ # Attribute for field overcapture
+ sig { returns(Overcapture) }
+ attr_reader :overcapture
+ # Status of a card based on the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :regulated_status
+ # Populated if this transaction used 3D Secure authentication.
+ sig { returns(T.nilable(ThreeDSecure)) }
+ attr_reader :three_d_secure
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ sig { returns(T.nilable(Wallet)) }
+ attr_reader :wallet
+ end
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ sig { returns(String) }
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_status_information
+ end
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The authorized amount
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_authorized
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand_product
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
+ sig { returns(Integer) }
+ attr_reader :capture_before
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Authorization response cryptogram.
+ sig { returns(T.nilable(String)) }
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
+ sig { returns(T::Boolean) }
+ attr_reader :incremental_authorization_supported
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_transaction_id
+ # Details about payments collected offline.
+ sig { returns(T.nilable(Offline)) }
+ attr_reader :offline
+ # Defines whether the authorized amount can be over-captured or not
+ sig { returns(T::Boolean) }
+ attr_reader :overcapture_supported
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ sig { returns(T.nilable(Receipt)) }
+ attr_reader :receipt
+ # Attribute for field wallet
+ sig { returns(Wallet) }
+ attr_reader :wallet
+ end
+ class Cashapp < Stripe::StripeObject
+ # A unique and immutable identifier assigned by Cash App to every buyer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ # A public identifier for buyers using Cash App.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cashtag
+ end
+ class CustomerBalance < Stripe::StripeObject; end
+ class Eps < Stripe::StripeObject
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # Owner's verified full name. Values are verified or provided by EPS directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ # EPS rarely provides this information so the attribute is usually empty.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class Fpx < Stripe::StripeObject
+ # Account holder type, if provided. Can be one of `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
+ sig { returns(String) }
+ attr_reader :bank
+ # Unique transaction id generated by FPX for every request from the merchant
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class Giropay < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Owner's verified full name. Values are verified or provided by Giropay directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ # Giropay rarely provides this information so the attribute is usually empty.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class Grabpay < Stripe::StripeObject
+ # Unique transaction id generated by GrabPay
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class Ideal < Stripe::StripeObject
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Owner's verified full name. Values are verified or provided by iDEAL directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class InteracPresent < Stripe::StripeObject
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ sig { returns(String) }
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_status_information
+ end
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Authorization response cryptogram.
+ sig { returns(T.nilable(String)) }
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_transaction_id
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ sig { returns(T.nilable(Receipt)) }
+ attr_reader :receipt
+ end
+ class KakaoPay < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ end
+ class Klarna < Stripe::StripeObject
+ class PayerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # The payer address country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ end
+ # The payer's address
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ end
+ # The payer details for this transaction.
+ sig { returns(T.nilable(PayerDetails)) }
+ attr_reader :payer_details
+ # The Klarna payment method used for this transaction.
+ # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_method_category
+ # Preferred language of the Klarna authorization page that the customer is redirected to.
+ # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_locale
+ end
+ class Konbini < Stripe::StripeObject
+ class Store < Stripe::StripeObject
+ # The name of the convenience store chain where the payment was completed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :chain
+ end
+ # If the payment succeeded, this contains the details of the convenience store where the payment was completed.
+ sig { returns(T.nilable(Store)) }
+ attr_reader :store
+ end
+ class KrCard < Stripe::StripeObject
+ # The local credit or debit card brand.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # A unique identifier for the buyer as determined by the local payment processor.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ # The last four digits of the card. This may not be present for American Express cards.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class Link < Stripe::StripeObject
+ # Two-letter ISO code representing the funding source country beneath the Link payment.
+ # You could use this attribute to get a sense of international fees.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ end
+ class Mobilepay < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # Brand of the card used in the transaction
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Two digit number representing the card's expiration month
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Two digit number representing the card's expiration year
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # The last 4 digits of the card
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ # Internal card details
+ sig { returns(T.nilable(Card)) }
+ attr_reader :card
+ end
+ class Multibanco < Stripe::StripeObject
+ # Entity number associated with this Multibanco payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :entity
+ # Reference number associated with this Multibanco payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class NaverPay < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ end
+ class NzBankAccount < Stripe::StripeObject
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_name
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_reader :bank_code
+ # The name of the bank.
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_reader :branch_code
+ # Last four digits of the bank account number.
+ sig { returns(String) }
+ attr_reader :last4
+ # The suffix of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :suffix
+ end
+ class Oxxo < Stripe::StripeObject
+ # OXXO reference number
+ sig { returns(T.nilable(String)) }
+ attr_reader :number
+ end
+ class P24 < Stripe::StripeObject
+ # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # Unique reference for this Przelewy24 payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Owner's verified full name. Values are verified or provided by Przelewy24 directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ # Przelewy24 rarely provides this information so the attribute is usually empty.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class PayByBank < Stripe::StripeObject; end
+ class Payco < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ end
+ class Paynow < Stripe::StripeObject
+ # Reference number associated with this PayNow payment
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class Paypal < Stripe::StripeObject
+ class SellerProtection < Stripe::StripeObject
+ # An array of conditions that are covered for the transaction, if applicable.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :dispute_categories
+ # Indicates whether the transaction is eligible for PayPal's seller protection.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Owner's email. Values are provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_email
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_id
+ # Owner's full name. Values provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_name
+ # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
+ sig { returns(T.nilable(SellerProtection)) }
+ attr_reader :seller_protection
+ # A unique ID generated by PayPal for this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class Pix < Stripe::StripeObject
+ # Unique transaction id generated by BCB
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_transaction_id
+ end
+ class Promptpay < Stripe::StripeObject
+ # Bill reference generated by PromptPay
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class RevolutPay < Stripe::StripeObject
+ class Funding < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # funding type of the underlying payment method.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # Attribute for field funding
+ sig { returns(Funding) }
+ attr_reader :funding
+ end
+ class SamsungPay < Stripe::StripeObject
+ # A unique identifier for the buyer as determined by the local payment processor.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ end
+ class Satispay < Stripe::StripeObject; end
+ class SepaCreditTransfer < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # IBAN of the bank account to transfer funds to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban
+ end
+ class SepaDebit < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Branch code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_code
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve).
+ sig { returns(T.nilable(String)) }
+ attr_reader :mandate
+ end
+ class Sofort < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Preferred language of the SOFORT authorization page that the customer is redirected to.
+ # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by SOFORT directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class StripeAccount < Stripe::StripeObject; end
+ class Swish < Stripe::StripeObject
+ # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Payer bank reference number for the payment
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_reference
+ # The last four digits of the Swish account phone number
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_phone_last4
+ end
+ class Twint < Stripe::StripeObject; end
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(T.any(String, Stripe::Mandate)) }
+ attr_reader :mandate
+ # Reference number to locate ACH payments with customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_reference
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ class Wechat < Stripe::StripeObject; end
+ class WechatPay < Stripe::StripeObject
+ # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Transaction ID of this particular WeChat Pay transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field ach_credit_transfer
+ sig { returns(AchCreditTransfer) }
+ attr_reader :ach_credit_transfer
+ # Attribute for field ach_debit
+ sig { returns(AchDebit) }
+ attr_reader :ach_debit
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # Attribute for field alma
+ sig { returns(Alma) }
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field billie
+ sig { returns(Billie) }
+ attr_reader :billie
+ # Attribute for field blik
+ sig { returns(Blik) }
+ attr_reader :blik
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ sig { returns(CustomerBalance) }
+ attr_reader :customer_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field fpx
+ sig { returns(Fpx) }
+ attr_reader :fpx
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field interac_present
+ sig { returns(InteracPresent) }
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field konbini
+ sig { returns(Konbini) }
+ attr_reader :konbini
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field mobilepay
+ sig { returns(Mobilepay) }
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # Attribute for field oxxo
+ sig { returns(Oxxo) }
+ attr_reader :oxxo
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ sig { returns(PayByBank) }
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ sig { returns(Payco) }
+ attr_reader :payco
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field pix
+ sig { returns(Pix) }
+ attr_reader :pix
+ # Attribute for field promptpay
+ sig { returns(Promptpay) }
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # Attribute for field satispay
+ sig { returns(Satispay) }
+ attr_reader :satispay
+ # Attribute for field sepa_credit_transfer
+ sig { returns(SepaCreditTransfer) }
+ attr_reader :sepa_credit_transfer
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field stripe_account
+ sig { returns(StripeAccount) }
+ attr_reader :stripe_account
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field twint
+ sig { returns(Twint) }
+ attr_reader :twint
+ # The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types.
+ # An additional hash is included on `payment_method_details` with a name matching this value.
+ # It contains information specific to the payment method.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ # Attribute for field wechat
+ sig { returns(Wechat) }
+ attr_reader :wechat
+ # Attribute for field wechat_pay
+ sig { returns(WechatPay) }
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ sig { returns(Zip) }
+ attr_reader :zip
+ end
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ sig { returns(Integer) }
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ sig { returns(String) }
+ attr_reader :presentment_currency
+ end
+ class RadarOptions < Stripe::StripeObject
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(String) }
+ attr_reader :session
+ end
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ end
+ class TransferData < Stripe::StripeObject
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
+ sig { returns(Integer) }
+ attr_reader :amount_captured
+ # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
+ sig { returns(Integer) }
+ attr_reader :amount_refunded
+ # ID of the Connect application that created the charge.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
+ sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) }
+ attr_reader :application_fee
+ # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :application_fee_amount
+ # Authorization code on the charge.
+ sig { returns(String) }
+ attr_reader :authorization_code
+ # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
+ sig { returns(T.nilable(String)) }
+ attr_reader :calculated_statement_descriptor
+ # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
+ sig { returns(T::Boolean) }
+ attr_reader :captured
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the customer this charge is for if one exists.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Whether the charge has been disputed.
+ sig { returns(T::Boolean) }
+ attr_reader :disputed
+ # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :failure_balance_transaction
+ # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_code
+ # Message to user further explaining reason for charge failure if available.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_message
+ # Information on fraud assessments for the charge.
+ sig { returns(T.nilable(FraudDetails)) }
+ attr_reader :fraud_details
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field level3
+ sig { returns(Level3) }
+ attr_reader :level3
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
+ sig { returns(T.nilable(Outcome)) }
+ attr_reader :outcome
+ # `true` if the charge succeeded, or was successfully authorized for later capture.
+ sig { returns(T::Boolean) }
+ attr_reader :paid
+ # ID of the PaymentIntent associated with this charge, if one exists.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) }
+ attr_reader :payment_intent
+ # ID of the payment method used in this charge.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_method
+ # Details about the payment method at the time of the transaction.
+ sig { returns(T.nilable(PaymentMethodDetails)) }
+ attr_reader :payment_method_details
+ # Attribute for field presentment_details
+ sig { returns(PresentmentDetails) }
+ attr_reader :presentment_details
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig { returns(RadarOptions) }
+ attr_reader :radar_options
+ # This is the email address that the receipt for this charge was sent to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :receipt_email
+ # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.
+ sig { returns(T.nilable(String)) }
+ attr_reader :receipt_number
+ # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
+ sig { returns(T.nilable(String)) }
+ attr_reader :receipt_url
+ # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
+ sig { returns(T::Boolean) }
+ attr_reader :refunded
+ # A list of refunds that have been applied to the charge.
+ sig { returns(T.nilable(Stripe::ListObject)) }
+ attr_reader :refunds
+ # ID of the review associated with this charge if one exists.
+ sig { returns(T.nilable(T.any(String, Stripe::Review))) }
+ attr_reader :review
+ # Shipping information for the charge.
+ sig { returns(T.nilable(Shipping)) }
+ attr_reader :shipping
+ # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
+ sig {
+ returns(T.nilable(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))
+ }
+ attr_reader :source
+ # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Transfer))) }
+ attr_reader :source_transfer
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_suffix
+ # The status of the payment is either `succeeded`, `pending`, or `failed`.
+ sig { returns(String) }
+ attr_reader :status
+ # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).
+ sig { returns(T.any(String, Stripe::Transfer)) }
+ attr_reader :transfer
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transfer_group
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return charges that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Charge::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return charges for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return charges for this transfer group, limited to 100.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Charge::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil,
+ transfer_group: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Destination < Stripe::RequestParams
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :account
+ # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(account: String, amount: T.nilable(Integer)).void }
+ def initialize(account: nil, amount: nil); end
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::Charge::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::Charge::CreateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Attribute for param field application_fee
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee
+ # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :capture
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The ID of an existing customer that will be charged in this request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field destination
+ sig { returns(T.nilable(::Stripe::Charge::CreateParams::Destination)) }
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig { returns(T.nilable(::Stripe::Charge::CreateParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ sig { returns(T.nilable(::Stripe::Charge::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ sig { returns(T.nilable(::Stripe::Charge::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), application_fee: T.nilable(Integer), application_fee_amount: T.nilable(Integer), capture: T.nilable(T::Boolean), currency: T.nilable(String), customer: T.nilable(String), description: T.nilable(String), destination: T.nilable(::Stripe::Charge::CreateParams::Destination), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), on_behalf_of: T.nilable(String), radar_options: T.nilable(::Stripe::Charge::CreateParams::RadarOptions), receipt_email: T.nilable(String), shipping: T.nilable(::Stripe::Charge::CreateParams::Shipping), source: T.nilable(String), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::Charge::CreateParams::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ capture: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ shipping: nil,
+ source: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class FraudDetails < Stripe::RequestParams
+ # Either `safe` or `fraudulent`.
+ sig { returns(T.nilable(T.any(String, String))) }
+ attr_accessor :user_report
+ sig { params(user_report: T.nilable(T.any(String, String))).void }
+ def initialize(user_report: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::Charge::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::Charge::UpdateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
+ sig { returns(T.nilable(::Stripe::Charge::UpdateParams::FraudDetails)) }
+ attr_accessor :fraud_details
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ sig { returns(T.nilable(::Stripe::Charge::UpdateParams::Shipping)) }
+ attr_accessor :shipping
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), fraud_details: T.nilable(::Stripe::Charge::UpdateParams::FraudDetails), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), receipt_email: T.nilable(String), shipping: T.nilable(::Stripe::Charge::UpdateParams::Shipping), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ description: nil,
+ expand: nil,
+ fraud_details: nil,
+ metadata: nil,
+ receipt_email: nil,
+ shipping: nil,
+ transfer_group: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # The amount to capture, which must be less than or equal to the original amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An application fee to add on to this charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee
+ # An application fee amount to add on to this charge, which must be less than or equal to the original amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ sig { returns(T.nilable(::Stripe::Charge::CaptureParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), application_fee: T.nilable(Integer), application_fee_amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), receipt_email: T.nilable(String), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::Charge::CaptureParams::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ receipt_email: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
+ #
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
+ #
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
+ sig {
+ params(params: T.any(::Stripe::Charge::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def capture(params = {}, opts = {}); end
+
+ # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
+ #
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
+ #
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
+ sig {
+ params(charge: String, params: T.any(::Stripe::Charge::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def self.capture(charge, params = {}, opts = {}); end
+
+ # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
+ # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
+ # object used to request payment.
+ sig {
+ params(params: T.any(::Stripe::Charge::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
+ sig {
+ params(params: T.any(::Stripe::Charge::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Charge::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Charge::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(charge: String, params: T.any(::Stripe::Charge::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def self.update(charge, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi
new file mode 100644
index 00000000..5b90dbb4
--- /dev/null
+++ b/rbi/stripe/resources/checkout/session.rbi
@@ -0,0 +1,3951 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Checkout
+ # A Checkout Session represents your customer's session as they pay for
+ # one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)
+ # or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a
+ # new Session each time your customer attempts to pay.
+ #
+ # Once payment is successful, the Checkout Session will contain a reference
+ # to the [Customer](https://stripe.com/docs/api/customers), and either the successful
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active
+ # [Subscription](https://stripe.com/docs/api/subscriptions).
+ #
+ # You can create a Checkout Session on your server and redirect to its URL
+ # to begin Checkout.
+ #
+ # Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)
+ class Session < APIResource
+ class AdaptivePricing < Stripe::StripeObject
+ # Whether Adaptive Pricing is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class AfterExpiration < Stripe::StripeObject
+ class Recovery < Stripe::StripeObject
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
+ sig { returns(T::Boolean) }
+ attr_reader :allow_promotion_codes
+ # If `true`, a recovery url will be generated to recover this Checkout Session if it
+ # expires before a transaction is completed. It will be attached to the
+ # Checkout Session object upon expiration.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # The timestamp at which the recovery URL will expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ # When set, configuration used to recover the Checkout Session on expiry.
+ sig { returns(T.nilable(Recovery)) }
+ attr_reader :recovery
+ end
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Indicates whether automatic tax is enabled for the session
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ # The status of the most recent automated tax calculation for this session.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ end
+ class CollectedInformation < Stripe::StripeObject
+ class ShippingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Customer name.
+ sig { returns(String) }
+ attr_reader :name
+ end
+ # Shipping information for this Checkout Session.
+ sig { returns(T.nilable(ShippingDetails)) }
+ attr_reader :shipping_details
+ end
+ class Consent < Stripe::StripeObject
+ # If `opt_in`, the customer consents to receiving promotional communications
+ # from the merchant about this Checkout Session.
+ sig { returns(T.nilable(String)) }
+ attr_reader :promotions
+ # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terms_of_service
+ end
+ class ConsentCollection < Stripe::StripeObject
+ class PaymentMethodReuseAgreement < Stripe::StripeObject
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
+ #
+ # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ sig { returns(String) }
+ attr_reader :position
+ end
+ # If set to `hidden`, it will hide legal text related to the reuse of a payment method.
+ sig { returns(T.nilable(PaymentMethodReuseAgreement)) }
+ attr_reader :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ sig { returns(T.nilable(String)) }
+ attr_reader :promotions
+ # If set to `required`, it requires customers to accept the terms of service before being able to pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terms_of_service
+ end
+ class CurrencyConversion < Stripe::StripeObject
+ # Total of all items in source currency before discounts or taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total of all items in source currency after discounts and taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # Exchange rate used to convert source currency amounts to customer currency amounts
+ sig { returns(String) }
+ attr_reader :fx_rate
+ # Creation currency of the CheckoutSession before localization
+ sig { returns(String) }
+ attr_reader :source_currency
+ end
+ class CustomField < Stripe::StripeObject
+ class Dropdown < Stripe::StripeObject
+ class Option < Stripe::StripeObject
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_reader :label
+ # 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.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # The value that will pre-fill on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig { returns(T::Array[Option]) }
+ attr_reader :options
+ # The option selected by the customer. This will be the `value` for the option.
+ sig { returns(T.nilable(String)) }
+ attr_reader :value
+ end
+ class Label < Stripe::StripeObject
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Numeric < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum_length
+ # The value entered by the customer, containing only digits.
+ sig { returns(T.nilable(String)) }
+ attr_reader :value
+ end
+ class Text < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum_length
+ # The value entered by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :value
+ end
+ # Attribute for field dropdown
+ sig { returns(Dropdown) }
+ attr_reader :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_reader :key
+ # Attribute for field label
+ sig { returns(Label) }
+ attr_reader :label
+ # Attribute for field numeric
+ sig { returns(Numeric) }
+ attr_reader :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_reader :optional
+ # Attribute for field text
+ sig { returns(Text) }
+ attr_reader :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class CustomText < Stripe::StripeObject
+ class AfterSubmit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ class Submit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ class TermsOfServiceAcceptance < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig { returns(T.nilable(AfterSubmit)) }
+ attr_reader :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig { returns(T.nilable(Submit)) }
+ attr_reader :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig { returns(T.nilable(TermsOfServiceAcceptance)) }
+ attr_reader :terms_of_service_acceptance
+ end
+ class CustomerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class TaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ sig { returns(String) }
+ attr_reader :type
+ # The value of the tax ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :value
+ end
+ # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.
+ # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # The customer's phone number after a completed Checkout Session.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The customer’s tax exempt status after a completed Checkout Session.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_exempt
+ # The customer’s tax IDs after a completed Checkout Session.
+ sig { returns(T.nilable(T::Array[TaxId])) }
+ attr_reader :tax_ids
+ end
+ class Discount < Stripe::StripeObject
+ # Coupon attached to the Checkout Session.
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
+ attr_reader :coupon
+ # Promotion code attached to the Checkout Session.
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
+ attr_reader :promotion_code
+ end
+ class InvoiceCreation < Stripe::StripeObject
+ class InvoiceData < Stripe::StripeObject
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ sig { returns(String) }
+ attr_reader :name
+ # The value of the custom field.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class RenderingOptions < Stripe::StripeObject
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ sig { returns(T.nilable(String)) }
+ attr_reader :amount_tax_display
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :account_tax_ids
+ # Custom fields displayed on the invoice.
+ sig { returns(T.nilable(T::Array[CustomField])) }
+ attr_reader :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Footer displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(Issuer)) }
+ attr_reader :issuer
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Options for invoice PDF rendering.
+ sig { returns(T.nilable(RenderingOptions)) }
+ attr_reader :rendering_options
+ end
+ # Indicates whether invoice creation is enabled for the Checkout Session.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field invoice_data
+ sig { returns(InvoiceData) }
+ attr_reader :invoice_data
+ end
+ class OptionalItem < Stripe::StripeObject
+ class AdjustableQuantity < Stripe::StripeObject
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum
+ end
+ # Attribute for field adjustable_quantity
+ sig { returns(T.nilable(AdjustableQuantity)) }
+ attr_reader :adjustable_quantity
+ # Attribute for field price
+ sig { returns(String) }
+ attr_reader :price
+ # Attribute for field quantity
+ sig { returns(Integer) }
+ attr_reader :quantity
+ end
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
+ # ID of the payment method configuration used.
+ sig { returns(String) }
+ attr_reader :id
+ # ID of the parent payment method configuration used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :parent
+ end
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # A URL for custom mandate text
+ sig { returns(String) }
+ attr_reader :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
+ sig { returns(T::Array[String]) }
+ attr_reader :default_for
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_type
+ end
+ # Currency supported by the bank account. Returned when the Session is in `setup` mode.
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ class Affirm < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class AfterpayClearpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Alipay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class AmazonPay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class AuBecsDebit < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class BacsDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(String) }
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class Bancontact < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Boleto < Stripe::StripeObject
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(Integer) }
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Card < Stripe::StripeObject
+ class Installments < Stripe::StripeObject
+ # Indicates if installments are enabled
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class Restrictions < Stripe::StripeObject
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
+ sig { returns(T::Array[String]) }
+ attr_reader :brands_blocked
+ end
+ # Attribute for field installments
+ sig { returns(Installments) }
+ attr_reader :installments
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
+ sig { returns(String) }
+ attr_reader :request_extended_authorization
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
+ sig { returns(String) }
+ attr_reader :request_incremental_authorization
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
+ sig { returns(String) }
+ attr_reader :request_multicapture
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
+ sig { returns(String) }
+ attr_reader :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(String) }
+ attr_reader :request_three_d_secure
+ # Attribute for field restrictions
+ sig { returns(Restrictions) }
+ attr_reader :restrictions
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(String) }
+ attr_reader :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(String) }
+ attr_reader :statement_descriptor_suffix_kanji
+ end
+ class Cashapp < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ sig { returns(EuBankTransfer) }
+ attr_reader :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T::Array[String]) }
+ attr_reader :requested_address_types
+ # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ sig { returns(BankTransfer) }
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Eps < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Fpx < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Giropay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Grabpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Ideal < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class KakaoPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Klarna < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Konbini < Stripe::StripeObject
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class KrCard < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Link < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Mobilepay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Multibanco < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class NaverPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ end
+ class Oxxo < Stripe::StripeObject
+ # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(Integer) }
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class P24 < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Payco < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ end
+ class Paynow < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Paypal < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Preferred locale of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Pix < Stripe::StripeObject
+ # The number of seconds after which Pix payment will expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_after_seconds
+ end
+ class RevolutPay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class SamsungPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ end
+ class SepaDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(String) }
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class Sofort < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Swish < Stripe::StripeObject
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ sig { returns(T::Array[String]) }
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ sig { returns(Filters) }
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ sig { returns(T::Array[String]) }
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(String) }
+ attr_reader :return_url
+ end
+ # Attribute for field financial_connections
+ sig { returns(FinancialConnections) }
+ attr_reader :financial_connections
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ sig { returns(CustomerBalance) }
+ attr_reader :customer_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field fpx
+ sig { returns(Fpx) }
+ attr_reader :fpx
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field konbini
+ sig { returns(Konbini) }
+ attr_reader :konbini
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field mobilepay
+ sig { returns(Mobilepay) }
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field oxxo
+ sig { returns(Oxxo) }
+ attr_reader :oxxo
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field payco
+ sig { returns(Payco) }
+ attr_reader :payco
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field pix
+ sig { returns(Pix) }
+ attr_reader :pix
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class Permissions < Stripe::StripeObject
+ # Determines which entity is allowed to update the shipping details.
+ #
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ #
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ sig { returns(T.nilable(String)) }
+ attr_reader :update_shipping_details
+ end
+ class PhoneNumberCollection < Stripe::StripeObject
+ # Indicates whether phone number collection is enabled for the session
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ sig { returns(Integer) }
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ sig { returns(String) }
+ attr_reader :presentment_currency
+ end
+ class SavedPaymentMethodOptions < Stripe::StripeObject
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :allow_redisplay_filters
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_method_remove
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_method_save
+ end
+ class ShippingAddressCollection < Stripe::StripeObject
+ # 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, SY, UM, VI`.
+ sig { returns(T::Array[String]) }
+ attr_reader :allowed_countries
+ end
+ class ShippingCost < Stripe::StripeObject
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # Total shipping cost before any discounts or taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Total shipping cost after discounts and taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # The ID of the ShippingRate for this order.
+ sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) }
+ attr_reader :shipping_rate
+ # The taxes applied to the shipping rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ class ShippingOption < Stripe::StripeObject
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_reader :shipping_amount
+ # The shipping rate.
+ sig { returns(T.any(String, Stripe::ShippingRate)) }
+ attr_reader :shipping_rate
+ end
+ class TaxIdCollection < Stripe::StripeObject
+ # Indicates whether tax ID collection is enabled for the session
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Indicates whether a tax ID is required on the payment page
+ sig { returns(String) }
+ attr_reader :required
+ end
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ sig { returns(Stripe::Discount) }
+ attr_reader :discount
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ sig { returns(Integer) }
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ sig { returns(Breakdown) }
+ attr_reader :breakdown
+ end
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ sig { returns(T.nilable(AdaptivePricing)) }
+ attr_reader :adaptive_pricing
+ # When set, provides configuration for actions to take if this Checkout Session expires.
+ sig { returns(T.nilable(AfterExpiration)) }
+ attr_reader :after_expiration
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :allow_promotion_codes
+ # Total of all items before discounts or taxes are applied.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_subtotal
+ # Total of all items after discounts and taxes are applied.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_total
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_address_collection
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancel_url
+ # A unique string to reference the Checkout Session. This can be a
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
+ # Session with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_reference_id
+ # The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded`. Client secret to be used when initializing Stripe.js embedded checkout.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_secret
+ # Information about the customer collected within the Checkout Session.
+ sig { returns(T.nilable(CollectedInformation)) }
+ attr_reader :collected_information
+ # Results of `consent_collection` for this session.
+ sig { returns(T.nilable(Consent)) }
+ attr_reader :consent
+ # When set, provides configuration for the Checkout Session to gather active consent from customers.
+ sig { returns(T.nilable(ConsentCollection)) }
+ attr_reader :consent_collection
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions
+ sig { returns(T.nilable(CurrencyConversion)) }
+ attr_reader :currency_conversion
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig { returns(T::Array[CustomField]) }
+ attr_reader :custom_fields
+ # Attribute for field custom_text
+ sig { returns(CustomText) }
+ attr_reader :custom_text
+ # The ID of the customer for this Session.
+ # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout
+ # will create a new customer object based on information provided
+ # during the payment flow unless an existing customer was provided when
+ # the Session was created.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_creation
+ # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode.
+ sig { returns(T.nilable(CustomerDetails)) }
+ attr_reader :customer_details
+ # If provided, this value will be used when the Customer object is created.
+ # If not provided, customers will be asked to enter their email address.
+ # Use this parameter to prefill customer data if you already have an email
+ # on file. To access information about the customer once the payment flow is
+ # complete, use the `customer` attribute.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_email
+ # List of coupons and promotion codes attached to the Checkout Session.
+ sig { returns(T.nilable(T::Array[Discount])) }
+ attr_reader :discounts
+ # The timestamp at which the Checkout Session will expire.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # ID of the invoice created by the Checkout Session, if it exists.
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
+ attr_reader :invoice
+ # Details on the state of invoice creation for the Checkout Session.
+ sig { returns(T.nilable(InvoiceCreation)) }
+ attr_reader :invoice_creation
+ # The line items purchased by the customer.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :locale
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # The mode of the Checkout Session.
+ sig { returns(String) }
+ attr_reader :mode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The optional items presented to the customer at checkout.
+ sig { returns(T.nilable(T::Array[OptionalItem])) }
+ attr_reader :optional_items
+ # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) }
+ attr_reader :payment_intent
+ # The ID of the Payment Link that created this Session.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) }
+ attr_reader :payment_link
+ # Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_method_collection
+ # Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
+ sig { returns(T.nilable(PaymentMethodConfigurationDetails)) }
+ attr_reader :payment_method_configuration_details
+ # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
+ sig { returns(T.nilable(PaymentMethodOptions)) }
+ attr_reader :payment_method_options
+ # A list of the types of payment methods (e.g. card) this Checkout
+ # Session is allowed to accept.
+ sig { returns(T::Array[String]) }
+ attr_reader :payment_method_types
+ # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
+ # You can use this value to decide when to fulfill your customer's order.
+ sig { returns(String) }
+ attr_reader :payment_status
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ #
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
+ sig { returns(T.nilable(Permissions)) }
+ attr_reader :permissions
+ # Attribute for field phone_number_collection
+ sig { returns(PhoneNumberCollection) }
+ attr_reader :phone_number_collection
+ # Attribute for field presentment_details
+ sig { returns(PresentmentDetails) }
+ attr_reader :presentment_details
+ # The ID of the original expired Checkout Session that triggered the recovery flow.
+ sig { returns(T.nilable(String)) }
+ attr_reader :recovered_from
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
+ sig { returns(String) }
+ attr_reader :redirect_on_completion
+ # Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
+ sig { returns(String) }
+ attr_reader :return_url
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+ sig { returns(T.nilable(SavedPaymentMethodOptions)) }
+ attr_reader :saved_payment_method_options
+ # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) }
+ attr_reader :setup_intent
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
+ sig { returns(T.nilable(ShippingAddressCollection)) }
+ attr_reader :shipping_address_collection
+ # The details of the customer cost of shipping, including the customer chosen ShippingRate.
+ sig { returns(T.nilable(ShippingCost)) }
+ attr_reader :shipping_cost
+ # The shipping rate options applied to this Session.
+ sig { returns(T::Array[ShippingOption]) }
+ attr_reader :shipping_options
+ # The status of the Checkout Session, one of `open`, `complete`, or `expired`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # Describes the type of transaction being performed by Checkout in order to customize
+ # relevant text on the page, such as the submit button. `submit_type` can only be
+ # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :submit_type
+ # The ID of the subscription for Checkout Sessions in `subscription` mode.
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
+ attr_reader :subscription
+ # The URL the customer will be directed to after the payment or
+ # subscription creation is successful.
+ sig { returns(T.nilable(String)) }
+ attr_reader :success_url
+ # Attribute for field tax_id_collection
+ sig { returns(TaxIdCollection) }
+ attr_reader :tax_id_collection
+ # Tax and discount details for the computed total amount.
+ sig { returns(T.nilable(TotalDetails)) }
+ attr_reader :total_details
+ # The UI mode of the Session. Defaults to `hosted`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ui_mode
+ # The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`
+ # This value is only present when the session is active.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CustomerDetails < Stripe::RequestParams
+ # Customer's email address.
+ sig { returns(String) }
+ attr_accessor :email
+ sig { params(email: String).void }
+ def initialize(email: nil); end
+ end
+ # Only return Checkout Sessions that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Checkout::Session::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return the Checkout Sessions for the Customer specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Only return the Checkout Sessions for the Customer details specified.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::ListParams::CustomerDetails)) }
+ attr_accessor :customer_details
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return the Checkout Session for the PaymentIntent specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # Only return the Checkout Sessions for the Payment Link specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_link
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return the Checkout Sessions matching the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return the Checkout Session for the subscription specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Checkout::Session::ListParams::Created, Integer)), customer: T.nilable(String), customer_details: T.nilable(::Stripe::Checkout::Session::ListParams::CustomerDetails), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), payment_link: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), subscription: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ customer_details: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ payment_link: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AdaptivePricing < Stripe::RequestParams
+ # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ sig { params(enabled: T.nilable(T::Boolean)).void }
+ def initialize(enabled: nil); end
+ end
+ class AfterExpiration < Stripe::RequestParams
+ class Recovery < Stripe::RequestParams
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # If `true`, a recovery URL will be generated to recover this Checkout Session if it
+ # expires before a successful transaction is completed. It will be attached to the
+ # Checkout Session object upon expiration.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(allow_promotion_codes: T.nilable(T::Boolean), enabled: T::Boolean).void }
+ def initialize(allow_promotion_codes: nil, enabled: nil); end
+ end
+ # Configure a Checkout Session that can be used to recover an expired session.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::AfterExpiration::Recovery))
+ }
+ attr_accessor :recovery
+ sig {
+ params(recovery: T.nilable(::Stripe::Checkout::Session::CreateParams::AfterExpiration::Recovery)).void
+ }
+ def initialize(recovery: nil); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Checkout::Session::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ sig { returns(String) }
+ attr_accessor :position
+ sig { params(position: String).void }
+ def initialize(position: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ConsentCollection::PaymentMethodReuseAgreement))
+ }
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terms_of_service
+ sig {
+ params(payment_method_reuse_agreement: T.nilable(::Stripe::Checkout::Session::CreateParams::ConsentCollection::PaymentMethodReuseAgreement), promotions: T.nilable(String), terms_of_service: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_reuse_agreement: nil,
+ promotions: nil,
+ terms_of_service: nil
+ ); end
+ end
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_accessor :label
+ # 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.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(label: String, value: String).void }
+ def initialize(label: nil, value: nil); end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig {
+ returns(T::Array[::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown::Option])
+ }
+ attr_accessor :options
+ sig {
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown::Option]).void
+ }
+ def initialize(default_value: nil, options: nil); end
+ end
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(String) }
+ attr_accessor :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(custom: String, type: String).void }
+ def initialize(custom: nil, type: nil); end
+ end
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ # Configuration for `type=dropdown` fields.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown))
+ }
+ attr_accessor :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ sig { returns(::Stripe::Checkout::Session::CreateParams::CustomField::Label) }
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomField::Numeric))
+ }
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomField::Text)) }
+ attr_accessor :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(dropdown: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown), key: String, label: ::Stripe::Checkout::Session::CreateParams::CustomField::Label, numeric: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomField::Numeric), optional: T.nilable(T::Boolean), text: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomField::Text), type: String).void
+ }
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ ); end
+ end
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::AfterSubmit))))
+ }
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::ShippingAddress))))
+ }
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::Submit))))
+ }
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::TermsOfServiceAcceptance))))
+ }
+ attr_accessor :terms_of_service_acceptance
+ sig {
+ params(after_submit: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::AfterSubmit))), shipping_address: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::ShippingAddress))), submit: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::Submit))), terms_of_service_acceptance: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::CustomText::TermsOfServiceAcceptance)))).void
+ }
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ ); end
+ end
+ class CustomerUpdate < Stripe::RequestParams
+ # Describes whether Checkout saves the billing address onto `customer.address`.
+ # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address
+ # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Describes whether Checkout saves shipping information onto `customer.shipping`.
+ # To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping
+ sig {
+ params(address: T.nilable(String), name: T.nilable(String), shipping: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, shipping: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this Session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this Session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig { params(coupon: T.nilable(String), promotion_code: T.nilable(String)).void }
+ def initialize(coupon: nil, promotion_code: nil); end
+ end
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ sig { params(amount_tax_display: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(amount_tax_display: nil); end
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::Issuer))
+ }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ 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::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::CustomField]))), description: T.nilable(String), footer: T.nilable(String), issuer: T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::Issuer), metadata: T.nilable(T::Hash[String, String]), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)))).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ ); end
+ end
+ # Set to `true` to enable invoice creation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Parameters passed when creating invoices for payment-mode Checkout Sessions.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData))
+ }
+ attr_accessor :invoice_data
+ sig {
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData)).void
+ }
+ def initialize(enabled: nil, invoice_data: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::Recurring))
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :dynamic_tax_rates
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData)) }
+ attr_accessor :price_data
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :tax_rates
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::AdjustableQuantity), dynamic_tax_rates: T.nilable(T::Array[String]), price: T.nilable(String), price_data: T.nilable(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ adjustable_quantity: nil,
+ dynamic_tax_rates: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::OptionalItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ sig { returns(String) }
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::Checkout::Session::CreateParams::OptionalItem::AdjustableQuantity), price: String, quantity: Integer).void
+ }
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
+ end
+ class PaymentIntentData < Stripe::RequestParams
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig {
+ returns(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping::Address)
+ }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ carrier: nil,
+ name: nil,
+ phone: nil,
+ tracking_number: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. For details,
+ # see the PaymentIntents [use case for connected
+ # accounts](/docs/payments/connected-accounts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the
+ # customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,
+ # Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this payment.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping))
+ }
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # The parameters used to automatically create a Transfer when the payment succeeds.
+ # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::TransferData))
+ }
+ attr_accessor :transfer_data
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(application_fee_amount: T.nilable(Integer), capture_method: T.nilable(String), description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), receipt_email: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ application_fee_amount: nil,
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ sig { params(allow_redisplay: T.nilable(String)).void }
+ def initialize(allow_redisplay: nil); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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). This is only accepted for Checkout Sessions in `setup` mode.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(String), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(String), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(String), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ # Setting to true enables installments for this Checkout Session.
+ # Setting to false will prevent any installment plan from applying to a payment.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ sig { params(enabled: T.nilable(T::Boolean)).void }
+ def initialize(enabled: nil); end
+ end
+ class Restrictions < Stripe::RequestParams
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :brands_blocked
+ sig { params(brands_blocked: T.nilable(T::Array[String])).void }
+ def initialize(brands_blocked: nil); end
+ end
+ # Installment options for card payments
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # Restrictions to apply to the card payment method. For example, you can block specific card brands.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card::Restrictions))
+ }
+ attr_accessor :restrictions
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ sig {
+ params(installments: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card::Installments), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), restrictions: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card::Restrictions), setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String)).void
+ }
+ def initialize(
+ installments: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ restrictions: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(String)).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ sig { params(expires_after_seconds: T.nilable(Integer)).void }
+ def initialize(expires_after_seconds: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(String)).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(String), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig { params(reference: T.nilable(String)).void }
+ def initialize(reference: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), setup_future_usage: T.nilable(String), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(String) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: String, setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ # contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Affirm))
+ }
+ attr_accessor :affirm
+ # contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Alipay))
+ }
+ attr_accessor :alipay
+ # contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # contains details about the AU Becs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Bancontact))
+ }
+ attr_accessor :bancontact
+ # contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Boleto))
+ }
+ attr_accessor :boleto
+ # contains details about the Card payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card))
+ }
+ attr_accessor :card
+ # contains details about the Cashapp Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Cashapp))
+ }
+ attr_accessor :cashapp
+ # contains details about the Customer Balance payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Eps))
+ }
+ attr_accessor :eps
+ # contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Fpx))
+ }
+ attr_accessor :fpx
+ # contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Giropay))
+ }
+ attr_accessor :giropay
+ # contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Grabpay))
+ }
+ attr_accessor :grabpay
+ # contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Ideal))
+ }
+ attr_accessor :ideal
+ # contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna))
+ }
+ attr_accessor :klarna
+ # contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Konbini))
+ }
+ attr_accessor :konbini
+ # contains details about the Korean card payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KrCard))
+ }
+ attr_accessor :kr_card
+ # contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Link))
+ }
+ attr_accessor :link
+ # contains details about the Mobilepay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Multibanco))
+ }
+ attr_accessor :multibanco
+ # contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Oxxo))
+ }
+ attr_accessor :oxxo
+ # contains details about the P24 payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::P24))
+ }
+ attr_accessor :p24
+ # contains details about the Pay By Bank payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payco))
+ }
+ attr_accessor :payco
+ # contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paynow))
+ }
+ attr_accessor :paynow
+ # contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Pix))
+ }
+ attr_accessor :pix
+ # contains details about the RevolutPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # contains details about the Sepa Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # contains details about the Sofort payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Sofort))
+ }
+ attr_accessor :sofort
+ # contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Swish))
+ }
+ attr_accessor :swish
+ # contains details about the Us Bank Account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ sig {
+ params(acss_debit: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Alipay), amazon_pay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Bancontact), boleto: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card), cashapp: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Giropay), grabpay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Grabpay), ideal: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Ideal), kakao_pay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Link), mobilepay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::P24), pay_by_bank: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::PayByBank), payco: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paypal), pix: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Pix), revolut_pay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit), sofort: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Swish), us_bank_account: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::WechatPay)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ us_bank_account: nil,
+ wechat_pay: nil
+ ); end
+ end
+ class Permissions < Stripe::RequestParams
+ # Determines which entity is allowed to update the shipping details.
+ #
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ #
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :update_shipping_details
+ sig { params(update_shipping_details: T.nilable(String)).void }
+ def initialize(update_shipping_details: nil); end
+ end
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ #
+ # Can only be set in `payment` and `subscription` mode.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class SavedPaymentMethodOptions < Stripe::RequestParams
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allow_redisplay_filters
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_save
+ sig {
+ params(allow_redisplay_filters: T.nilable(T::Array[String]), payment_method_save: T.nilable(String)).void
+ }
+ def initialize(allow_redisplay_filters: nil, payment_method_save: nil); end
+ end
+ class SetupIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Stripe account for which the setup is intended.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ sig {
+ params(description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String)).void
+ }
+ def initialize(description: nil, metadata: nil, on_behalf_of: nil); end
+ end
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ sig { returns(T::Array[String]) }
+ attr_accessor :allowed_countries
+ sig { params(allowed_countries: T::Array[String]).void }
+ def initialize(allowed_countries: nil); end
+ end
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData))
+ }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(issuer: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings::Issuer)).void
+ }
+ def initialize(issuer: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig {
+ returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings::EndBehavior)
+ }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # 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. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :billing_cycle_anchor
+ # The tax rates that will apply to any subscription item that does not have
+ # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
+ # from the subscription.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_tax_rates
+ # 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 the [customer portal](https://stripe.com/docs/customer-management).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData))
+ }
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer
+ # will get before being charged for the first time. Has to be at least
+ # 48 hours in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_end
+ # Integer representing the number of trial period days before the
+ # customer is charged for the first time. Has to be at least 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings))
+ }
+ attr_accessor :trial_settings
+ sig {
+ params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void
+ }
+ def initialize(
+ application_fee_percent: nil,
+ billing_cycle_anchor: nil,
+ default_tax_rates: nil,
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :required
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
+ def initialize(enabled: nil, required: nil); end
+ end
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::AdaptivePricing)) }
+ attr_accessor :adaptive_pricing
+ # Configure actions after a Checkout Session has expired.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::AfterExpiration)) }
+ attr_accessor :after_expiration
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address_collection
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancel_url
+ # A unique string to reference the Checkout Session. This can be a
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
+ # session with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Configure fields for the Checkout Session to gather active consent from customers.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ConsentCollection)) }
+ attr_accessor :consent_collection
+ # 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). Required in `setup` mode when `payment_method_types` is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig { returns(T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::CustomField])) }
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText)) }
+ attr_accessor :custom_text
+ # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card
+ # payment method will be used to prefill the email, name, card details, and billing address
+ # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
+ # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
+ #
+ # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
+ # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
+ #
+ # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.
+ #
+ # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
+ #
+ # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
+ # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
+ #
+ # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
+ # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
+ #
+ # Can only be set in `payment` and `setup` mode.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_creation
+ # If provided, this value will be used when the Customer object is created.
+ # If not provided, customers will be asked to enter their email address.
+ # Use this parameter to prefill customer data if you already have an email
+ # on file. To access information about the customer once a session is
+ # complete, use the `customer` field.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_email
+ # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomerUpdate)) }
+ attr_accessor :customer_update
+ # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
+ sig { returns(T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::Discount])) }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Generate a post-purchase Invoice for one-time payments.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation)) }
+ attr_accessor :invoice_creation
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+ #
+ # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
+ sig { returns(T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::LineItem])) }
+ attr_accessor :line_items
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :locale
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mode
+ # 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).
+ #
+ # There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
+ #
+ # For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::OptionalItem]))
+ }
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentIntentData)) }
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_collection
+ # The ID of the payment method configuration to use with this Checkout session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # This parameter allows you to set some attributes on the payment method created during a Checkout session.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
+ #
+ # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
+ #
+ # Read more about the supported payment methods and their requirements in our [payment
+ # method details guide](/docs/payments/checkout/payment-methods).
+ #
+ # If multiple payment methods are passed, Checkout will dynamically reorder them to
+ # prioritize the most relevant payment methods based on the customer's location and
+ # other characteristics.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ #
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::Permissions)) }
+ attr_accessor :permissions
+ # Controls phone number collection settings for the session.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts
+ # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::PhoneNumberCollection)) }
+ attr_accessor :phone_number_collection
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :redirect_on_completion
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
+ # and redirect-based payment methods are enabled on the session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SavedPaymentMethodOptions))
+ }
+ attr_accessor :saved_payment_method_options
+ # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SetupIntentData)) }
+ attr_accessor :setup_intent_data
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingAddressCollection))
+ }
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::ShippingOption]))
+ }
+ attr_accessor :shipping_options
+ # Describes the type of transaction being performed by Checkout in order
+ # to customize relevant text on the page, such as the submit button.
+ # `submit_type` can only be specified on Checkout Sessions in
+ # `payment` or `subscription` mode. If blank or `auto`, `pay` is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :submit_type
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # The URL to which Stripe should send customers when payment or setup
+ # is complete.
+ # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
+ # information from the successful Checkout Session on your page, read the
+ # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :success_url
+ # Controls tax ID collection during checkout.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::TaxIdCollection)) }
+ attr_accessor :tax_id_collection
+ # The UI mode of the Session. Defaults to `hosted`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ui_mode
+ sig {
+ params(adaptive_pricing: T.nilable(::Stripe::Checkout::Session::CreateParams::AdaptivePricing), after_expiration: T.nilable(::Stripe::Checkout::Session::CreateParams::AfterExpiration), allow_promotion_codes: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::Checkout::Session::CreateParams::AutomaticTax), billing_address_collection: T.nilable(String), cancel_url: T.nilable(String), client_reference_id: T.nilable(String), consent_collection: T.nilable(::Stripe::Checkout::Session::CreateParams::ConsentCollection), currency: T.nilable(String), custom_fields: T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::CustomField]), custom_text: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText), customer: T.nilable(String), customer_creation: T.nilable(String), customer_email: T.nilable(String), customer_update: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomerUpdate), discounts: T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::Discount]), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), invoice_creation: T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation), line_items: T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::LineItem]), locale: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), mode: T.nilable(String), optional_items: T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::OptionalItem]), payment_intent_data: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentIntentData), payment_method_collection: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), permissions: T.nilable(::Stripe::Checkout::Session::CreateParams::Permissions), phone_number_collection: T.nilable(::Stripe::Checkout::Session::CreateParams::PhoneNumberCollection), redirect_on_completion: T.nilable(String), return_url: T.nilable(String), saved_payment_method_options: T.nilable(::Stripe::Checkout::Session::CreateParams::SavedPaymentMethodOptions), setup_intent_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SetupIntentData), shipping_address_collection: T.nilable(::Stripe::Checkout::Session::CreateParams::ShippingAddressCollection), shipping_options: T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::ShippingOption]), submit_type: T.nilable(String), subscription_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData), success_url: T.nilable(String), tax_id_collection: T.nilable(::Stripe::Checkout::Session::CreateParams::TaxIdCollection), ui_mode: T.nilable(String)).void
+ }
+ def initialize(
+ adaptive_pricing: nil,
+ after_expiration: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ cancel_url: nil,
+ client_reference_id: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer: nil,
+ customer_creation: nil,
+ customer_email: nil,
+ customer_update: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ locale: nil,
+ metadata: nil,
+ mode: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ permissions: nil,
+ phone_number_collection: nil,
+ redirect_on_completion: nil,
+ return_url: nil,
+ saved_payment_method_options: nil,
+ setup_intent_data: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ success_url: nil,
+ tax_id_collection: nil,
+ ui_mode: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CollectedInformation < Stripe::RequestParams
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: String, line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The address of the customer
+ sig {
+ returns(::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails::Address)
+ }
+ attr_accessor :address
+ # The name of customer
+ sig { returns(String) }
+ attr_accessor :name
+ sig {
+ params(address: ::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails::Address, name: String).void
+ }
+ def initialize(address: nil, name: nil); end
+ end
+ # The shipping details to apply to this Session.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails))
+ }
+ attr_accessor :shipping_details
+ sig {
+ params(shipping_details: T.nilable(::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails)).void
+ }
+ def initialize(shipping_details: nil); end
+ end
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData))
+ }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ # Information about the customer collected within the Checkout Session.
+ sig { returns(T.nilable(::Stripe::Checkout::Session::UpdateParams::CollectedInformation)) }
+ attr_accessor :collected_information
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::Session::UpdateParams::ShippingOption]))))
+ }
+ attr_accessor :shipping_options
+ sig {
+ params(collected_information: T.nilable(::Stripe::Checkout::Session::UpdateParams::CollectedInformation), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), shipping_options: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::Session::UpdateParams::ShippingOption])))).void
+ }
+ def initialize(
+ collected_information: nil,
+ expand: nil,
+ metadata: nil,
+ shipping_options: nil
+ ); end
+ end
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a Checkout Session object.
+ sig {
+ params(params: T.any(::Stripe::Checkout::Session::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # A Checkout Session can be expired when it is in one of these statuses: open
+ #
+ # After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
+ sig {
+ params(params: T.any(::Stripe::Checkout::Session::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def expire(params = {}, opts = {}); end
+
+ # A Checkout Session can be expired when it is in one of these statuses: open
+ #
+ # After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::Session::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def self.expire(session, params = {}, opts = {}); end
+
+ # Returns a list of Checkout Sessions.
+ sig {
+ params(params: T.any(::Stripe::Checkout::Session::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # When retrieving a Checkout Session, 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.
+ sig {
+ params(params: T.any(::Stripe::Checkout::Session::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_line_items(params = {}, opts = {}); end
+
+ # When retrieving a Checkout Session, 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.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::Session::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_line_items(session, params = {}, opts = {}); end
+
+ # Updates a Checkout Session object.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::Session::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def self.update(session, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi
new file mode 100644
index 00000000..986957d8
--- /dev/null
+++ b/rbi/stripe/resources/climate/order.rbi
@@ -0,0 +1,245 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Climate
+ # Orders represent your intent to purchase a particular Climate product. When you create an order, the
+ # payment is deducted from your merchant balance.
+ class Order < APIResource
+ class Beneficiary < Stripe::StripeObject
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ sig { returns(String) }
+ attr_reader :public_name
+ end
+ class DeliveryDetail < Stripe::StripeObject
+ class Location < Stripe::StripeObject
+ # The city where the supplier is located.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter ISO code representing the country where the supplier is located.
+ sig { returns(String) }
+ attr_reader :country
+ # The geographic latitude where the supplier is located.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :latitude
+ # The geographic longitude where the supplier is located.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :longitude
+ # The state/county/province/region where the supplier is located.
+ sig { returns(T.nilable(String)) }
+ attr_reader :region
+ end
+ # Time at which the delivery occurred. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :delivered_at
+ # Specific location of this delivery.
+ sig { returns(T.nilable(Location)) }
+ attr_reader :location
+ # Quantity of carbon removal supplied by this delivery.
+ sig { returns(String) }
+ attr_reader :metric_tons
+ # Once retired, a URL to the registry entry for the tons from this delivery.
+ sig { returns(T.nilable(String)) }
+ attr_reader :registry_url
+ # A supplier of carbon removal.
+ sig { returns(Stripe::Climate::Supplier) }
+ attr_reader :supplier
+ end
+ # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.
+ sig { returns(Integer) }
+ attr_reader :amount_fees
+ # Total amount of the carbon removal in the currency's smallest unit.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total amount of the order including fees in the currency's smallest unit.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # Attribute for field beneficiary
+ sig { returns(Beneficiary) }
+ attr_reader :beneficiary
+ # Time at which the order was canceled. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Reason for the cancellation of this order.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_reason
+ # For delivered orders, a URL to a delivery certificate for the order.
+ sig { returns(T.nilable(String)) }
+ attr_reader :certificate
+ # Time at which the order was confirmed. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :confirmed_at
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order.
+ sig { returns(String) }
+ attr_reader :currency
+ # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :delayed_at
+ # Time at which the order was delivered. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :delivered_at
+ # Details about the delivery of carbon removal for this order.
+ sig { returns(T::Array[DeliveryDetail]) }
+ attr_reader :delivery_details
+ # The year this order is expected to be delivered.
+ sig { returns(Integer) }
+ attr_reader :expected_delivery_year
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Quantity of carbon removal that is included in this order.
+ sig { returns(String) }
+ attr_reader :metric_tons
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Unique ID for the Climate `Product` this order is purchasing.
+ sig { returns(T.any(String, Stripe::Climate::Product)) }
+ attr_reader :product
+ # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :product_substituted_at
+ # The current status of this order.
+ sig { returns(String) }
+ attr_reader :status
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ sig { returns(String) }
+ attr_accessor :public_name
+ sig { params(public_name: String).void }
+ def initialize(public_name: nil); end
+ end
+ # Requested amount of carbon removal units. Either this or `metric_tons` must be specified.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ sig { returns(T.nilable(::Stripe::Climate::Order::CreateParams::Beneficiary)) }
+ attr_accessor :beneficiary
+ # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Requested number of tons for the order. Either this or `amount` must be specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :metric_tons
+ # Unique identifier of the Climate product.
+ sig { returns(String) }
+ attr_accessor :product
+ sig {
+ params(amount: T.nilable(Integer), beneficiary: T.nilable(::Stripe::Climate::Order::CreateParams::Beneficiary), currency: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), metric_tons: T.nilable(String), product: String).void
+ }
+ def initialize(
+ amount: nil,
+ beneficiary: nil,
+ currency: nil,
+ expand: nil,
+ metadata: nil,
+ metric_tons: nil,
+ product: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :public_name
+ sig { params(public_name: T.nilable(String)).void }
+ def initialize(public_name: nil); end
+ end
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Climate::Order::UpdateParams::Beneficiary))))
+ }
+ attr_accessor :beneficiary
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(beneficiary: T.nilable(T.nilable(T.any(String, ::Stripe::Climate::Order::UpdateParams::Beneficiary))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(beneficiary: nil, expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
+ # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
+ # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
+ # provides 90 days advance notice and refunds the amount_total.
+ sig {
+ params(params: T.any(::Stripe::Climate::Order::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
+ # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
+ # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
+ # provides 90 days advance notice and refunds the amount_total.
+ sig {
+ params(order: String, params: T.any(::Stripe::Climate::Order::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def self.cancel(order, params = {}, opts = {}); end
+
+ # Creates a Climate order object for a given Climate product. The order will be processed immediately
+ # after creation and payment will be deducted your Stripe balance.
+ sig {
+ params(params: T.any(::Stripe::Climate::Order::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Lists all Climate order objects. The orders are returned sorted by creation date, with the
+ # most recently created orders appearing first.
+ sig {
+ params(params: T.any(::Stripe::Climate::Order::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified order by setting the values of the parameters passed.
+ sig {
+ params(order: String, params: T.any(::Stripe::Climate::Order::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def self.update(order, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi
new file mode 100644
index 00000000..aec4e836
--- /dev/null
+++ b/rbi/stripe/resources/climate/product.rbi
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Climate
+ # A Climate product represents a type of carbon removal unit available for reservation.
+ # You can retrieve it to see the current price and availability.
+ class Product < APIResource
+ class CurrentPricesPerMetricTon < Stripe::StripeObject
+ # Fees for one metric ton of carbon removal in the currency's smallest unit.
+ sig { returns(Integer) }
+ attr_reader :amount_fees
+ # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Current prices for a metric ton of carbon removal in a currency's smallest unit.
+ sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) }
+ attr_reader :current_prices_per_metric_ton
+ # The year in which the carbon removal is expected to be delivered.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :delivery_year
+ # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings
+ # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)
+ # for a list of available carbon removal products.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The quantity of metric tons available for reservation.
+ sig { returns(String) }
+ attr_reader :metric_tons_available
+ # The Climate product's name.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The carbon removal suppliers that fulfill orders for this Climate product.
+ sig { returns(T::Array[Stripe::Climate::Supplier]) }
+ attr_reader :suppliers
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Lists all available Climate product objects.
+ sig {
+ params(params: T.any(::Stripe::Climate::Product::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/climate/supplier.rbi b/rbi/stripe/resources/climate/supplier.rbi
new file mode 100644
index 00000000..171a2269
--- /dev/null
+++ b/rbi/stripe/resources/climate/supplier.rbi
@@ -0,0 +1,72 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Climate
+ # A supplier of carbon removal.
+ class Supplier < APIResource
+ class Location < Stripe::StripeObject
+ # The city where the supplier is located.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter ISO code representing the country where the supplier is located.
+ sig { returns(String) }
+ attr_reader :country
+ # The geographic latitude where the supplier is located.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :latitude
+ # The geographic longitude where the supplier is located.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :longitude
+ # The state/county/province/region where the supplier is located.
+ sig { returns(T.nilable(String)) }
+ attr_reader :region
+ end
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Link to a webpage to learn more about the supplier.
+ sig { returns(String) }
+ attr_reader :info_url
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The locations in which this supplier operates.
+ sig { returns(T::Array[Location]) }
+ attr_reader :locations
+ # Name of this carbon removal supplier.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object’s type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The scientific pathway used for carbon removal.
+ sig { returns(String) }
+ attr_reader :removal_pathway
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Lists all available Climate supplier objects.
+ sig {
+ params(params: T.any(::Stripe::Climate::Supplier::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi
new file mode 100644
index 00000000..069542ff
--- /dev/null
+++ b/rbi/stripe/resources/confirmation_token.rbi
@@ -0,0 +1,1793 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # ConfirmationTokens help transport client side data collected by Stripe JS over
+ # to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
+ # is successful, values present on the ConfirmationToken are written onto the Intent.
+ #
+ # To learn more about how to use ConfirmationToken, visit the related guides:
+ # - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server)
+ # - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation).
+ class ConfirmationToken < APIResource
+ class MandateData < Stripe::StripeObject
+ class CustomerAcceptance < Stripe::StripeObject
+ class Online < Stripe::StripeObject
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig { returns(T.nilable(Online)) }
+ attr_reader :online
+ # The type of customer acceptance information included with the Mandate.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig { returns(CustomerAcceptance) }
+ attr_reader :customer_acceptance
+ end
+ class PaymentMethodOptions < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ # The `cvc_update` Token collected from the Payment Element.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_token
+ end
+ # This hash contains the card payment method options.
+ sig { returns(T.nilable(Card)) }
+ attr_reader :card
+ end
+ class PaymentMethodPreview < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Institution number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :institution_number
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Transit number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transit_number
+ end
+ class Affirm < Stripe::StripeObject; end
+ class AfterpayClearpay < Stripe::StripeObject; end
+ class Alipay < Stripe::StripeObject; end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBecsDebit < Stripe::StripeObject
+ # Six-digit number identifying bank and branch associated with this bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bsb_number
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class BacsDebit < Stripe::StripeObject
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_reader :sort_code
+ end
+ class Bancontact < Stripe::StripeObject; end
+ class Billie < Stripe::StripeObject; end
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Billing address.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ end
+ class Blik < Stripe::StripeObject; end
+ class Boleto < Stripe::StripeObject
+ # Uniquely identifies the customer tax id (CNPJ or CPF)
+ sig { returns(String) }
+ attr_reader :tax_id
+ end
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ end
+ class GeneratedFrom < Stripe::StripeObject
+ class PaymentMethodDetails < Stripe::StripeObject
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ sig { returns(String) }
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_status_information
+ end
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The authorized amount
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_authorized
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand_product
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
+ sig { returns(Integer) }
+ attr_reader :capture_before
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Authorization response cryptogram.
+ sig { returns(T.nilable(String)) }
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
+ sig { returns(T::Boolean) }
+ attr_reader :incremental_authorization_supported
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_transaction_id
+ # Details about payments collected offline.
+ sig { returns(T.nilable(Offline)) }
+ attr_reader :offline
+ # Defines whether the authorized amount can be over-captured or not
+ sig { returns(T::Boolean) }
+ attr_reader :overcapture_supported
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ sig { returns(T.nilable(Receipt)) }
+ attr_reader :receipt
+ # Attribute for field wallet
+ sig { returns(Wallet) }
+ attr_reader :wallet
+ end
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The charge that created this object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :charge
+ # Transaction-specific details of the payment method used in the payment.
+ sig { returns(T.nilable(PaymentMethodDetails)) }
+ attr_reader :payment_method_details
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) }
+ attr_reader :setup_attempt
+ end
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ sig { returns(T::Array[String]) }
+ attr_reader :available
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ class ThreeDSecureUsage < Stripe::StripeObject
+ # Whether 3D Secure is supported on this card.
+ sig { returns(T::Boolean) }
+ attr_reader :supported
+ end
+ class Wallet < Stripe::StripeObject
+ class AmexExpressCheckout < Stripe::StripeObject; end
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+ class Masterpass < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(BillingAddress)) }
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ class SamsungPay < Stripe::StripeObject; end
+ class VisaCheckout < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(BillingAddress)) }
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ # Attribute for field amex_express_checkout
+ sig { returns(AmexExpressCheckout) }
+ attr_reader :amex_express_checkout
+ # Attribute for field apple_pay
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dynamic_last4
+ # Attribute for field google_pay
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field masterpass
+ sig { returns(Masterpass) }
+ attr_reader :masterpass
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field visa_checkout
+ sig { returns(VisaCheckout) }
+ attr_reader :visa_checkout
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :brand
+ # Checks on Card address and CVC if provided.
+ sig { returns(T.nilable(Checks)) }
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future.
+ sig { returns(T.nilable(String)) }
+ attr_reader :display_brand
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :funding
+ # Details of the original PaymentMethod that created this object.
+ sig { returns(T.nilable(GeneratedFrom)) }
+ attr_reader :generated_from
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(String) }
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # Status of a card based on the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :regulated_status
+ # Contains details on how this Card may be used for 3D Secure authentication.
+ sig { returns(T.nilable(ThreeDSecureUsage)) }
+ attr_reader :three_d_secure_usage
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ sig { returns(T.nilable(Wallet)) }
+ attr_reader :wallet
+ end
+ class CardPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ sig { returns(T::Array[String]) }
+ attr_reader :available
+ # The preferred network for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand_product
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # Details about payment methods collected offline.
+ sig { returns(T.nilable(Offline)) }
+ attr_reader :offline
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # Attribute for field wallet
+ sig { returns(Wallet) }
+ attr_reader :wallet
+ end
+ class Cashapp < Stripe::StripeObject
+ # A unique and immutable identifier assigned by Cash App to every buyer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ # A public identifier for buyers using Cash App.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cashtag
+ end
+ class CustomerBalance < Stripe::StripeObject; end
+ class Eps < Stripe::StripeObject
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ end
+ class Fpx < Stripe::StripeObject
+ # Account holder type, if provided. Can be one of `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
+ sig { returns(String) }
+ attr_reader :bank
+ end
+ class Giropay < Stripe::StripeObject; end
+ class Grabpay < Stripe::StripeObject; end
+ class Ideal < Stripe::StripeObject
+ # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank, if the bank was provided.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ end
+ class InteracPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ sig { returns(T::Array[String]) }
+ attr_reader :available
+ # The preferred network for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ end
+ class KakaoPay < Stripe::StripeObject; end
+ class Klarna < Stripe::StripeObject
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year of birth.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ # The customer's date of birth, if provided.
+ sig { returns(T.nilable(Dob)) }
+ attr_reader :dob
+ end
+ class Konbini < Stripe::StripeObject; end
+ class KrCard < Stripe::StripeObject
+ # The local credit or debit card brand.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The last four digits of the card. This may not be present for American Express cards.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class Link < Stripe::StripeObject
+ # Account owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(String) }
+ attr_reader :persistent_token
+ end
+ class Mobilepay < Stripe::StripeObject; end
+ class Multibanco < Stripe::StripeObject; end
+ class NaverPay < Stripe::StripeObject
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ # Whether to fund this transaction with Naver Pay points or a card.
+ sig { returns(String) }
+ attr_reader :funding
+ end
+ class NzBankAccount < Stripe::StripeObject
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_name
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_reader :bank_code
+ # The name of the bank.
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_reader :branch_code
+ # Last four digits of the bank account number.
+ sig { returns(String) }
+ attr_reader :last4
+ # The suffix of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :suffix
+ end
+ class Oxxo < Stripe::StripeObject; end
+ class P24 < Stripe::StripeObject
+ # The customer's bank, if provided.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ end
+ class PayByBank < Stripe::StripeObject; end
+ class Payco < Stripe::StripeObject; end
+ class Paynow < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Owner's email. Values are provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_email
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_id
+ end
+ class Pix < Stripe::StripeObject; end
+ class Promptpay < Stripe::StripeObject; end
+ class RevolutPay < Stripe::StripeObject; end
+ class SamsungPay < Stripe::StripeObject; end
+ class Satispay < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject
+ class GeneratedFrom < Stripe::StripeObject
+ # The ID of the Charge that generated this PaymentMethod, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :charge
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) }
+ attr_reader :setup_attempt
+ end
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Branch code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_code
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Information about the object that generated this PaymentMethod.
+ sig { returns(T.nilable(GeneratedFrom)) }
+ attr_reader :generated_from
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class Sofort < Stripe::StripeObject
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ end
+ class Swish < Stripe::StripeObject; end
+ class Twint < Stripe::StripeObject; end
+ class UsBankAccount < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # The preferred network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ # All supported networks.
+ sig { returns(T::Array[String]) }
+ attr_reader :supported
+ end
+ class StatusDetails < Stripe::StripeObject
+ class Blocked < Stripe::StripeObject
+ # The ACH network code that resulted in this block.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_code
+ # The reason why this PaymentMethod's fingerprint has been blocked
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ # Attribute for field blocked
+ sig { returns(Blocked) }
+ attr_reader :blocked
+ end
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # The name of the bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # The ID of the Financial Connections Account used to create the payment method.
+ sig { returns(T.nilable(String)) }
+ attr_reader :financial_connections_account
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Contains information about US bank account networks that can be used.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ # Contains information about the future reusability of this PaymentMethod.
+ sig { returns(T.nilable(StatusDetails)) }
+ attr_reader :status_details
+ end
+ class WechatPay < Stripe::StripeObject; end
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # 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. The field defaults to “unspecified”.
+ sig { returns(String) }
+ attr_reader :allow_redisplay
+ # Attribute for field alma
+ sig { returns(Alma) }
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field billie
+ sig { returns(Billie) }
+ attr_reader :billie
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # Attribute for field blik
+ sig { returns(Blik) }
+ attr_reader :blik
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Attribute for field customer_balance
+ sig { returns(CustomerBalance) }
+ attr_reader :customer_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field fpx
+ sig { returns(Fpx) }
+ attr_reader :fpx
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field interac_present
+ sig { returns(InteracPresent) }
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field konbini
+ sig { returns(Konbini) }
+ attr_reader :konbini
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field mobilepay
+ sig { returns(Mobilepay) }
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # Attribute for field oxxo
+ sig { returns(Oxxo) }
+ attr_reader :oxxo
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ sig { returns(PayByBank) }
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ sig { returns(Payco) }
+ attr_reader :payco
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field pix
+ sig { returns(Pix) }
+ attr_reader :pix
+ # Attribute for field promptpay
+ sig { returns(Promptpay) }
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # Attribute for field satispay
+ sig { returns(Satispay) }
+ attr_reader :satispay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field twint
+ sig { returns(Twint) }
+ attr_reader :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ sig { returns(WechatPay) }
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ sig { returns(Zip) }
+ attr_reader :zip
+ end
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Data used for generating a Mandate.
+ sig { returns(T.nilable(MandateData)) }
+ attr_reader :mandate_data
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_intent
+ # Payment-method-specific configuration for this ConfirmationToken.
+ sig { returns(T.nilable(PaymentMethodOptions)) }
+ attr_reader :payment_method_options
+ # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
+ sig { returns(T.nilable(PaymentMethodPreview)) }
+ attr_reader :payment_method_preview
+ # Return URL used to confirm the Intent.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_url
+ # Indicates that you intend to make future payments with this ConfirmationToken's payment method.
+ #
+ # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
+ sig { returns(T.nilable(String)) }
+ attr_reader :setup_future_usage
+ # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :setup_intent
+ # Shipping information collected on this ConfirmationToken.
+ sig { returns(T.nilable(Shipping)) }
+ attr_reader :shipping
+ # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.
+ sig { returns(T::Boolean) }
+ attr_reader :use_stripe_sdk
+ class CreateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address
+ sig { returns(::Stripe::ConfirmationToken::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension)
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::ConfirmationToken::CreateParams::Shipping::Address, name: String, phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of an existing PaymentMethod.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod.
+ sig { returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Return URL used to confirm the Intent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this ConfirmationToken's payment method.
+ #
+ # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this ConfirmationToken.
+ sig { returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ sig {
+ params(expand: T.nilable(T::Array[String]), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData), return_url: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::ConfirmationToken::CreateParams::Shipping)).void
+ }
+ def initialize(
+ expand: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil
+ ); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/connect_collection_transfer.rbi b/rbi/stripe/resources/connect_collection_transfer.rbi
new file mode 100644
index 00000000..f84fb50e
--- /dev/null
+++ b/rbi/stripe/resources/connect_collection_transfer.rbi
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ConnectCollectionTransfer < APIResource
+ # Amount transferred, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the account that funds are being collected for.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/country_spec.rbi b/rbi/stripe/resources/country_spec.rbi
new file mode 100644
index 00000000..d710eb6d
--- /dev/null
+++ b/rbi/stripe/resources/country_spec.rbi
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Stripe needs to collect certain pieces of information about each account
+ # created. These requirements can differ depending on the account's country. The
+ # Country Specs API makes these rules available to your integration.
+ #
+ # You can also view the information from this API call as [an online
+ # guide](https://stripe.com/docs/connect/required-verification-information).
+ class CountrySpec < APIResource
+ class VerificationFields < Stripe::StripeObject
+ class Company < Stripe::StripeObject
+ # Additional fields which are only required for some users.
+ sig { returns(T::Array[String]) }
+ attr_reader :additional
+ # Fields which every account must eventually provide.
+ sig { returns(T::Array[String]) }
+ attr_reader :minimum
+ end
+ class Individual < Stripe::StripeObject
+ # Additional fields which are only required for some users.
+ sig { returns(T::Array[String]) }
+ attr_reader :additional
+ # Fields which every account must eventually provide.
+ sig { returns(T::Array[String]) }
+ attr_reader :minimum
+ end
+ # Attribute for field company
+ sig { returns(Company) }
+ attr_reader :company
+ # Attribute for field individual
+ sig { returns(Individual) }
+ attr_reader :individual
+ end
+ # The default currency for this country. This applies to both payment methods and bank accounts.
+ sig { returns(String) }
+ attr_reader :default_currency
+ # Unique identifier for the object. Represented as the ISO country code for this country.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Currencies that can be accepted in the specific country (for transfers).
+ sig { returns(T::Hash[String, T::Array[String]]) }
+ attr_reader :supported_bank_account_currencies
+ # Currencies that can be accepted in the specified country (for payments).
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_payment_currencies
+ # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_payment_methods
+ # Countries that can accept transfers from the specified country.
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_transfer_countries
+ # Attribute for field verification_fields
+ sig { returns(VerificationFields) }
+ attr_reader :verification_fields
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Lists all Country Spec objects available in the API.
+ sig {
+ params(params: T.any(::Stripe::CountrySpec::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/coupon.rbi b/rbi/stripe/resources/coupon.rbi
new file mode 100644
index 00000000..868cd705
--- /dev/null
+++ b/rbi/stripe/resources/coupon.rbi
@@ -0,0 +1,248 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A coupon contains information about a percent-off or amount-off discount you
+ # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
+ # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
+ class Coupon < APIResource
+ class AppliesTo < Stripe::StripeObject
+ # A list of product IDs this coupon applies to
+ sig { returns(T::Array[String]) }
+ attr_reader :products
+ end
+ class CurrencyOptions < Stripe::StripeObject
+ # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
+ sig { returns(Integer) }
+ attr_reader :amount_off
+ end
+ # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_off
+ # Attribute for field applies_to
+ sig { returns(AppliesTo) }
+ attr_reader :applies_to
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T::Hash[String, CurrencyOptions]) }
+ attr_reader :currency_options
+ # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
+ sig { returns(String) }
+ attr_reader :duration
+ # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :duration_in_months
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :max_redemptions
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Name of the coupon displayed to customers on for instance invoices or receipts.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :percent_off
+ # Date after which the coupon can no longer be redeemed.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :redeem_by
+ # Number of times this coupon has been applied to a customer.
+ sig { returns(Integer) }
+ attr_reader :times_redeemed
+ # Taking account of the above properties, whether this coupon can still be applied to a customer.
+ sig { returns(T::Boolean) }
+ attr_reader :valid
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ sig { returns(Integer) }
+ attr_accessor :amount_off
+ sig { params(amount_off: Integer).void }
+ def initialize(amount_off: nil); end
+ end
+ # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T.nilable(T::Hash[String, ::Stripe::Coupon::UpdateParams::CurrencyOptions])) }
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::Coupon::UpdateParams::CurrencyOptions]), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String)).void
+ }
+ def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::Coupon::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Coupon::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AppliesTo < Stripe::RequestParams
+ # An array of Product IDs that this Coupon will apply to.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :products
+ sig { params(products: T.nilable(T::Array[String])).void }
+ def initialize(products: nil); end
+ end
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ sig { returns(Integer) }
+ attr_accessor :amount_off
+ sig { params(amount_off: Integer).void }
+ def initialize(amount_off: nil); end
+ end
+ # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_off
+ # A hash containing directions for what this Coupon will apply discounts to.
+ sig { returns(T.nilable(::Stripe::Coupon::CreateParams::AppliesTo)) }
+ attr_accessor :applies_to
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T.nilable(T::Hash[String, ::Stripe::Coupon::CreateParams::CurrencyOptions])) }
+ attr_accessor :currency_options
+ # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duration
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :max_redemptions
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :percent_off
+ # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :redeem_by
+ sig {
+ params(amount_off: T.nilable(Integer), applies_to: T.nilable(::Stripe::Coupon::CreateParams::AppliesTo), currency: T.nilable(String), currency_options: T.nilable(T::Hash[String, ::Stripe::Coupon::CreateParams::CurrencyOptions]), duration: T.nilable(String), expand: T.nilable(T::Array[String]), id: T.nilable(String), max_redemptions: T.nilable(Integer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), percent_off: T.nilable(Float), redeem_by: T.nilable(Integer)).void
+ }
+ def initialize(
+ amount_off: nil,
+ applies_to: nil,
+ currency: nil,
+ currency_options: nil,
+ duration: nil,
+ expand: nil,
+ id: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ name: nil,
+ percent_off: nil,
+ redeem_by: nil
+ ); end
+ end
+ # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
+ #
+ # A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
+ sig {
+ params(params: T.any(::Stripe::Coupon::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
+ sig {
+ params(coupon: String, params: T.any(::Stripe::Coupon::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def self.delete(coupon, params = {}, opts = {}); end
+
+ # You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
+ sig {
+ params(params: T.any(::Stripe::Coupon::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your coupons.
+ sig {
+ params(params: T.any(::Stripe::Coupon::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
+ sig {
+ params(coupon: String, params: T.any(::Stripe::Coupon::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def self.update(coupon, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi
new file mode 100644
index 00000000..9797684b
--- /dev/null
+++ b/rbi/stripe/resources/credit_note.rbi
@@ -0,0 +1,747 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Issue a credit note to adjust an invoice's amount after the invoice is finalized.
+ #
+ # Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes)
+ class CreditNote < APIResource
+ class DiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ end
+ class PretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) }
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Refund < Stripe::StripeObject
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount_refunded
+ # ID of the refund.
+ sig { returns(T.any(String, Stripe::Refund)) }
+ attr_reader :refund
+ end
+ class ShippingCost < Stripe::StripeObject
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # Total shipping cost before any taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Total shipping cost after taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # The ID of the ShippingRate for this invoice.
+ sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) }
+ attr_reader :shipping_rate
+ # The taxes applied to the shipping rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ class TotalTax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ sig { returns(String) }
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ # The type of tax information.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # This is the sum of all the shipping amounts.
+ sig { returns(Integer) }
+ attr_reader :amount_shipping
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the customer.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Customer balance transaction related to this credit note.
+ sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) }
+ attr_reader :customer_balance_transaction
+ # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
+ sig { returns(Integer) }
+ attr_reader :discount_amount
+ # The aggregate amounts calculated per discount for all line items.
+ sig { returns(T::Array[DiscountAmount]) }
+ attr_reader :discount_amounts
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :effective_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # ID of the invoice.
+ sig { returns(T.any(String, Stripe::Invoice)) }
+ attr_reader :invoice
+ # Line items that make up the credit note
+ sig { returns(Stripe::ListObject) }
+ attr_reader :lines
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Customer-facing text that appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_reader :memo
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
+ sig { returns(String) }
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Amount that was credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :out_of_band_amount
+ # The link to download the PDF of the credit note.
+ sig { returns(String) }
+ attr_reader :pdf
+ # The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
+ sig { returns(T::Array[PretaxCreditAmount]) }
+ attr_reader :pretax_credit_amounts
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ # Refunds related to this credit note.
+ sig { returns(T::Array[Refund]) }
+ attr_reader :refunds
+ # The details of the cost of shipping, including the ShippingRate applied to the invoice.
+ sig { returns(T.nilable(ShippingCost)) }
+ attr_reader :shipping_cost
+ # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
+ sig { returns(String) }
+ attr_reader :status
+ # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
+ sig { returns(Integer) }
+ attr_reader :subtotal
+ # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :subtotal_excluding_tax
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
+ sig { returns(Integer) }
+ attr_reader :total
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :total_excluding_tax
+ # The aggregate tax information for all line items.
+ sig { returns(T.nilable(T::Array[TotalTax])) }
+ attr_reader :total_taxes
+ # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
+ sig { returns(String) }
+ attr_reader :type
+ # The time that the credit note was voided.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :voided_at
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return credit notes that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::CreditNote::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return credit notes for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return credit notes for the invoice specified by this invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::CreditNote::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ sig { returns(String) }
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void }
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNote::CreateParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ sig { returns(String) }
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNote::CreateParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund
+ sig { params(amount_refunded: T.nilable(Integer), refund: T.nilable(String)).void }
+ def initialize(amount_refunded: nil, refund: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the invoice.
+ sig { returns(String) }
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Line])) }
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Refund])) }
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ sig { returns(T.nilable(::Stripe::CreditNote::CreateParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ sig {
+ params(amount: T.nilable(Integer), credit_amount: T.nilable(Integer), effective_at: T.nilable(Integer), email_type: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: String, lines: T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Line]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), out_of_band_amount: T.nilable(Integer), reason: T.nilable(String), refund_amount: T.nilable(Integer), refunds: T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Refund]), shipping_cost: T.nilable(::Stripe::CreditNote::CreateParams::ShippingCost)).void
+ }
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Credit note memo.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(expand: nil, memo: nil, metadata: nil); end
+ end
+ class PreviewParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ sig { returns(String) }
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void }
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNote::PreviewParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ sig { returns(String) }
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNote::PreviewParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund
+ sig { params(amount_refunded: T.nilable(Integer), refund: T.nilable(String)).void }
+ def initialize(amount_refunded: nil, refund: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the invoice.
+ sig { returns(String) }
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Line])) }
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Refund])) }
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ sig { returns(T.nilable(::Stripe::CreditNote::PreviewParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ sig {
+ params(amount: T.nilable(Integer), credit_amount: T.nilable(Integer), effective_at: T.nilable(Integer), email_type: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: String, lines: T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Line]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), out_of_band_amount: T.nilable(Integer), reason: T.nilable(String), refund_amount: T.nilable(Integer), refunds: T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Refund]), shipping_cost: T.nilable(::Stripe::CreditNote::PreviewParams::ShippingCost)).void
+ }
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ ); end
+ end
+ class ListPreviewLineItemsParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ sig { returns(String) }
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void }
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ sig { returns(String) }
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund
+ sig { params(amount_refunded: T.nilable(Integer), refund: T.nilable(String)).void }
+ def initialize(amount_refunded: nil, refund: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email_type
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the invoice.
+ sig { returns(String) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Line items that make up the credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line])) }
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Refund])) }
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ sig { returns(T.nilable(::Stripe::CreditNote::ListPreviewLineItemsParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(amount: T.nilable(Integer), credit_amount: T.nilable(Integer), effective_at: T.nilable(Integer), email_type: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: String, limit: T.nilable(Integer), lines: T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), out_of_band_amount: T.nilable(Integer), reason: T.nilable(String), refund_amount: T.nilable(Integer), refunds: T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Refund]), shipping_cost: T.nilable(::Stripe::CreditNote::ListPreviewLineItemsParams::ShippingCost), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil,
+ starting_after: nil
+ ); end
+ end
+ class VoidCreditNoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
+ # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
+ # in any combination of the following:
+ #
+ #
+ # Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
+ # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
+ # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
+ #
+ #
+ # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
+ #
+ # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
+ # or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
+ sig {
+ params(params: T.any(::Stripe::CreditNote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of credit notes.
+ sig {
+ params(params: T.any(::Stripe::CreditNote::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
+ sig {
+ params(params: T.any(::Stripe::CreditNote::ListPreviewLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_preview_line_items(params = {}, opts = {}); end
+
+ # Get a preview of a credit note without creating it.
+ sig {
+ params(params: T.any(::Stripe::CreditNote::PreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def self.preview(params = {}, opts = {}); end
+
+ # Updates an existing credit note.
+ sig {
+ params(id: String, params: T.any(::Stripe::CreditNote::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def self.update(id, params = {}, opts = {}); end
+
+ # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
+ sig {
+ params(params: T.any(::Stripe::CreditNote::VoidCreditNoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def void_credit_note(params = {}, opts = {}); end
+
+ # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
+ sig {
+ params(id: String, params: T.any(::Stripe::CreditNote::VoidCreditNoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def self.void_credit_note(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi
new file mode 100644
index 00000000..59b7ffd9
--- /dev/null
+++ b/rbi/stripe/resources/credit_note_line_item.rbi
@@ -0,0 +1,101 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # The credit note line item object
+ class CreditNoteLineItem < StripeObject
+ class DiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ end
+ class PretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) }
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Tax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ sig { returns(String) }
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ # The type of tax information.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Description of the item being credited.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
+ sig { returns(Integer) }
+ attr_reader :discount_amount
+ # The amount of discount calculated per discount for this line item
+ sig { returns(T::Array[DiscountAmount]) }
+ attr_reader :discount_amounts
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # ID of the invoice line item being credited
+ sig { returns(String) }
+ attr_reader :invoice_line_item
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
+ sig { returns(T::Array[PretaxCreditAmount]) }
+ attr_reader :pretax_credit_amounts
+ # The number of units of product being credited.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :quantity
+ # The tax rates which apply to the line item.
+ sig { returns(T::Array[Stripe::TaxRate]) }
+ attr_reader :tax_rates
+ # The tax information of the line item.
+ sig { returns(T.nilable(T::Array[Tax])) }
+ attr_reader :taxes
+ # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.
+ sig { returns(String) }
+ attr_reader :type
+ # The cost of each unit of product being credited.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/customer.rbi b/rbi/stripe/resources/customer.rbi
new file mode 100644
index 00000000..a70f20df
--- /dev/null
+++ b/rbi/stripe/resources/customer.rbi
@@ -0,0 +1,1009 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information,
+ # and track payments that belong to the same customer.
+ class Customer < APIResource
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class InvoiceSettings < Stripe::StripeObject
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ sig { returns(String) }
+ attr_reader :name
+ # The value of the custom field.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ class RenderingOptions < Stripe::StripeObject
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ sig { returns(T.nilable(String)) }
+ attr_reader :amount_tax_display
+ # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :template
+ end
+ # Default custom fields to be displayed on invoices for this customer.
+ sig { returns(T.nilable(T::Array[CustomField])) }
+ attr_reader :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer
+ # Default options for invoice PDF rendering for this customer.
+ sig { returns(T.nilable(RenderingOptions)) }
+ attr_reader :rendering_options
+ end
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ end
+ class Tax < Stripe::StripeObject
+ class Location < Stripe::StripeObject
+ # The identified tax country of the customer.
+ sig { returns(String) }
+ attr_reader :country
+ # The data source used to infer the customer's location.
+ sig { returns(String) }
+ attr_reader :source
+ # The identified tax state, county, province, or region of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Surfaces if automatic tax computation is possible given the current customer location information.
+ sig { returns(String) }
+ attr_reader :automatic_tax
+ # A recent IP address of the customer used for tax reporting and tax location inference.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # The identified tax location of the customer.
+ sig { returns(T.nilable(Location)) }
+ attr_reader :location
+ end
+ # The customer's address.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
+ sig { returns(Integer) }
+ attr_reader :balance
+ # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.
+ sig { returns(T.nilable(Stripe::CashBalance)) }
+ attr_reader :cash_balance
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # ID of the default payment source for the customer.
+ #
+ # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.
+ sig {
+ returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
+ }
+ attr_reader :default_source
+ # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.
+ #
+ # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.
+ #
+ # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :delinquent
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Describes the current discount active on the customer, if there is one.
+ sig { returns(T.nilable(Stripe::Discount)) }
+ attr_reader :discount
+ # The customer's email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.
+ sig { returns(T::Hash[String, Integer]) }
+ attr_reader :invoice_credit_balance
+ # The prefix for the customer used to generate unique invoice numbers.
+ sig { returns(T.nilable(String)) }
+ attr_reader :invoice_prefix
+ # Attribute for field invoice_settings
+ sig { returns(InvoiceSettings) }
+ attr_reader :invoice_settings
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The customer's full name or business name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
+ sig { returns(Integer) }
+ attr_reader :next_invoice_sequence
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The customer's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The customer's preferred locales (languages), ordered by preference.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
+ sig { returns(T.nilable(Shipping)) }
+ attr_reader :shipping
+ # The customer's payment sources, if any.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :sources
+ # The customer's current subscriptions, if any.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :subscriptions
+ # Attribute for field tax
+ sig { returns(Tax) }
+ attr_reader :tax
+ # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_exempt
+ # The customer's tax IDs.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :tax_ids
+ # ID of the test clock that this customer belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reconciliation_mode
+ sig { params(reconciliation_mode: T.nilable(String)).void }
+ def initialize(reconciliation_mode: nil); end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ sig { returns(T.nilable(::Stripe::Customer::UpdateParams::CashBalance::Settings)) }
+ attr_accessor :settings
+ sig {
+ params(settings: T.nilable(::Stripe::Customer::UpdateParams::CashBalance::Settings)).void
+ }
+ def initialize(settings: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), template: T.nilable(String)).void
+ }
+ def initialize(amount_tax_display: nil, template: nil); end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Customer::UpdateParams::InvoiceSettings::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Customer::UpdateParams::InvoiceSettings::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ params(custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Customer::UpdateParams::InvoiceSettings::CustomField]))), default_payment_method: T.nilable(String), footer: T.nilable(String), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::Customer::UpdateParams::InvoiceSettings::RenderingOptions)))).void
+ }
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Customer shipping address.
+ sig { returns(::Stripe::Customer::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # Customer name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Customer phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::Customer::UpdateParams::Shipping::Address, name: String, phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :validate_location
+ sig {
+ params(ip_address: T.nilable(T.nilable(String)), validate_location: T.nilable(String)).void
+ }
+ def initialize(ip_address: nil, validate_location: nil); end
+ end
+ # The customer's address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Customer::UpdateParams::Address))))
+ }
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ sig { returns(T.nilable(::Stripe::Customer::UpdateParams::CashBalance)) }
+ attr_accessor :cash_balance
+ # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.
+ #
+ # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
+ #
+ # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_source
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ sig { returns(T.nilable(::Stripe::Customer::UpdateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :next_invoice_sequence
+ # The customer's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Customer::UpdateParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # Attribute for param field source
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # Tax details about the customer.
+ sig { returns(T.nilable(::Stripe::Customer::UpdateParams::Tax)) }
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :tax_exempt
+ # Attribute for param field validate
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :validate
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::Customer::UpdateParams::Address))), balance: T.nilable(Integer), cash_balance: T.nilable(::Stripe::Customer::UpdateParams::CashBalance), default_source: T.nilable(String), description: T.nilable(String), email: T.nilable(String), expand: T.nilable(T::Array[String]), invoice_prefix: T.nilable(String), invoice_settings: T.nilable(::Stripe::Customer::UpdateParams::InvoiceSettings), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), next_invoice_sequence: T.nilable(Integer), phone: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::Customer::UpdateParams::Shipping))), source: T.nilable(String), tax: T.nilable(::Stripe::Customer::UpdateParams::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), validate: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ default_source: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ validate: nil
+ ); end
+ end
+ class DeleteDiscountParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return customers that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Customer::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Customer::ListParams::Created, Integer)), email: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), test_clock: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ test_clock: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reconciliation_mode
+ sig { params(reconciliation_mode: T.nilable(String)).void }
+ def initialize(reconciliation_mode: nil); end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ sig { returns(T.nilable(::Stripe::Customer::CreateParams::CashBalance::Settings)) }
+ attr_accessor :settings
+ sig {
+ params(settings: T.nilable(::Stripe::Customer::CreateParams::CashBalance::Settings)).void
+ }
+ def initialize(settings: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), template: T.nilable(String)).void
+ }
+ def initialize(amount_tax_display: nil, template: nil); end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Customer::CreateParams::InvoiceSettings::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Customer::CreateParams::InvoiceSettings::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ params(custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Customer::CreateParams::InvoiceSettings::CustomField]))), default_payment_method: T.nilable(String), footer: T.nilable(String), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::Customer::CreateParams::InvoiceSettings::RenderingOptions)))).void
+ }
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Customer shipping address.
+ sig { returns(::Stripe::Customer::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # Customer name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Customer phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::Customer::CreateParams::Shipping::Address, name: String, phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :validate_location
+ sig {
+ params(ip_address: T.nilable(T.nilable(String)), validate_location: T.nilable(String)).void
+ }
+ def initialize(ip_address: nil, validate_location: nil); end
+ end
+ class TaxIdDatum < Stripe::RequestParams
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(type: String, value: String).void }
+ def initialize(type: nil, value: nil); end
+ end
+ # The customer's address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Customer::CreateParams::Address))))
+ }
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ sig { returns(T.nilable(::Stripe::Customer::CreateParams::CashBalance)) }
+ attr_accessor :cash_balance
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ sig { returns(T.nilable(::Stripe::Customer::CreateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :next_invoice_sequence
+ # Attribute for param field payment_method
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The customer's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Customer::CreateParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # Attribute for param field source
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # Tax details about the customer.
+ sig { returns(T.nilable(::Stripe::Customer::CreateParams::Tax)) }
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ sig { returns(T.nilable(T::Array[::Stripe::Customer::CreateParams::TaxIdDatum])) }
+ attr_accessor :tax_id_data
+ # ID of the test clock to attach to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ # Attribute for param field validate
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :validate
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::Customer::CreateParams::Address))), balance: T.nilable(Integer), cash_balance: T.nilable(::Stripe::Customer::CreateParams::CashBalance), description: T.nilable(String), email: T.nilable(String), expand: T.nilable(T::Array[String]), invoice_prefix: T.nilable(String), invoice_settings: T.nilable(::Stripe::Customer::CreateParams::InvoiceSettings), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), next_invoice_sequence: T.nilable(Integer), payment_method: T.nilable(String), phone: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::Customer::CreateParams::Shipping))), source: T.nilable(String), tax: T.nilable(::Stripe::Customer::CreateParams::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), tax_id_data: T.nilable(T::Array[::Stripe::Customer::CreateParams::TaxIdDatum]), test_clock: T.nilable(String), validate: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ payment_method: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ tax_id_data: nil,
+ test_clock: nil,
+ validate: nil
+ ); end
+ end
+ class ListPaymentMethodsParams < Stripe::RequestParams
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(allow_redisplay: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class RetrievePaymentMethodParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class CreateFundingInstructionsParams < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The type of the `bank_transfer`
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Additional parameters for `bank_transfer` funding types
+ sig { returns(::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer) }
+ attr_accessor :bank_transfer
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The `funding_type` to get the instructions for.
+ sig { returns(String) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: ::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer, currency: String, expand: T.nilable(T::Array[String]), funding_type: String).void
+ }
+ def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FundCashBalanceParams < Stripe::RequestParams
+ # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(amount: Integer, currency: String, expand: T.nilable(T::Array[String]), reference: T.nilable(String)).void
+ }
+ def initialize(amount: nil, currency: nil, expand: nil, reference: nil); end
+ end
+ # Creates a new customer object.
+ sig {
+ params(params: T.any(::Stripe::Customer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
+ # funding instructions will be created. If funding instructions have already been created for a given customer, the same
+ # funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
+ sig {
+ params(params: T.any(::Stripe::Customer::CreateFundingInstructionsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FundingInstructions)
+ }
+ def create_funding_instructions(params = {}, opts = {}); end
+
+ # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
+ # funding instructions will be created. If funding instructions have already been created for a given customer, the same
+ # funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::CreateFundingInstructionsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FundingInstructions)
+ }
+ def self.create_funding_instructions(customer, params = {}, opts = {}); end
+
+ # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def self.delete(customer, params = {}, opts = {}); end
+
+ # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
+ sig {
+ params(params: T.any(::Stripe::Customer::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Removes the currently applied discount on a customer.
+ sig {
+ params(params: T.any(::Stripe::Customer::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
+ }
+ def delete_discount(params = {}, opts = {}); end
+
+ # Removes the currently applied discount on a customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
+ }
+ def self.delete_discount(customer, params = {}, opts = {}); end
+
+ # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
+ sig {
+ params(params: T.any(::Stripe::Customer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Returns a list of PaymentMethods for a given Customer
+ sig {
+ params(params: T.any(::Stripe::Customer::ListPaymentMethodsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_payment_methods(params = {}, opts = {}); end
+
+ # Returns a list of PaymentMethods for a given Customer
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::ListPaymentMethodsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_payment_methods(customer, params = {}, opts = {}); end
+
+ # Retrieves a customer's cash balance.
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.untyped)
+ }
+ def self.retrieve_cash_balance(customer, params = {}, opts = {}); end
+
+ # Retrieves a PaymentMethod object for a given Customer.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::Customer::RetrievePaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def retrieve_payment_method(payment_method, params = {}, opts = {}); end
+
+ # Retrieves a PaymentMethod object for a given Customer.
+ sig {
+ params(customer: String, payment_method: String, params: T.any(::Stripe::Customer::RetrievePaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def self.retrieve_payment_method(customer, payment_method, params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Customer::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Customer::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
+ #
+ # This request accepts mostly the same arguments as the customer creation call.
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def self.update(customer, params = {}, opts = {}); end
+
+ # Changes the settings on a customer's cash balance.
+ sig {
+ params(customer: String, params: T.any(::Stripe::Customer::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.untyped)
+ }
+ def self.update_cash_balance(customer, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/customer_balance_transaction.rbi b/rbi/stripe/resources/customer_balance_transaction.rbi
new file mode 100644
index 00000000..b0c21e55
--- /dev/null
+++ b/rbi/stripe/resources/customer_balance_transaction.rbi
@@ -0,0 +1,56 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value,
+ # which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
+ # You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update),
+ # or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.
+ #
+ # Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance)
+ class CustomerBalanceTransaction < APIResource
+ # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The ID of the checkout session (if any) that created the transaction.
+ sig { returns(T.nilable(T.any(String, Stripe::Checkout::Session))) }
+ attr_reader :checkout_session
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The ID of the credit note (if any) related to the transaction.
+ sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) }
+ attr_reader :credit_note
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The ID of the customer the transaction belongs to.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
+ sig { returns(Integer) }
+ attr_reader :ending_balance
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The ID of the invoice (if any) related to the transaction.
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
+ attr_reader :invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.
+ sig { returns(String) }
+ attr_reader :type
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/customer_cash_balance_transaction.rbi b/rbi/stripe/resources/customer_cash_balance_transaction.rbi
new file mode 100644
index 00000000..32f58472
--- /dev/null
+++ b/rbi/stripe/resources/customer_cash_balance_transaction.rbi
@@ -0,0 +1,151 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Customers with certain payments enabled have a cash balance, representing funds that were paid
+ # by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions
+ # represent when funds are moved into or out of this balance. This includes funding by the customer, allocation
+ # to payments, and refunds to the customer.
+ class CustomerCashBalanceTransaction < APIResource
+ class AdjustedForOverdraft < Stripe::StripeObject
+ # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
+ sig { returns(T.any(String, Stripe::BalanceTransaction)) }
+ attr_reader :balance_transaction
+ # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
+ sig { returns(T.any(String, Stripe::CustomerCashBalanceTransaction)) }
+ attr_reader :linked_transaction
+ end
+ class AppliedToPayment < Stripe::StripeObject
+ # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ end
+ class Funded < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The BIC of the bank of the sender of the funding.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # The last 4 digits of the IBAN of the sender of the funding.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # The full name of the sender, as supplied by the sending bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :sender_name
+ end
+ class GbBankTransfer < Stripe::StripeObject
+ # The last 4 digits of the account number of the sender of the funding.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_number_last4
+ # The full name of the sender, as supplied by the sending bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :sender_name
+ # The sort code of the bank of the sender of the funding
+ sig { returns(T.nilable(String)) }
+ attr_reader :sort_code
+ end
+ class JpBankTransfer < Stripe::StripeObject
+ # The name of the bank of the sender of the funding.
+ sig { returns(T.nilable(String)) }
+ attr_reader :sender_bank
+ # The name of the bank branch of the sender of the funding.
+ sig { returns(T.nilable(String)) }
+ attr_reader :sender_branch
+ # The full name of the sender, as supplied by the sending bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :sender_name
+ end
+ class UsBankTransfer < Stripe::StripeObject
+ # The banking network used for this funding.
+ sig { returns(String) }
+ attr_reader :network
+ # The full name of the sender, as supplied by the sending bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :sender_name
+ end
+ # Attribute for field eu_bank_transfer
+ sig { returns(EuBankTransfer) }
+ attr_reader :eu_bank_transfer
+ # Attribute for field gb_bank_transfer
+ sig { returns(GbBankTransfer) }
+ attr_reader :gb_bank_transfer
+ # Attribute for field jp_bank_transfer
+ sig { returns(JpBankTransfer) }
+ attr_reader :jp_bank_transfer
+ # The user-supplied reference field on the bank transfer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_transfer
+ sig { returns(UsBankTransfer) }
+ attr_reader :us_bank_transfer
+ end
+ # Attribute for field bank_transfer
+ sig { returns(BankTransfer) }
+ attr_reader :bank_transfer
+ end
+ class RefundedFromPayment < Stripe::StripeObject
+ # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.
+ sig { returns(T.any(String, Stripe::Refund)) }
+ attr_reader :refund
+ end
+ class TransferredToBalance < Stripe::StripeObject
+ # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.
+ sig { returns(T.any(String, Stripe::BalanceTransaction)) }
+ attr_reader :balance_transaction
+ end
+ class UnappliedFromPayment < Stripe::StripeObject
+ # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ end
+ # Attribute for field adjusted_for_overdraft
+ sig { returns(AdjustedForOverdraft) }
+ attr_reader :adjusted_for_overdraft
+ # Attribute for field applied_to_payment
+ sig { returns(AppliedToPayment) }
+ attr_reader :applied_to_payment
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The customer whose available cash balance changed as a result of this transaction.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :ending_balance
+ # Attribute for field funded
+ sig { returns(Funded) }
+ attr_reader :funded
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
+ sig { returns(Integer) }
+ attr_reader :net_amount
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field refunded_from_payment
+ sig { returns(RefundedFromPayment) }
+ attr_reader :refunded_from_payment
+ # Attribute for field transferred_to_balance
+ sig { returns(TransferredToBalance) }
+ attr_reader :transferred_to_balance
+ # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field unapplied_from_payment
+ sig { returns(UnappliedFromPayment) }
+ attr_reader :unapplied_from_payment
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi
new file mode 100644
index 00000000..5f70c68d
--- /dev/null
+++ b/rbi/stripe/resources/customer_session.rbi
@@ -0,0 +1,200 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
+ # control over a Customer.
+ #
+ # Related guides: [Customer Session with the Payment Element](https://stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods),
+ # [Customer Session with the Pricing Table](https://stripe.com/payments/checkout/pricing-table#customer-session),
+ # [Customer Session with the Buy Button](https://stripe.com/payment-links/buy-button#pass-an-existing-customer).
+ class CustomerSession < APIResource
+ class Components < Stripe::StripeObject
+ class BuyButton < Stripe::StripeObject
+ # Whether the buy button is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class PaymentElement < Stripe::StripeObject
+ class Features < Stripe::StripeObject
+ # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
+ #
+ # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
+ sig { returns(T::Array[String]) }
+ attr_reader :payment_method_allow_redisplay_filters
+ # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
+ sig { returns(String) }
+ attr_reader :payment_method_redisplay
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :payment_method_redisplay_limit
+ # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
+ #
+ # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
+ sig { returns(String) }
+ attr_reader :payment_method_remove
+ # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
+ #
+ # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
+ sig { returns(String) }
+ attr_reader :payment_method_save
+ # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
+ #
+ # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_method_save_usage
+ end
+ # Whether the Payment Element is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # This hash defines whether the Payment Element supports certain features.
+ sig { returns(T.nilable(Features)) }
+ attr_reader :features
+ end
+ class PricingTable < Stripe::StripeObject
+ # Whether the pricing table is enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ # This hash contains whether the buy button is enabled.
+ sig { returns(BuyButton) }
+ attr_reader :buy_button
+ # This hash contains whether the Payment Element is enabled and the features it supports.
+ sig { returns(PaymentElement) }
+ attr_reader :payment_element
+ # This hash contains whether the pricing table is enabled.
+ sig { returns(PricingTable) }
+ attr_reader :pricing_table
+ end
+ # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.
+ #
+ # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ sig { returns(String) }
+ attr_reader :client_secret
+ # Configuration for the components supported by this Customer Session.
+ sig { returns(Components) }
+ attr_reader :components
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The Customer the Customer Session was created for.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # The timestamp at which this Customer Session will expire.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class BuyButton < Stripe::RequestParams
+ # Whether the buy button is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class PaymentElement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
+ #
+ # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_allow_redisplay_filters
+ # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_redisplay
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :payment_method_redisplay_limit
+ # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
+ #
+ # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_remove
+ # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
+ #
+ # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_save
+ # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
+ #
+ # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_save_usage
+ sig {
+ params(payment_method_allow_redisplay_filters: T.nilable(T::Array[String]), payment_method_redisplay: T.nilable(String), payment_method_redisplay_limit: T.nilable(Integer), payment_method_remove: T.nilable(String), payment_method_save: T.nilable(String), payment_method_save_usage: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_allow_redisplay_filters: nil,
+ payment_method_redisplay: nil,
+ payment_method_redisplay_limit: nil,
+ payment_method_remove: nil,
+ payment_method_save: nil,
+ payment_method_save_usage: nil
+ ); end
+ end
+ # Whether the Payment Element is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # This hash defines whether the Payment Element supports certain features.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSession::CreateParams::Components::PaymentElement::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::CustomerSession::CreateParams::Components::PaymentElement::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class PricingTable < Stripe::RequestParams
+ # Whether the pricing table is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ # Configuration for buy button.
+ sig { returns(T.nilable(::Stripe::CustomerSession::CreateParams::Components::BuyButton)) }
+ attr_accessor :buy_button
+ # Configuration for the Payment Element.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSession::CreateParams::Components::PaymentElement))
+ }
+ attr_accessor :payment_element
+ # Configuration for the pricing table.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSession::CreateParams::Components::PricingTable))
+ }
+ attr_accessor :pricing_table
+ sig {
+ params(buy_button: T.nilable(::Stripe::CustomerSession::CreateParams::Components::BuyButton), payment_element: T.nilable(::Stripe::CustomerSession::CreateParams::Components::PaymentElement), pricing_table: T.nilable(::Stripe::CustomerSession::CreateParams::Components::PricingTable)).void
+ }
+ def initialize(buy_button: nil, payment_element: nil, pricing_table: nil); end
+ end
+ # Configuration for each component. Exactly 1 component must be enabled.
+ sig { returns(::Stripe::CustomerSession::CreateParams::Components) }
+ attr_accessor :components
+ # The ID of an existing customer for which to create the Customer Session.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(components: ::Stripe::CustomerSession::CreateParams::Components, customer: String, expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(components: nil, customer: nil, expand: nil); end
+ end
+ # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
+ sig {
+ params(params: T.any(::Stripe::CustomerSession::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerSession)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/discount.rbi b/rbi/stripe/resources/discount.rbi
new file mode 100644
index 00000000..f7c6b367
--- /dev/null
+++ b/rbi/stripe/resources/discount.rbi
@@ -0,0 +1,53 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ class Discount < StripeObject
+ # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
+ sig { returns(T.nilable(String)) }
+ attr_reader :checkout_session
+ # A coupon contains information about a percent-off or amount-off discount you
+ # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
+ # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
+ sig { returns(Stripe::Coupon) }
+ attr_reader :coupon
+ # The ID of the customer associated with this discount.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :end
+ # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
+ sig { returns(String) }
+ attr_reader :id
+ # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :invoice
+ # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
+ sig { returns(T.nilable(String)) }
+ attr_reader :invoice_item
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The promotion code applied to create this discount.
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
+ attr_reader :promotion_code
+ # Date that the coupon was applied.
+ sig { returns(Integer) }
+ attr_reader :start
+ # The subscription that this coupon is applied to, if it is applied to a particular subscription.
+ sig { returns(T.nilable(String)) }
+ attr_reader :subscription
+ # The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
+ sig { returns(T.nilable(String)) }
+ attr_reader :subscription_item
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/dispute.rbi b/rbi/stripe/resources/dispute.rbi
new file mode 100644
index 00000000..1535e5bf
--- /dev/null
+++ b/rbi/stripe/resources/dispute.rbi
@@ -0,0 +1,761 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A dispute occurs when a customer questions your charge with their card issuer.
+ # When this happens, you have the opportunity to respond to the dispute with
+ # evidence that shows that the charge is legitimate.
+ #
+ # Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
+ class Dispute < APIResource
+ class Evidence < Stripe::StripeObject
+ class EnhancedEvidence < Stripe::StripeObject
+ class VisaCompellingEvidence3 < Stripe::StripeObject
+ class DisputedTransaction < Stripe::StripeObject
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_device_id
+ # The email address of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_purchase_ip
+ # Categorization of disputed payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :merchandise_or_services
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ class PriorUndisputedTransaction < Stripe::StripeObject
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
+ sig { returns(String) }
+ attr_reader :charge
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_device_id
+ # The email address of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_purchase_ip
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ sig { returns(T.nilable(DisputedTransaction)) }
+ attr_reader :disputed_transaction
+ # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ sig { returns(T::Array[PriorUndisputedTransaction]) }
+ attr_reader :prior_undisputed_transactions
+ end
+ class VisaCompliance < Stripe::StripeObject
+ # A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
+ sig { returns(T::Boolean) }
+ attr_reader :fee_acknowledged
+ end
+ # Attribute for field visa_compelling_evidence_3
+ sig { returns(VisaCompellingEvidence3) }
+ attr_reader :visa_compelling_evidence_3
+ # Attribute for field visa_compliance
+ sig { returns(VisaCompliance) }
+ attr_reader :visa_compliance
+ end
+ # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.
+ sig { returns(T.nilable(String)) }
+ attr_reader :access_activity_log
+ # The billing address provided by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_address
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :cancellation_policy
+ # An explanation of how and when the customer was shown your refund policy prior to purchase.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_policy_disclosure
+ # A justification for why the customer's subscription was not canceled.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_rebuttal
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :customer_communication
+ # The email address of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_email_address
+ # The name of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_name
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_purchase_ip
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :customer_signature
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :duplicate_charge_documentation
+ # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :duplicate_charge_explanation
+ # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
+ sig { returns(T.nilable(String)) }
+ attr_reader :duplicate_charge_id
+ # Attribute for field enhanced_evidence
+ sig { returns(EnhancedEvidence) }
+ attr_reader :enhanced_evidence
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :refund_policy
+ # Documentation demonstrating that the customer was shown your refund policy prior to purchase.
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_policy_disclosure
+ # A justification for why the customer is not entitled to a refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_refusal_explanation
+ # The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
+ sig { returns(T.nilable(String)) }
+ attr_reader :service_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :service_documentation
+ # The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ sig { returns(T.nilable(String)) }
+ attr_reader :shipping_address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :shipping_carrier
+ # The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ sig { returns(T.nilable(String)) }
+ attr_reader :shipping_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :shipping_documentation
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :shipping_tracking_number
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :uncategorized_file
+ # Any additional evidence or statements.
+ sig { returns(T.nilable(String)) }
+ attr_reader :uncategorized_text
+ end
+ class EvidenceDetails < Stripe::StripeObject
+ class EnhancedEligibility < Stripe::StripeObject
+ class VisaCompellingEvidence3 < Stripe::StripeObject
+ # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.
+ sig { returns(T::Array[String]) }
+ attr_reader :required_actions
+ # Visa Compelling Evidence 3.0 eligibility status.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class VisaCompliance < Stripe::StripeObject
+ # Visa compliance eligibility status.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ # Attribute for field visa_compelling_evidence_3
+ sig { returns(VisaCompellingEvidence3) }
+ attr_reader :visa_compelling_evidence_3
+ # Attribute for field visa_compliance
+ sig { returns(VisaCompliance) }
+ attr_reader :visa_compliance
+ end
+ # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :due_by
+ # Attribute for field enhanced_eligibility
+ sig { returns(EnhancedEligibility) }
+ attr_reader :enhanced_eligibility
+ # Whether evidence has been staged for this dispute.
+ sig { returns(T::Boolean) }
+ attr_reader :has_evidence
+ # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed.
+ sig { returns(T::Boolean) }
+ attr_reader :past_due
+ # The number of times evidence has been submitted. Typically, you may only submit evidence once.
+ sig { returns(Integer) }
+ attr_reader :submission_count
+ end
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AmazonPay < Stripe::StripeObject
+ # The AmazonPay dispute type, chargeback or claim
+ sig { returns(T.nilable(String)) }
+ attr_reader :dispute_type
+ end
+ class Card < Stripe::StripeObject
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :brand
+ # The type of dispute opened. Different case types may have varying fees and financial impact.
+ sig { returns(String) }
+ attr_reader :case_type
+ # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_reason_code
+ end
+ class Klarna < Stripe::StripeObject
+ # The reason for the dispute as defined by Klarna
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason_code
+ end
+ class Paypal < Stripe::StripeObject
+ # The ID of the dispute in PayPal.
+ sig { returns(T.nilable(String)) }
+ attr_reader :case_id
+ # The reason for the dispute as defined by PayPal
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason_code
+ end
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Payment method type.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
+ sig { returns(T::Array[Stripe::BalanceTransaction]) }
+ attr_reader :balance_transactions
+ # ID of the charge that's disputed.
+ sig { returns(T.any(String, Stripe::Charge)) }
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # List of eligibility types that are included in `enhanced_evidence`.
+ sig { returns(T::Array[String]) }
+ attr_reader :enhanced_eligibility_types
+ # Attribute for field evidence
+ sig { returns(Evidence) }
+ attr_reader :evidence
+ # Attribute for field evidence_details
+ sig { returns(EvidenceDetails) }
+ attr_reader :evidence_details
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
+ sig { returns(T::Boolean) }
+ attr_reader :is_charge_refundable
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Network-dependent reason code for the dispute.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_reason_code
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the PaymentIntent that's disputed.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) }
+ attr_reader :payment_intent
+ # Attribute for field payment_method_details
+ sig { returns(PaymentMethodDetails) }
+ attr_reader :payment_method_details
+ # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
+ sig { returns(String) }
+ attr_reader :reason
+ # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
+ sig { returns(String) }
+ attr_reader :status
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return disputes associated to the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return disputes that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Dispute::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::Dispute::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class EnhancedEvidence < Stripe::RequestParams
+ class VisaCompellingEvidence3 < Stripe::RequestParams
+ class DisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: T.nilable(T.nilable(String)), line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_purchase_ip
+ # Categorization of disputed payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :merchandise_or_services
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress))
+ }
+ attr_accessor :shipping_address
+ sig {
+ params(customer_account_id: T.nilable(T.nilable(String)), customer_device_fingerprint: T.nilable(T.nilable(String)), customer_device_id: T.nilable(T.nilable(String)), customer_email_address: T.nilable(T.nilable(String)), customer_purchase_ip: T.nilable(T.nilable(String)), merchandise_or_services: T.nilable(String), product_description: T.nilable(T.nilable(String)), shipping_address: T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress)).void
+ }
+ def initialize(
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ merchandise_or_services: nil,
+ product_description: nil,
+ shipping_address: nil
+ ); end
+ end
+ class PriorUndisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: T.nilable(T.nilable(String)), line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
+ sig { returns(String) }
+ attr_accessor :charge
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_purchase_ip
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress))
+ }
+ attr_accessor :shipping_address
+ sig {
+ params(charge: String, customer_account_id: T.nilable(T.nilable(String)), customer_device_fingerprint: T.nilable(T.nilable(String)), customer_device_id: T.nilable(T.nilable(String)), customer_email_address: T.nilable(T.nilable(String)), customer_purchase_ip: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), shipping_address: T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress)).void
+ }
+ def initialize(
+ charge: nil,
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ product_description: nil,
+ shipping_address: nil
+ ); end
+ end
+ # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction))
+ }
+ attr_accessor :disputed_transaction
+ # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction]))
+ }
+ attr_accessor :prior_undisputed_transactions
+ sig {
+ params(disputed_transaction: T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction), prior_undisputed_transactions: T.nilable(T::Array[::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction])).void
+ }
+ def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil); end
+ end
+ class VisaCompliance < Stripe::RequestParams
+ # A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :fee_acknowledged
+ sig { params(fee_acknowledged: T.nilable(T::Boolean)).void }
+ def initialize(fee_acknowledged: nil); end
+ end
+ # Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3))
+ }
+ attr_accessor :visa_compelling_evidence_3
+ # Evidence provided for Visa compliance evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance))
+ }
+ attr_accessor :visa_compliance
+ sig {
+ params(visa_compelling_evidence_3: T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3), visa_compliance: T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance)).void
+ }
+ def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil); end
+ end
+ # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :access_activity_log
+ # The billing address provided by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_policy
+ # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_policy_disclosure
+ # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_rebuttal
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_communication
+ # The email address of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_email_address
+ # The name of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_name
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_purchase_ip
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_signature
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duplicate_charge_documentation
+ # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duplicate_charge_explanation
+ # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duplicate_charge_id
+ # Additional evidence for qualifying evidence programs.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence))))
+ }
+ attr_accessor :enhanced_evidence
+ # A description of the product or service that was sold. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product_description
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_policy
+ # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_policy_disclosure
+ # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_refusal_explanation
+ # The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_documentation
+ # The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_carrier
+ # The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_documentation
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_tracking_number
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :uncategorized_file
+ # Any additional evidence or statements. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :uncategorized_text
+ sig {
+ params(access_activity_log: T.nilable(String), billing_address: T.nilable(String), cancellation_policy: T.nilable(String), cancellation_policy_disclosure: T.nilable(String), cancellation_rebuttal: T.nilable(String), customer_communication: T.nilable(String), customer_email_address: T.nilable(String), customer_name: T.nilable(String), customer_purchase_ip: T.nilable(String), customer_signature: T.nilable(String), duplicate_charge_documentation: T.nilable(String), duplicate_charge_explanation: T.nilable(String), duplicate_charge_id: T.nilable(String), enhanced_evidence: T.nilable(T.nilable(T.any(String, ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence))), product_description: T.nilable(String), receipt: T.nilable(String), refund_policy: T.nilable(String), refund_policy_disclosure: T.nilable(String), refund_refusal_explanation: T.nilable(String), service_date: T.nilable(String), service_documentation: T.nilable(String), shipping_address: T.nilable(String), shipping_carrier: T.nilable(String), shipping_date: T.nilable(String), shipping_documentation: T.nilable(String), shipping_tracking_number: T.nilable(String), uncategorized_file: T.nilable(String), uncategorized_text: T.nilable(String)).void
+ }
+ def initialize(
+ access_activity_log: nil,
+ billing_address: nil,
+ cancellation_policy: nil,
+ cancellation_policy_disclosure: nil,
+ cancellation_rebuttal: nil,
+ customer_communication: nil,
+ customer_email_address: nil,
+ customer_name: nil,
+ customer_purchase_ip: nil,
+ customer_signature: nil,
+ duplicate_charge_documentation: nil,
+ duplicate_charge_explanation: nil,
+ duplicate_charge_id: nil,
+ enhanced_evidence: nil,
+ product_description: nil,
+ receipt: nil,
+ refund_policy: nil,
+ refund_policy_disclosure: nil,
+ refund_refusal_explanation: nil,
+ service_date: nil,
+ service_documentation: nil,
+ shipping_address: nil,
+ shipping_carrier: nil,
+ shipping_date: nil,
+ shipping_documentation: nil,
+ shipping_tracking_number: nil,
+ uncategorized_file: nil,
+ uncategorized_text: nil
+ ); end
+ end
+ # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
+ sig { returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence)) }
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :submit
+ sig {
+ params(evidence: T.nilable(::Stripe::Dispute::UpdateParams::Evidence), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), submit: T.nilable(T::Boolean)).void
+ }
+ def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil); end
+ end
+ class CloseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
+ #
+ # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
+ sig {
+ params(params: T.any(::Stripe::Dispute::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute)
+ }
+ def close(params = {}, opts = {}); end
+
+ # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
+ #
+ # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Dispute::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute)
+ }
+ def self.close(dispute, params = {}, opts = {}); end
+
+ # Returns a list of your disputes.
+ sig {
+ params(params: T.any(::Stripe::Dispute::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
+ #
+ # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories).
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Dispute::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute)
+ }
+ def self.update(dispute, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/entitlements/active_entitlement.rbi b/rbi/stripe/resources/entitlements/active_entitlement.rbi
new file mode 100644
index 00000000..fdb12fbe
--- /dev/null
+++ b/rbi/stripe/resources/entitlements/active_entitlement.rbi
@@ -0,0 +1,58 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Entitlements
+ # An active entitlement describes access to a feature for a customer.
+ class ActiveEntitlement < APIResource
+ # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.
+ sig { returns(T.any(String, Stripe::Entitlements::Feature)) }
+ attr_reader :feature
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ sig { returns(String) }
+ attr_reader :lookup_key
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer.
+ sig { returns(String) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(customer: String, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ # Retrieve a list of active entitlements for a customer
+ sig {
+ params(params: T.any(::Stripe::Entitlements::ActiveEntitlement::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi
new file mode 100644
index 00000000..fb9d0606
--- /dev/null
+++ b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Entitlements
+ # A summary of a customer's active entitlements.
+ class ActiveEntitlementSummary < APIResource
+ # The customer that is entitled to this feature.
+ sig { returns(String) }
+ attr_reader :customer
+ # The list of entitlements this customer has.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :entitlements
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/entitlements/feature.rbi b/rbi/stripe/resources/entitlements/feature.rbi
new file mode 100644
index 00000000..64de9afd
--- /dev/null
+++ b/rbi/stripe/resources/entitlements/feature.rbi
@@ -0,0 +1,117 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Entitlements
+ # A feature represents a monetizable ability or functionality in your system.
+ # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
+ class Feature < APIResource
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ sig { returns(String) }
+ attr_reader :lookup_key
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ class ListParams < Stripe::RequestParams
+ # If set, filter results to only include features with the given archive status.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :archived
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # If set, filter results to only include features with the given lookup_key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(archived: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), lookup_key: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ archived: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_key: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ sig { returns(String) }
+ attr_accessor :lookup_key
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ sig {
+ params(expand: T.nilable(T::Array[String]), lookup_key: String, metadata: T.nilable(T::Hash[String, String]), name: String).void
+ }
+ def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String)).void
+ }
+ def initialize(active: nil, expand: nil, metadata: nil, name: nil); end
+ end
+ # Creates a feature
+ sig {
+ params(params: T.any(::Stripe::Entitlements::Feature::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Retrieve a list of features
+ sig {
+ params(params: T.any(::Stripe::Entitlements::Feature::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Update a feature's metadata or permanently deactivate it.
+ sig {
+ params(id: String, params: T.any(::Stripe::Entitlements::Feature::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature)
+ }
+ def self.update(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/ephemeral_key.rbi b/rbi/stripe/resources/ephemeral_key.rbi
new file mode 100644
index 00000000..40009523
--- /dev/null
+++ b/rbi/stripe/resources/ephemeral_key.rbi
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class EphemeralKey < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Time at which the key will expire. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :expires
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The key's secret. You can use this value to make authorized requests to the Stripe API.
+ sig { returns(String) }
+ attr_reader :secret
+ class DeleteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Invalidates a short-lived API key for a given resource.
+ sig {
+ params(key: String, params: T.any(::Stripe::EphemeralKey::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey)
+ }
+ def self.delete(key, params = {}, opts = {}); end
+
+ # Invalidates a short-lived API key for a given resource.
+ sig {
+ params(params: T.any(::Stripe::EphemeralKey::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey)
+ }
+ def delete(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi
new file mode 100644
index 00000000..adba3d17
--- /dev/null
+++ b/rbi/stripe/resources/event.rbi
@@ -0,0 +1,146 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Events are our way of letting you know when something interesting happens in
+ # your account. When an interesting event occurs, we create a new `Event`
+ # object. For example, when a charge succeeds, we create a `charge.succeeded`
+ # event, and when an invoice payment attempt fails, we create an
+ # `invoice.payment_failed` event. Certain API requests might create multiple
+ # events. For example, if you create a new subscription for a
+ # customer, you receive both a `customer.subscription.created` event and a
+ # `charge.succeeded` event.
+ #
+ # Events occur when the state of another API resource changes. The event's data
+ # field embeds the resource's state at the time of the change. For
+ # example, a `charge.succeeded` event contains a charge, and an
+ # `invoice.payment_failed` event contains an invoice.
+ #
+ # As with other API resources, you can use endpoints to retrieve an
+ # [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
+ # from the API. We also have a separate
+ # [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
+ # `Event` objects directly to an endpoint on your server. You can manage
+ # webhooks in your
+ # [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
+ # to [listen for events](https://docs.stripe.com/webhooks)
+ # so that your integration can automatically trigger reactions.
+ #
+ # When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications
+ # that occur in connected accounts. For these events, there's an
+ # additional `account` attribute in the received `Event` object.
+ #
+ # We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)
+ # for 30 days.
+ class Event < APIResource
+ class Data < Stripe::StripeObject
+ # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.
+ sig { returns(T::Hash[String, T.untyped]) }
+ attr_reader :object
+ # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements.
+ sig { returns(T::Hash[String, T.untyped]) }
+ attr_reader :previous_attributes
+ end
+ class Request < Stripe::StripeObject
+ # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id
+ # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
+ sig { returns(T.nilable(String)) }
+ attr_reader :idempotency_key
+ end
+ # The connected account that originates the event.
+ sig { returns(String) }
+ attr_reader :account
+ # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.
+ sig { returns(T.nilable(String)) }
+ attr_reader :api_version
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Attribute for field data
+ sig { returns(Data) }
+ attr_reader :data
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
+ sig { returns(Integer) }
+ attr_reader :pending_webhooks
+ # Information on the API request that triggers the event.
+ sig { returns(T.nilable(Request)) }
+ attr_reader :request
+ # Description of the event (for example, `invoice.created` or `charge.refunded`).
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return events that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Event::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :delivery_success
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :types
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Event::ListParams::Created, Integer)), delivery_success: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String), types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ created: nil,
+ delivery_success: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ types: nil
+ ); end
+ end
+ # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ sig {
+ params(params: T.any(::Stripe::Event::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/exchange_rate.rbi b/rbi/stripe/resources/exchange_rate.rbi
new file mode 100644
index 00000000..1e8d8dd5
--- /dev/null
+++ b/rbi/stripe/resources/exchange_rate.rbi
@@ -0,0 +1,66 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # `ExchangeRate` objects allow you to determine the rates that Stripe is currently
+ # using to convert from one currency to another. Since this number is variable
+ # throughout the day, there are various reasons why you might want to know the current
+ # rate (for example, to dynamically price an item for a user with a default
+ # payment in a foreign currency).
+ #
+ # Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details.
+ #
+ # *[Note: this integration path is supported but no longer recommended]* Additionally,
+ # you can guarantee that a charge is made with an exchange rate that you expect is
+ # current. To do so, you must pass in the exchange_rate to charges endpoints. If the
+ # value is no longer up to date, the charge won't go through. Please refer to our
+ # [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details.
+ #
+ # -----
+ #
+ #
+ #
+ # *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:*
+ #
+ # - *localize prices for processing payments on Stripe*
+ # - *reconcile Stripe transactions*
+ # - *determine how much money to send to a connected account*
+ # - *determine app fees to charge a connected account*
+ #
+ # *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.*
+ class ExchangeRate < APIResource
+ # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
+ sig { returns(T::Hash[String, Float]) }
+ attr_reader :rates
+ class ListParams < Stripe::RequestParams
+ # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
+ sig {
+ params(params: T.any(::Stripe::ExchangeRate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/file.rbi b/rbi/stripe/resources/file.rbi
new file mode 100644
index 00000000..5c84685f
--- /dev/null
+++ b/rbi/stripe/resources/file.rbi
@@ -0,0 +1,143 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # This object represents files hosted on Stripe's servers. You can upload
+ # files with the [create file](https://stripe.com/docs/api#create_file) request
+ # (for example, when uploading dispute evidence). Stripe also
+ # creates files independently (for example, the results of a [Sigma scheduled
+ # query](https://stripe.com/docs/api#scheduled_queries)).
+ #
+ # Related guide: [File upload guide](https://stripe.com/docs/file-upload)
+ class File < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The file expires and isn't available at this time in epoch seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # The suitable name for saving the file to a filesystem.
+ sig { returns(T.nilable(String)) }
+ attr_reader :filename
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.
+ sig { returns(T.nilable(Stripe::ListObject)) }
+ attr_reader :links
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ sig { returns(String) }
+ attr_reader :purpose
+ # The size of the file object in bytes.
+ sig { returns(Integer) }
+ attr_reader :size
+ # A suitable title for the document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :title
+ # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ # Use your live secret API key to download the file from this URL.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return files that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::File::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purpose
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::File::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), purpose: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ purpose: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class FileLinkData < Stripe::RequestParams
+ # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ sig { returns(T::Boolean) }
+ attr_accessor :create
+ # The link isn't available after this future timestamp.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(create: T::Boolean, expires_at: T.nilable(Integer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(create: nil, expires_at: nil, metadata: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.
+ sig { returns(T.untyped) }
+ attr_accessor :file
+ # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
+ sig { returns(T.nilable(::Stripe::File::CreateParams::FileLinkData)) }
+ attr_accessor :file_link_data
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ sig { returns(String) }
+ attr_accessor :purpose
+ sig {
+ params(expand: T.nilable(T::Array[String]), file: T.untyped, file_link_data: T.nilable(::Stripe::File::CreateParams::FileLinkData), purpose: String).void
+ }
+ def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil); end
+ end
+ # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
+ #
+ # All of Stripe's officially supported Client libraries support sending multipart/form-data.
+ sig {
+ params(params: T.any(::Stripe::File::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::File)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
+ sig {
+ params(params: T.any(::Stripe::File::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/file_link.rbi b/rbi/stripe/resources/file_link.rbi
new file mode 100644
index 00000000..d5a96c54
--- /dev/null
+++ b/rbi/stripe/resources/file_link.rbi
@@ -0,0 +1,141 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # To share the contents of a `File` object with non-Stripe users, you can
+ # create a `FileLink`. `FileLink`s contain a URL that you can use to
+ # retrieve the contents of the file without authentication.
+ class FileLink < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Returns if the link is already expired.
+ sig { returns(T::Boolean) }
+ attr_reader :expired
+ # Time that the link expires.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # The file object this link points to.
+ sig { returns(T.any(String, Stripe::File)) }
+ attr_reader :file
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The publicly accessible URL to download the file.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return links that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::FileLink::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Filter links by their expiration status. By default, Stripe returns all links.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :expired
+ # Only return links for the given file.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :file
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::FileLink::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), expired: T.nilable(T::Boolean), file: T.nilable(String), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ expired: nil,
+ file: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The link isn't usable after this future timestamp.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ sig { returns(String) }
+ attr_accessor :file
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), file: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :expires_at
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, expires_at: nil, metadata: nil); end
+ end
+ # Creates a new file link object.
+ sig {
+ params(params: T.any(::Stripe::FileLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of file links.
+ sig {
+ params(params: T.any(::Stripe::FileLink::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates an existing file link object. Expired links can no longer be updated.
+ sig {
+ params(link: String, params: T.any(::Stripe::FileLink::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
+ }
+ def self.update(link, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/financial_connections/account.rbi b/rbi/stripe/resources/financial_connections/account.rbi
new file mode 100644
index 00000000..1c976840
--- /dev/null
+++ b/rbi/stripe/resources/financial_connections/account.rbi
@@ -0,0 +1,339 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
+ class Account < APIResource
+ class AccountHolder < Stripe::StripeObject
+ # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Type of account holder that this account belongs to.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Balance < Stripe::StripeObject
+ class Cash < Stripe::StripeObject
+ # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions.
+ #
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ #
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
+ sig { returns(T.nilable(T::Hash[String, Integer])) }
+ attr_reader :available
+ end
+ class Credit < Stripe::StripeObject
+ # The credit that has been used by the account holder.
+ #
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ #
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
+ sig { returns(T.nilable(T::Hash[String, Integer])) }
+ attr_reader :used
+ end
+ # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :as_of
+ # Attribute for field cash
+ sig { returns(Cash) }
+ attr_reader :cash
+ # Attribute for field credit
+ sig { returns(Credit) }
+ attr_reader :credit
+ # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
+ #
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ #
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
+ sig { returns(T::Hash[String, Integer]) }
+ attr_reader :current
+ # The `type` of the balance. An additional hash is included on the balance with a name matching this value.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class BalanceRefresh < Stripe::StripeObject
+ # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :last_attempted_at
+ # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :next_refresh_available_at
+ # The status of the last refresh attempt.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class OwnershipRefresh < Stripe::StripeObject
+ # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :last_attempted_at
+ # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :next_refresh_available_at
+ # The status of the last refresh attempt.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class TransactionRefresh < Stripe::StripeObject
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :last_attempted_at
+ # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :next_refresh_available_at
+ # The status of the last refresh attempt.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ # The account holder that this account belongs to.
+ sig { returns(T.nilable(AccountHolder)) }
+ attr_reader :account_holder
+ # The most recent information about the account's balance.
+ sig { returns(T.nilable(Balance)) }
+ attr_reader :balance
+ # The state of the most recent attempt to refresh the account balance.
+ sig { returns(T.nilable(BalanceRefresh)) }
+ attr_reader :balance_refresh
+ # The type of the account. Account category is further divided in `subcategory`.
+ sig { returns(String) }
+ attr_reader :category
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # A human-readable name that has been assigned to this account, either by the account holder or by the institution.
+ sig { returns(T.nilable(String)) }
+ attr_reader :display_name
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The name of the institution that holds this account.
+ sig { returns(String) }
+ attr_reader :institution_name
+ # The last 4 digits of the account number. If present, this will be 4 numeric characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The most recent information about the account's owners.
+ sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) }
+ attr_reader :ownership
+ # The state of the most recent attempt to refresh the account owners.
+ sig { returns(T.nilable(OwnershipRefresh)) }
+ attr_reader :ownership_refresh
+ # The list of permissions granted by this account.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :permissions
+ # The status of the link to the account.
+ sig { returns(String) }
+ attr_reader :status
+ # If `category` is `cash`, one of:
+ #
+ # - `checking`
+ # - `savings`
+ # - `other`
+ #
+ # If `category` is `credit`, one of:
+ #
+ # - `mortgage`
+ # - `line_of_credit`
+ # - `credit_card`
+ # - `other`
+ #
+ # If `category` is `investment` or `other`, this will be `other`.
+ sig { returns(String) }
+ attr_reader :subcategory
+ # The list of data refresh subscriptions requested on this account.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :subscriptions
+ # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_payment_method_types
+ # The state of the most recent attempt to refresh the account transactions.
+ sig { returns(T.nilable(TransactionRefresh)) }
+ attr_reader :transaction_refresh
+ class ListParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ sig { params(account: T.nilable(String), customer: T.nilable(String)).void }
+ def initialize(account: nil, customer: nil); end
+ end
+ # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
+ sig {
+ returns(T.nilable(::Stripe::FinancialConnections::Account::ListParams::AccountHolder))
+ }
+ attr_accessor :account_holder
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # If present, only return accounts that were collected as part of the given session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(account_holder: T.nilable(::Stripe::FinancialConnections::Account::ListParams::AccountHolder), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), session: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ session: nil,
+ starting_after: nil
+ ); end
+ end
+ class ListOwnersParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The ID of the ownership object to fetch owners from.
+ sig { returns(String) }
+ attr_accessor :ownership
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), ownership: String, starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ ownership: nil,
+ starting_after: nil
+ ); end
+ end
+ class DisconnectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RefreshAccountParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The list of account features that you would like to refresh.
+ sig { returns(T::Array[String]) }
+ attr_accessor :features
+ sig { params(expand: T.nilable(T::Array[String]), features: T::Array[String]).void }
+ def initialize(expand: nil, features: nil); end
+ end
+ class SubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The list of account features to which you would like to subscribe.
+ sig { returns(T::Array[String]) }
+ attr_accessor :features
+ sig { params(expand: T.nilable(T::Array[String]), features: T::Array[String]).void }
+ def initialize(expand: nil, features: nil); end
+ end
+ class UnsubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The list of account features from which you would like to unsubscribe.
+ sig { returns(T::Array[String]) }
+ attr_accessor :features
+ sig { params(expand: T.nilable(T::Array[String]), features: T::Array[String]).void }
+ def initialize(expand: nil, features: nil); end
+ end
+ # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Account::DisconnectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def disconnect(params = {}, opts = {}); end
+
+ # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::Account::DisconnectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def self.disconnect(account, params = {}, opts = {}); end
+
+ # Returns a list of Financial Connections Account objects.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Account::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Lists all owners for a given Account
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Account::ListOwnersParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_owners(params = {}, opts = {}); end
+
+ # Lists all owners for a given Account
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::Account::ListOwnersParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_owners(account, params = {}, opts = {}); end
+
+ # Refreshes the data associated with a Financial Connections Account.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Account::RefreshAccountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def refresh_account(params = {}, opts = {}); end
+
+ # Refreshes the data associated with a Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::Account::RefreshAccountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def self.refresh_account(account, params = {}, opts = {}); end
+
+ # Subscribes to periodic refreshes of data associated with a Financial Connections Account.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Account::SubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def subscribe(params = {}, opts = {}); end
+
+ # Subscribes to periodic refreshes of data associated with a Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::Account::SubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def self.subscribe(account, params = {}, opts = {}); end
+
+ # Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Account::UnsubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def unsubscribe(params = {}, opts = {}); end
+
+ # Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::Account::UnsubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def self.unsubscribe(account, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/financial_connections/account_owner.rbi b/rbi/stripe/resources/financial_connections/account_owner.rbi
new file mode 100644
index 00000000..7990b4e3
--- /dev/null
+++ b/rbi/stripe/resources/financial_connections/account_owner.rbi
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ # Describes an owner of an account.
+ class AccountOwner < StripeObject
+ # The email address of the owner.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The full name of the owner.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The ownership object that this owner belongs to.
+ sig { returns(String) }
+ attr_reader :ownership
+ # The raw phone number of the owner.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The raw physical address of the owner.
+ sig { returns(T.nilable(String)) }
+ attr_reader :raw_address
+ # The timestamp of the refresh that updated this owner.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :refreshed_at
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/financial_connections/account_ownership.rbi b/rbi/stripe/resources/financial_connections/account_ownership.rbi
new file mode 100644
index 00000000..2ea4836b
--- /dev/null
+++ b/rbi/stripe/resources/financial_connections/account_ownership.rbi
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ # Describes a snapshot of the owners of an account at a particular point in time.
+ class AccountOwnership < StripeObject
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # A paginated list of owners for this account.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :owners
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/financial_connections/session.rbi b/rbi/stripe/resources/financial_connections/session.rbi
new file mode 100644
index 00000000..7fc71f4c
--- /dev/null
+++ b/rbi/stripe/resources/financial_connections/session.rbi
@@ -0,0 +1,123 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.
+ class Session < APIResource
+ class AccountHolder < Stripe::StripeObject
+ # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Type of account holder that this account belongs to.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Filters < Stripe::StripeObject
+ # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :account_subcategories
+ # List of countries from which to filter accounts.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :countries
+ end
+ # The account holder for whom accounts are collected in this session.
+ sig { returns(T.nilable(AccountHolder)) }
+ attr_reader :account_holder
+ # The accounts that were collected as part of this Session.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :accounts
+ # A value that will be passed to the client to launch the authentication flow.
+ sig { returns(String) }
+ attr_reader :client_secret
+ # Attribute for field filters
+ sig { returns(Filters) }
+ attr_reader :filters
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Permissions requested for accounts collected during this session.
+ sig { returns(T::Array[String]) }
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(String) }
+ attr_reader :return_url
+ class CreateParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Type of account holder to collect accounts for.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), customer: T.nilable(String), type: String).void }
+ def initialize(account: nil, customer: nil, type: nil); end
+ end
+ class Filters < Stripe::RequestParams
+ # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ # List of countries from which to collect accounts.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :countries
+ sig {
+ params(account_subcategories: T.nilable(T::Array[String]), countries: T.nilable(T::Array[String])).void
+ }
+ def initialize(account_subcategories: nil, countries: nil); end
+ end
+ # The account holder to link accounts for.
+ sig { returns(::Stripe::FinancialConnections::Session::CreateParams::AccountHolder) }
+ attr_accessor :account_holder
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Filters to restrict the kinds of accounts to collect.
+ sig { returns(T.nilable(::Stripe::FinancialConnections::Session::CreateParams::Filters)) }
+ attr_accessor :filters
+ # List of data features that you would like to request access to.
+ #
+ # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
+ sig { returns(T::Array[String]) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(account_holder: ::Stripe::FinancialConnections::Session::CreateParams::AccountHolder, expand: T.nilable(T::Array[String]), filters: T.nilable(::Stripe::FinancialConnections::Session::CreateParams::Filters), permissions: T::Array[String], prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder: nil,
+ expand: nil,
+ filters: nil,
+ permissions: nil,
+ prefetch: nil,
+ return_url: nil
+ ); end
+ end
+ # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Session::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Session)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/financial_connections/transaction.rbi b/rbi/stripe/resources/financial_connections/transaction.rbi
new file mode 100644
index 00000000..297e3ddb
--- /dev/null
+++ b/rbi/stripe/resources/financial_connections/transaction.rbi
@@ -0,0 +1,124 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ # A Transaction represents a real transaction that affects a Financial Connections Account balance.
+ class Transaction < APIResource
+ class StatusTransitions < Stripe::StripeObject
+ # Time at which this transaction posted. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :posted_at
+ # Time at which this transaction was voided. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :void_at
+ end
+ # The ID of the Financial Connections Account this transaction belongs to.
+ sig { returns(String) }
+ attr_reader :account
+ # The amount of this transaction, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The description of this transaction.
+ sig { returns(String) }
+ attr_reader :description
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The status of the transaction.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :transacted_at
+ # The token of the transaction refresh that last updated or created this transaction.
+ sig { returns(String) }
+ attr_reader :transaction_refresh
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :updated
+ class ListParams < Stripe::RequestParams
+ class TransactedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class TransactionRefresh < Stripe::RequestParams
+ # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
+ sig { returns(String) }
+ attr_accessor :after
+ sig { params(after: String).void }
+ def initialize(after: nil); end
+ end
+ # The ID of the Financial Connections Account whose transactions will be retrieved.
+ sig { returns(String) }
+ attr_accessor :account
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
+ sig {
+ returns(T.nilable(T.any(::Stripe::FinancialConnections::Transaction::ListParams::TransactedAt, Integer)))
+ }
+ attr_accessor :transacted_at
+ # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
+ sig {
+ returns(T.nilable(::Stripe::FinancialConnections::Transaction::ListParams::TransactionRefresh))
+ }
+ attr_accessor :transaction_refresh
+ sig {
+ params(account: String, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), transacted_at: T.nilable(T.any(::Stripe::FinancialConnections::Transaction::ListParams::TransactedAt, Integer)), transaction_refresh: T.nilable(::Stripe::FinancialConnections::Transaction::ListParams::TransactionRefresh)).void
+ }
+ def initialize(
+ account: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transacted_at: nil,
+ transaction_refresh: nil
+ ); end
+ end
+ # Returns a list of Financial Connections Transaction objects.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/forwarding/request.rbi b/rbi/stripe/resources/forwarding/request.rbi
new file mode 100644
index 00000000..8fd4d99d
--- /dev/null
+++ b/rbi/stripe/resources/forwarding/request.rbi
@@ -0,0 +1,216 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Forwarding
+ # Instructs Stripe to make a request on your behalf using the destination URL. The destination URL
+ # is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials
+ # provided during onboarding, and injects card details from the payment_method into the request.
+ #
+ # Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers,
+ # before storing the request and response data in the forwarding Request object, which are subject to a
+ # 30-day retention period.
+ #
+ # You can provide a Stripe idempotency key to make sure that requests with the same key result in only one
+ # outbound request. The Stripe idempotency key provided should be unique and different from any idempotency
+ # keys provided on the underlying third-party request.
+ #
+ # Forwarding Requests are synchronous requests that return a response or time out according to
+ # Stripe's limits.
+ #
+ # Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding).
+ class Request < APIResource
+ class RequestContext < Stripe::StripeObject
+ # The time it took in milliseconds for the destination endpoint to respond.
+ sig { returns(Integer) }
+ attr_reader :destination_duration
+ # The IP address of the destination.
+ sig { returns(String) }
+ attr_reader :destination_ip_address
+ end
+ class RequestDetails < Stripe::StripeObject
+ class Header < Stripe::StripeObject
+ # The header name.
+ sig { returns(String) }
+ attr_reader :name
+ # The header value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # The body payload to send to the destination endpoint.
+ sig { returns(String) }
+ attr_reader :body
+ # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ sig { returns(T::Array[Header]) }
+ attr_reader :headers
+ # The HTTP method used to call the destination endpoint.
+ sig { returns(String) }
+ attr_reader :http_method
+ end
+ class ResponseDetails < Stripe::StripeObject
+ class Header < Stripe::StripeObject
+ # The header name.
+ sig { returns(String) }
+ attr_reader :name
+ # The header value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # The response body from the destination endpoint to Stripe.
+ sig { returns(String) }
+ attr_reader :body
+ # HTTP headers that the destination endpoint returned.
+ sig { returns(T::Array[Header]) }
+ attr_reader :headers
+ # The HTTP status code that the destination endpoint returned.
+ sig { returns(Integer) }
+ attr_reader :status
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ sig { returns(String) }
+ attr_reader :payment_method
+ # The field kinds to be replaced in the forwarded request.
+ sig { returns(T::Array[String]) }
+ attr_reader :replacements
+ # Context about the request from Stripe's servers to the destination endpoint.
+ sig { returns(T.nilable(RequestContext)) }
+ attr_reader :request_context
+ # The request that was sent to the destination endpoint. We redact any sensitive fields.
+ sig { returns(T.nilable(RequestDetails)) }
+ attr_reader :request_details
+ # The response that the destination endpoint returned to us. We redact any sensitive fields.
+ sig { returns(T.nilable(ResponseDetails)) }
+ attr_reader :response_details
+ # The destination URL for the forwarded request. Must be supported by the config.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Return results where the `created` field is greater than this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Return results where the `created` field is greater than or equal to this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Return results where the `created` field is less than this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Return results where the `created` field is less than or equal to this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.
+ sig { returns(T.nilable(::Stripe::Forwarding::Request::ListParams::Created)) }
+ attr_accessor :created
+ # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(::Stripe::Forwarding::Request::ListParams::Created), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Request < Stripe::RequestParams
+ class Header < Stripe::RequestParams
+ # The header name.
+ sig { returns(String) }
+ attr_accessor :name
+ # The header value.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ # The body payload to send to the destination endpoint.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :body
+ # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Forwarding::Request::CreateParams::Request::Header]))
+ }
+ attr_accessor :headers
+ sig {
+ params(body: T.nilable(String), headers: T.nilable(T::Array[::Stripe::Forwarding::Request::CreateParams::Request::Header])).void
+ }
+ def initialize(body: nil, headers: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ sig { returns(String) }
+ attr_accessor :payment_method
+ # The field kinds to be replaced in the forwarded request.
+ sig { returns(T::Array[String]) }
+ attr_accessor :replacements
+ # The request body and headers to be sent to the destination endpoint.
+ sig { returns(::Stripe::Forwarding::Request::CreateParams::Request) }
+ attr_accessor :request
+ # The destination URL for the forwarded request. Must be supported by the config.
+ sig { returns(String) }
+ attr_accessor :url
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), payment_method: String, replacements: T::Array[String], request: ::Stripe::Forwarding::Request::CreateParams::Request, url: String).void
+ }
+ def initialize(
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ replacements: nil,
+ request: nil,
+ url: nil
+ ); end
+ end
+ # Creates a ForwardingRequest object.
+ sig {
+ params(params: T.any(::Stripe::Forwarding::Request::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Forwarding::Request)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Lists all ForwardingRequest objects.
+ sig {
+ params(params: T.any(::Stripe::Forwarding::Request::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi
new file mode 100644
index 00000000..ffc68028
--- /dev/null
+++ b/rbi/stripe/resources/funding_instructions.rbi
@@ -0,0 +1,437 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is
+ # automatically applied to future invoices and payments using the `customer_balance` payment method.
+ # Customers can fund this balance by initiating a bank transfer to any account in the
+ # `financial_addresses` field.
+ # Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)
+ class FundingInstructions < APIResource
+ class BankTransfer < Stripe::StripeObject
+ class FinancialAddress < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The ABA account number
+ sig { returns(String) }
+ attr_reader :account_number
+ # The account type
+ sig { returns(String) }
+ attr_reader :account_type
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The bank name
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The ABA routing number
+ sig { returns(String) }
+ attr_reader :routing_number
+ end
+ class Iban < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The BIC/SWIFT code of the account.
+ sig { returns(String) }
+ attr_reader :bic
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # The IBAN of the account.
+ sig { returns(String) }
+ attr_reader :iban
+ end
+ class SortCode < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The account number
+ sig { returns(String) }
+ attr_reader :account_number
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The six-digit sort code
+ sig { returns(String) }
+ attr_reader :sort_code
+ end
+ class Spei < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The three-digit bank code
+ sig { returns(String) }
+ attr_reader :bank_code
+ # The short banking institution name
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The CLABE number
+ sig { returns(String) }
+ attr_reader :clabe
+ end
+ class Swift < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The account number
+ sig { returns(String) }
+ attr_reader :account_number
+ # The account type
+ sig { returns(String) }
+ attr_reader :account_type
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The bank name
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The SWIFT code
+ sig { returns(String) }
+ attr_reader :swift_code
+ end
+ class Zengin < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_name
+ # The account number
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_number
+ # The bank account type. In Japan, this can only be `futsu` or `toza`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The bank code of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # The bank name of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # The branch code of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_code
+ # The branch name of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_name
+ end
+ # ABA Records contain U.S. bank account details per the ABA format.
+ sig { returns(Aba) }
+ attr_reader :aba
+ # Iban Records contain E.U. bank account details per the SEPA format.
+ sig { returns(Iban) }
+ attr_reader :iban
+ # Sort Code Records contain U.K. bank account details per the sort code format.
+ sig { returns(SortCode) }
+ attr_reader :sort_code
+ # SPEI Records contain Mexico bank account details per the SPEI format.
+ sig { returns(Spei) }
+ attr_reader :spei
+ # The payment networks supported by this FinancialAddress
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_networks
+ # SWIFT Records contain U.S. bank account details per the SWIFT format.
+ sig { returns(Swift) }
+ attr_reader :swift
+ # The type of financial address
+ sig { returns(String) }
+ attr_reader :type
+ # Zengin Records contain Japan bank account details per the Zengin format.
+ sig { returns(Zengin) }
+ attr_reader :zengin
+ end
+ # The country of the bank account to fund
+ sig { returns(String) }
+ attr_reader :country
+ # A list of financial addresses that can be used to fund a particular balance
+ sig { returns(T::Array[FinancialAddress]) }
+ attr_reader :financial_addresses
+ # The bank_transfer type
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ sig { returns(BankTransfer) }
+ attr_reader :bank_transfer
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The `funding_type` of the returned instructions
+ sig { returns(String) }
+ attr_reader :funding_type
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/identity/verification_report.rbi b/rbi/stripe/resources/identity/verification_report.rbi
new file mode 100644
index 00000000..cc880083
--- /dev/null
+++ b/rbi/stripe/resources/identity/verification_report.rbi
@@ -0,0 +1,351 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Identity
+ # A VerificationReport is the result of an attempt to collect and verify data from a user.
+ # The collection of verification checks performed is determined from the `type` and `options`
+ # parameters used. You can find the result of each verification check performed in the
+ # appropriate sub-resource: `document`, `id_number`, `selfie`.
+ #
+ # Each VerificationReport contains a copy of any data collected by the user as well as
+ # reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)
+ # API. To configure and create VerificationReports, use the
+ # [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
+ #
+ # Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
+ class VerificationReport < APIResource
+ class Document < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class Dob < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ class ExpirationDate < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ class IssuedDate < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ # Address as it appears in the document.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # Date of birth as it appears in the document.
+ sig { returns(T.nilable(Dob)) }
+ attr_reader :dob
+ # Details on the verification error. Present when status is `unverified`.
+ sig { returns(T.nilable(Error)) }
+ attr_reader :error
+ # Expiration date of the document.
+ sig { returns(T.nilable(ExpirationDate)) }
+ attr_reader :expiration_date
+ # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :files
+ # First name as it appears in the document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name
+ # Issued date of the document.
+ sig { returns(T.nilable(IssuedDate)) }
+ attr_reader :issued_date
+ # Issuing country of the document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuing_country
+ # Last name as it appears in the document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name
+ # Document ID number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :number
+ # Status of this `document` check.
+ sig { returns(String) }
+ attr_reader :status
+ # Type of the document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Email < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ # Email to be verified.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Details on the verification error. Present when status is `unverified`.
+ sig { returns(T.nilable(Error)) }
+ attr_reader :error
+ # Status of this `email` check.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class IdNumber < Stripe::StripeObject
+ class Dob < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ # Date of birth.
+ sig { returns(T.nilable(Dob)) }
+ attr_reader :dob
+ # Details on the verification error. Present when status is `unverified`.
+ sig { returns(T.nilable(Error)) }
+ attr_reader :error
+ # First name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name
+ # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id_number
+ # Type of ID number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id_number_type
+ # Last name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name
+ # Status of this `id_number` check.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class Options < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ sig { returns(T::Array[String]) }
+ attr_reader :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ sig { returns(T::Boolean) }
+ attr_reader :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ sig { returns(T::Boolean) }
+ attr_reader :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ sig { returns(T::Boolean) }
+ attr_reader :require_matching_selfie
+ end
+ class IdNumber < Stripe::StripeObject; end
+ # Attribute for field document
+ sig { returns(Document) }
+ attr_reader :document
+ # Attribute for field id_number
+ sig { returns(IdNumber) }
+ attr_reader :id_number
+ end
+ class Phone < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ # Details on the verification error. Present when status is `unverified`.
+ sig { returns(T.nilable(Error)) }
+ attr_reader :error
+ # Phone to be verified.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # Status of this `phone` check.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class Selfie < Stripe::StripeObject
+ class Error < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :code
+ # A human-readable message giving the reason for the failure. These messages can be shown to your users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.
+ sig { returns(T.nilable(String)) }
+ attr_reader :document
+ # Details on the verification error. Present when status is `unverified`.
+ sig { returns(T.nilable(Error)) }
+ attr_reader :error
+ # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.
+ sig { returns(T.nilable(String)) }
+ attr_reader :selfie
+ # Status of this `selfie` check.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_reference_id
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Result from a document check
+ sig { returns(Document) }
+ attr_reader :document
+ # Result from a email check
+ sig { returns(Email) }
+ attr_reader :email
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Result from an id_number check
+ sig { returns(IdNumber) }
+ attr_reader :id_number
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field options
+ sig { returns(Options) }
+ attr_reader :options
+ # Result from a phone check
+ sig { returns(Phone) }
+ attr_reader :phone
+ # Result from a selfie check
+ sig { returns(Selfie) }
+ attr_reader :selfie
+ # Type of report.
+ sig { returns(String) }
+ attr_reader :type
+ # The configuration token of a verification flow from the dashboard.
+ sig { returns(String) }
+ attr_reader :verification_flow
+ # ID of the VerificationSession that created this report.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verification_session
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Only return VerificationReports that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Identity::VerificationReport::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return VerificationReports of this type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_session
+ sig {
+ params(client_reference_id: T.nilable(String), created: T.nilable(T.any(::Stripe::Identity::VerificationReport::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String), verification_session: T.nilable(String)).void
+ }
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ verification_session: nil
+ ); end
+ end
+ # List all verification reports.
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationReport::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi
new file mode 100644
index 00000000..7ab1f73a
--- /dev/null
+++ b/rbi/stripe/resources/identity/verification_session.rbi
@@ -0,0 +1,517 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Identity
+ # A VerificationSession guides you through the process of collecting and verifying the identities
+ # of your users. It contains details about the type of verification, such as what [verification
+ # check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for
+ # each verification in your system.
+ #
+ # A VerificationSession transitions through [multiple
+ # statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through
+ # the verification flow. The VerificationSession contains the user's verified data after
+ # verification checks are complete.
+ #
+ # Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
+ class VerificationSession < APIResource
+ class LastError < Stripe::StripeObject
+ # A short machine-readable string giving the reason for the verification or user-session failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :code
+ # A message that explains the reason for verification or user-session failure.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ class Options < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ sig { returns(T::Array[String]) }
+ attr_reader :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ sig { returns(T::Boolean) }
+ attr_reader :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ sig { returns(T::Boolean) }
+ attr_reader :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ sig { returns(T::Boolean) }
+ attr_reader :require_matching_selfie
+ end
+ class Email < Stripe::StripeObject
+ # Request one time password verification of `provided_details.email`.
+ sig { returns(T::Boolean) }
+ attr_reader :require_verification
+ end
+ class IdNumber < Stripe::StripeObject; end
+ class Phone < Stripe::StripeObject
+ # Request one time password verification of `provided_details.phone`.
+ sig { returns(T::Boolean) }
+ attr_reader :require_verification
+ end
+ # Attribute for field document
+ sig { returns(Document) }
+ attr_reader :document
+ # Attribute for field email
+ sig { returns(Email) }
+ attr_reader :email
+ # Attribute for field id_number
+ sig { returns(IdNumber) }
+ attr_reader :id_number
+ # Attribute for field phone
+ sig { returns(Phone) }
+ attr_reader :phone
+ end
+ class ProvidedDetails < Stripe::StripeObject
+ # Email of user being verified
+ sig { returns(String) }
+ attr_reader :email
+ # Phone number of user being verified
+ sig { returns(String) }
+ attr_reader :phone
+ end
+ class Redaction < Stripe::StripeObject
+ # Indicates whether this object and its related objects have been redacted or not.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class VerifiedOutputs < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class Dob < Stripe::StripeObject
+ # Numerical day between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # Numerical month between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ # The user's verified address.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # The user’s verified date of birth.
+ sig { returns(T.nilable(Dob)) }
+ attr_reader :dob
+ # The user's verified email address
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # The user's verified first name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name
+ # The user's verified id number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id_number
+ # The user's verified id number type.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id_number_type
+ # The user's verified last name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name
+ # The user's verified phone number
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_reference_id
+ # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_secret
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # If present, this property tells you the last error encountered when processing the verification.
+ sig { returns(T.nilable(LastError)) }
+ attr_reader :last_error
+ # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)
+ sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) }
+ attr_reader :last_verification_report
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # A set of options for the session’s verification checks.
+ sig { returns(T.nilable(Options)) }
+ attr_reader :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ sig { returns(T.nilable(ProvidedDetails)) }
+ attr_reader :provided_details
+ # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
+ sig { returns(T.nilable(Redaction)) }
+ attr_reader :redaction
+ # Customer ID
+ sig { returns(T.nilable(String)) }
+ attr_reader :related_customer
+ # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
+ sig { returns(String) }
+ attr_reader :status
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ sig { returns(String) }
+ attr_reader :type
+ # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ # The configuration token of a verification flow from the dashboard.
+ sig { returns(String) }
+ attr_reader :verification_flow
+ # The user’s verified data.
+ sig { returns(T.nilable(VerifiedOutputs)) }
+ attr_reader :verified_outputs
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Only return VerificationSessions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Identity::VerificationSession::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Attribute for param field related_customer
+ sig { returns(T.nilable(String)) }
+ attr_accessor :related_customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(client_reference_id: T.nilable(String), created: T.nilable(T.any(::Stripe::Identity::VerificationSession::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), related_customer: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ related_customer: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_matching_selfie
+ sig {
+ params(allowed_types: T.nilable(T::Array[String]), require_id_number: T.nilable(T::Boolean), require_live_capture: T.nilable(T::Boolean), require_matching_selfie: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ ); end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSession::CreateParams::Options::Document))))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSession::CreateParams::Options::Document)))).void
+ }
+ def initialize(document: nil); end
+ end
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Phone number of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig { params(email: T.nilable(String), phone: T.nilable(String)).void }
+ def initialize(email: nil, phone: nil); end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ sig { returns(T.nilable(::Stripe::Identity::VerificationSession::CreateParams::Options)) }
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ sig {
+ returns(T.nilable(::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails))
+ }
+ attr_accessor :provided_details
+ # Customer ID
+ sig { returns(T.nilable(String)) }
+ attr_accessor :related_customer
+ # The URL that the user will be redirected to upon completing the verification flow.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_flow
+ sig {
+ params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails), related_customer: T.nilable(String), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void
+ }
+ def initialize(
+ client_reference_id: nil,
+ expand: nil,
+ metadata: nil,
+ options: nil,
+ provided_details: nil,
+ related_customer: nil,
+ return_url: nil,
+ type: nil,
+ verification_flow: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_matching_selfie
+ sig {
+ params(allowed_types: T.nilable(T::Array[String]), require_id_number: T.nilable(T::Boolean), require_live_capture: T.nilable(T::Boolean), require_matching_selfie: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ ); end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSession::UpdateParams::Options::Document))))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSession::UpdateParams::Options::Document)))).void
+ }
+ def initialize(document: nil); end
+ end
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Phone number of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig { params(email: T.nilable(String), phone: T.nilable(String)).void }
+ def initialize(email: nil, phone: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ sig { returns(T.nilable(::Stripe::Identity::VerificationSession::UpdateParams::Options)) }
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ sig {
+ returns(T.nilable(::Stripe::Identity::VerificationSession::UpdateParams::ProvidedDetails))
+ }
+ attr_accessor :provided_details
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSession::UpdateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSession::UpdateParams::ProvidedDetails), type: T.nilable(String)).void
+ }
+ def initialize(
+ expand: nil,
+ metadata: nil,
+ options: nil,
+ provided_details: nil,
+ type: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RedactParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
+ #
+ # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationSession::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
+ #
+ # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSession::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def self.cancel(session, params = {}, opts = {}); end
+
+ # Creates a VerificationSession object.
+ #
+ # After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.
+ #
+ # If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.
+ #
+ # Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationSession::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of VerificationSessions
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationSession::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Redact a VerificationSession to remove all collected information from Stripe. This will redact
+ # the VerificationSession and all objects related to it, including VerificationReports, Events,
+ # request logs, etc.
+ #
+ # A VerificationSession object can be redacted when it is in requires_input or verified
+ # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
+ # state will automatically cancel it.
+ #
+ # The redaction process may take up to four days. When the redaction process is in progress, the
+ # VerificationSession's redaction.status field will be set to processing; when the process is
+ # finished, it will change to redacted and an identity.verification_session.redacted event
+ # will be emitted.
+ #
+ # Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
+ # fields that contain personal data will be replaced by the string [redacted] or a similar
+ # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
+ # used for any purpose.
+ #
+ # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationSession::RedactParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def redact(params = {}, opts = {}); end
+
+ # Redact a VerificationSession to remove all collected information from Stripe. This will redact
+ # the VerificationSession and all objects related to it, including VerificationReports, Events,
+ # request logs, etc.
+ #
+ # A VerificationSession object can be redacted when it is in requires_input or verified
+ # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
+ # state will automatically cancel it.
+ #
+ # The redaction process may take up to four days. When the redaction process is in progress, the
+ # VerificationSession's redaction.status field will be set to processing; when the process is
+ # finished, it will change to redacted and an identity.verification_session.redacted event
+ # will be emitted.
+ #
+ # Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
+ # fields that contain personal data will be replaced by the string [redacted] or a similar
+ # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
+ # used for any purpose.
+ #
+ # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSession::RedactParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def self.redact(session, params = {}, opts = {}); end
+
+ # Updates a VerificationSession object.
+ #
+ # When the session status is requires_input, you can use this method to update the
+ # verification check and options.
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSession::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def self.update(session, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi
new file mode 100644
index 00000000..0310e347
--- /dev/null
+++ b/rbi/stripe/resources/invoice.rbi
@@ -0,0 +1,3735 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Invoices are statements of amounts owed by a customer, and are either
+ # generated one-off, or generated periodically from a subscription.
+ #
+ # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
+ # that may be caused by subscription upgrades/downgrades (if necessary).
+ #
+ # If your invoice is configured to be billed through automatic charges,
+ # Stripe automatically finalizes your invoice and attempts payment. Note
+ # that finalizing the invoice,
+ # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
+ # not happen immediately as the invoice is created. Stripe waits
+ # until one hour after the last webhook was successfully sent (or the last
+ # webhook timed out after failing). If you (and the platforms you may have
+ # connected to) have no webhooks configured, Stripe waits one hour after
+ # creation to finalize the invoice.
+ #
+ # If your invoice is configured to be billed by sending an email, then based on your
+ # [email settings](https://dashboard.stripe.com/account/billing/automatic),
+ # Stripe will email the invoice to your customer and await payment. These
+ # emails can contain a link to a hosted page to pay the invoice.
+ #
+ # Stripe applies any customer credit on the account before determining the
+ # amount due for the invoice (i.e., the amount that will be actually
+ # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
+ # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
+ # invoice is automatically marked paid, and we add the amount due to the
+ # customer's credit balance which is applied to the next invoice.
+ #
+ # More details on the customer's credit balance are
+ # [here](https://stripe.com/docs/billing/customer/balance).
+ #
+ # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
+ class Invoice < APIResource
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ # The status of the most recent automated tax calculation for this invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ end
+ class ConfirmationSecret < Stripe::StripeObject
+ # The client_secret of the payment that Stripe creates for the invoice after finalization.
+ sig { returns(String) }
+ attr_reader :client_secret
+ # The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ sig { returns(String) }
+ attr_reader :name
+ # The value of the custom field.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ class CustomerAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class CustomerShipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ end
+ class CustomerTaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ sig { returns(String) }
+ attr_reader :type
+ # The value of the tax ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :value
+ end
+ class FromInvoice < Stripe::StripeObject
+ # The relation between this invoice and the cloned invoice
+ sig { returns(String) }
+ attr_reader :action
+ # The invoice that was cloned.
+ sig { returns(T.any(String, Stripe::Invoice)) }
+ attr_reader :invoice
+ end
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class LastFinalizationError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ sig { returns(String) }
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ sig { returns(String) }
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ sig { returns(String) }
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ sig { returns(String) }
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ sig { returns(String) }
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ sig { returns(Stripe::PaymentIntent) }
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ sig { returns(Stripe::PaymentMethod) }
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ sig { returns(String) }
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ sig { returns(String) }
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ sig { returns(Stripe::SetupIntent) }
+ attr_reader :setup_intent
+ # Attribute for field source
+ sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) }
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Parent < Stripe::StripeObject
+ class QuoteDetails < Stripe::StripeObject
+ # Attribute for field quote
+ sig { returns(String) }
+ attr_reader :quote
+ end
+ class SubscriptionDetails < Stripe::StripeObject
+ # Attribute for field metadata
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Attribute for field subscription
+ sig { returns(String) }
+ attr_reader :subscription
+ # Attribute for field subscription_proration_date
+ sig { returns(Integer) }
+ attr_reader :subscription_proration_date
+ end
+ # Attribute for field quote_details
+ sig { returns(T.nilable(QuoteDetails)) }
+ attr_reader :quote_details
+ # Attribute for field subscription_details
+ sig { returns(T.nilable(SubscriptionDetails)) }
+ attr_reader :subscription_details
+ # Attribute for field type
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class PaymentSettings < Stripe::StripeObject
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_type
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ class Bancontact < Stripe::StripeObject
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(String) }
+ attr_reader :preferred_language
+ end
+ class Card < Stripe::StripeObject
+ class Installments < Stripe::StripeObject
+ # Whether Installments are enabled for this Invoice.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :enabled
+ end
+ # Attribute for field installments
+ sig { returns(Installments) }
+ attr_reader :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_reader :request_three_d_secure
+ end
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ sig { returns(EuBankTransfer) }
+ attr_reader :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ sig { returns(BankTransfer) }
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding_type
+ end
+ class Konbini < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject; end
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ sig { returns(T::Array[String]) }
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ sig { returns(Filters) }
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ sig { returns(T::Array[String]) }
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :prefetch
+ end
+ # Attribute for field financial_connections
+ sig { returns(FinancialConnections) }
+ attr_reader :financial_connections
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(AcssDebit)) }
+ attr_reader :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(Bancontact)) }
+ attr_reader :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(Card)) }
+ attr_reader :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(CustomerBalance)) }
+ attr_reader :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(Konbini)) }
+ attr_reader :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(SepaDebit)) }
+ attr_reader :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(UsBankAccount)) }
+ attr_reader :us_bank_account
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ sig { returns(T.nilable(PaymentMethodOptions)) }
+ attr_reader :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :payment_method_types
+ end
+ class Rendering < Stripe::StripeObject
+ class Pdf < Stripe::StripeObject
+ # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
+ sig { returns(T.nilable(String)) }
+ attr_reader :page_size
+ end
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ sig { returns(T.nilable(String)) }
+ attr_reader :amount_tax_display
+ # Invoice pdf rendering options
+ sig { returns(T.nilable(Pdf)) }
+ attr_reader :pdf
+ # ID of the rendering template that the invoice is formatted by.
+ sig { returns(T.nilable(String)) }
+ attr_reader :template
+ # Version of the rendering template that the invoice is using.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :template_version
+ end
+ class ShippingCost < Stripe::StripeObject
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # Total shipping cost before any taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Total shipping cost after taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # The ID of the ShippingRate for this invoice.
+ sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) }
+ attr_reader :shipping_rate
+ # The taxes applied to the shipping rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ class ShippingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # The time that the invoice draft was finalized.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :finalized_at
+ # The time that the invoice was marked uncollectible.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :marked_uncollectible_at
+ # The time that the invoice was paid.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :paid_at
+ # The time that the invoice was voided.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :voided_at
+ end
+ class ThresholdReason < Stripe::StripeObject
+ class ItemReason < Stripe::StripeObject
+ # The IDs of the line items that triggered the threshold invoice.
+ sig { returns(T::Array[String]) }
+ attr_reader :line_item_ids
+ # The quantity threshold boundary that applied to the given line item.
+ sig { returns(Integer) }
+ attr_reader :usage_gte
+ end
+ # The total invoice amount threshold boundary if it triggered the threshold invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_gte
+ # Indicates which line items triggered a threshold invoice.
+ sig { returns(T::Array[ItemReason]) }
+ attr_reader :item_reasons
+ end
+ class TotalDiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ end
+ class TotalPretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) }
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class TotalTax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ sig { returns(String) }
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ # The type of tax information.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The country of the business associated with this invoice, most often the business creating the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_country
+ # The public name of the business associated with this invoice, most often the business creating the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_name
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :account_tax_ids
+ # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
+ sig { returns(Integer) }
+ attr_reader :amount_due
+ # Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
+ sig { returns(Integer) }
+ attr_reader :amount_overpaid
+ # The amount, in cents (or local equivalent), that was paid.
+ sig { returns(Integer) }
+ attr_reader :amount_paid
+ # The difference between amount_due and amount_paid, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount_remaining
+ # This is the sum of all the shipping amounts.
+ sig { returns(Integer) }
+ attr_reader :amount_shipping
+ # ID of the Connect Application that created the invoice.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
+ sig { returns(Integer) }
+ attr_reader :attempt_count
+ # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
+ sig { returns(T::Boolean) }
+ attr_reader :attempted
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ sig { returns(T::Boolean) }
+ attr_reader :auto_advance
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :automatically_finalizes_at
+ # Indicates the reason why the invoice was created.
+ #
+ # * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
+ # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
+ # * `subscription_create`: A new subscription was created.
+ # * `subscription_cycle`: A subscription advanced into a new period.
+ # * `subscription_threshold`: A subscription reached a billing threshold.
+ # * `subscription_update`: A subscription was updated.
+ # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_reason
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
+ sig { returns(String) }
+ attr_reader :collection_method
+ # The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
+ sig { returns(T.nilable(ConfirmationSecret)) }
+ attr_reader :confirmation_secret
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Custom fields displayed on the invoice.
+ sig { returns(T.nilable(T::Array[CustomField])) }
+ attr_reader :custom_fields
+ # The ID of the customer who will be billed.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(CustomerAddress)) }
+ attr_reader :customer_address
+ # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_email
+ # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_name
+ # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_phone
+ # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(CustomerShipping)) }
+ attr_reader :customer_shipping
+ # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer_tax_exempt
+ # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
+ sig { returns(T.nilable(T::Array[CustomerTaxId])) }
+ attr_reader :customer_tax_ids
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ sig {
+ returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
+ }
+ attr_reader :default_source
+ # The tax rates applied to this invoice, if any.
+ sig { returns(T::Array[Stripe::TaxRate]) }
+ attr_reader :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
+ sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
+ attr_reader :discounts
+ # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :effective_at
+ # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :ending_balance
+ # Footer displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer
+ # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ sig { returns(T.nilable(FromInvoice)) }
+ attr_reader :from_invoice
+ # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_invoice_url
+ # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.
+ sig { returns(String) }
+ attr_reader :id
+ # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
+ sig { returns(T.nilable(String)) }
+ attr_reader :invoice_pdf
+ # Attribute for field issuer
+ sig { returns(Issuer) }
+ attr_reader :issuer
+ # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
+ sig { returns(T.nilable(LastFinalizationError)) }
+ attr_reader :last_finalization_error
+ # The ID of the most recent non-draft revision of this invoice
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
+ attr_reader :latest_revision
+ # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :lines
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :next_payment_attempt
+ # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
+ sig { returns(T.nilable(String)) }
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # Attribute for field parent
+ sig { returns(T.nilable(Parent)) }
+ attr_reader :parent
+ # Attribute for field payment_settings
+ sig { returns(PaymentSettings) }
+ attr_reader :payment_settings
+ # Payments for this invoice
+ sig { returns(Stripe::ListObject) }
+ attr_reader :payments
+ # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
+ sig { returns(Integer) }
+ attr_reader :period_end
+ # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
+ sig { returns(Integer) }
+ attr_reader :period_start
+ # Total amount of all post-payment credit notes issued for this invoice.
+ sig { returns(Integer) }
+ attr_reader :post_payment_credit_notes_amount
+ # Total amount of all pre-payment credit notes issued for this invoice.
+ sig { returns(Integer) }
+ attr_reader :pre_payment_credit_notes_amount
+ # This is the transaction number that appears on email receipts sent for this invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :receipt_number
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ sig { returns(T.nilable(Rendering)) }
+ attr_reader :rendering
+ # The details of the cost of shipping, including the ShippingRate applied on the invoice.
+ sig { returns(T.nilable(ShippingCost)) }
+ attr_reader :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ sig { returns(T.nilable(ShippingDetails)) }
+ attr_reader :shipping_details
+ # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
+ sig { returns(Integer) }
+ attr_reader :starting_balance
+ # Extra information about an invoice for the customer's credit card statement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # Attribute for field subscription
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
+ attr_reader :subscription
+ # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
+ sig { returns(Integer) }
+ attr_reader :subtotal
+ # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :subtotal_excluding_tax
+ # ID of the test clock this invoice belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # Attribute for field threshold_reason
+ sig { returns(ThresholdReason) }
+ attr_reader :threshold_reason
+ # Total after discounts and taxes.
+ sig { returns(Integer) }
+ attr_reader :total
+ # The aggregate amounts calculated per discount across all line items.
+ sig { returns(T.nilable(T::Array[TotalDiscountAmount])) }
+ attr_reader :total_discount_amounts
+ # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :total_excluding_tax
+ # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
+ sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) }
+ attr_reader :total_pretax_credit_amounts
+ # The aggregate tax information of all line items.
+ sig { returns(T.nilable(T::Array[TotalTax])) }
+ attr_reader :total_taxes
+ # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :webhooks_delivered_at
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(installments: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(installments: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ sig {
+ params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ default_mandate: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ ); end
+ end
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page_size
+ sig { params(page_size: T.nilable(String)).void }
+ def initialize(page_size: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Rendering::Pdf)) }
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :template_version
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::Invoice::UpdateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData)) }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address
+ sig { returns(::Stripe::Invoice::UpdateParams::ShippingDetails::Address) }
+ attr_accessor :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension)
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::Invoice::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Issuer)) }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Rendering)) }
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingCost))))
+ }
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingDetails))))
+ }
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::CustomField]))), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(T.nilable(T.any(String, Integer))), expand: T.nilable(T::Array[String]), footer: T.nilable(String), issuer: T.nilable(::Stripe::Invoice::UpdateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(T.nilable(String)), on_behalf_of: T.nilable(T.nilable(String)), payment_settings: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings), rendering: T.nilable(::Stripe::Invoice::UpdateParams::Rendering), shipping_cost: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingCost))), shipping_details: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingDetails))), statement_descriptor: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::TransferData)))).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ custom_fields: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class DueDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # Only return invoices that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Invoice::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return invoices for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Attribute for param field due_date
+ sig { returns(T.nilable(T.any(::Stripe::Invoice::ListParams::DueDate, Integer))) }
+ attr_accessor :due_date
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return invoices for the subscription specified by this subscription ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ sig {
+ params(collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::Invoice::ListParams::Created, Integer)), customer: T.nilable(String), due_date: T.nilable(T.any(::Stripe::Invoice::ListParams::DueDate, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), subscription: T.nilable(String)).void
+ }
+ def initialize(
+ collection_method: nil,
+ created: nil,
+ customer: nil,
+ due_date: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class FromInvoice < Stripe::RequestParams
+ # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
+ sig { returns(String) }
+ attr_accessor :action
+ # The `id` of the invoice that will be cloned.
+ sig { returns(String) }
+ attr_accessor :invoice
+ sig { params(action: String, invoice: String).void }
+ def initialize(action: nil, invoice: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(installments: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(installments: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ sig {
+ params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ default_mandate: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ ); end
+ end
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page_size
+ sig { params(page_size: T.nilable(String)).void }
+ def initialize(page_size: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Rendering::Pdf)) }
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :template_version
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::Invoice::CreateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData)) }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address
+ sig { returns(::Stripe::Invoice::CreateParams::ShippingDetails::Address) }
+ attr_accessor :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension)
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::Invoice::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # The currency to create this invoice in. Defaults to that of `customer` if not specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # A list of up to 4 custom fields to be displayed on the invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # The ID of the customer who will be billed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::FromInvoice)) }
+ attr_accessor :from_invoice
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Issuer)) }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :pending_invoice_items_behavior
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Rendering)) }
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingDetails)) }
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
+ sig { returns(T.nilable(::Stripe::Invoice::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), currency: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::CustomField]))), customer: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(Integer), expand: T.nilable(T::Array[String]), footer: T.nilable(String), from_invoice: T.nilable(::Stripe::Invoice::CreateParams::FromInvoice), issuer: T.nilable(::Stripe::Invoice::CreateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings), pending_invoice_items_behavior: T.nilable(String), rendering: T.nilable(::Stripe::Invoice::CreateParams::Rendering), shipping_cost: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::Invoice::CreateParams::ShippingDetails), statement_descriptor: T.nilable(String), subscription: T.nilable(String), transfer_data: T.nilable(::Stripe::Invoice::CreateParams::TransferData)).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ currency: nil,
+ custom_fields: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ from_invoice: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ pending_invoice_items_behavior: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ subscription: nil,
+ transfer_data: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class AddLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ sig { returns(::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData) }
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig {
+ params(amount: Integer, tax_rate_data: ::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
+ }
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount]))))
+ }
+ attr_accessor :discounts
+ # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_item
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount]))), invoice_item: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::Invoice::AddLinesParams::Line::Period), price_data: T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::Invoice::AddLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoice_item: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :invoice_metadata
+ # The line items to add.
+ sig { returns(T::Array[::Stripe::Invoice::AddLinesParams::Line]) }
+ attr_accessor :lines
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::Invoice::AddLinesParams::Line]).void
+ }
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
+ end
+ class FinalizeInvoiceParams < Stripe::RequestParams
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :auto_advance
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(auto_advance: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
+ def initialize(auto_advance: nil, expand: nil); end
+ end
+ class MarkUncollectibleParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class PayParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
+ #
+ # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :forgive
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :mandate
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :paid_out_of_band
+ # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ sig {
+ params(expand: T.nilable(T::Array[String]), forgive: T.nilable(T::Boolean), mandate: T.nilable(T.nilable(String)), off_session: T.nilable(T::Boolean), paid_out_of_band: T.nilable(T::Boolean), payment_method: T.nilable(String), source: T.nilable(String)).void
+ }
+ def initialize(
+ expand: nil,
+ forgive: nil,
+ mandate: nil,
+ off_session: nil,
+ paid_out_of_band: nil,
+ payment_method: nil,
+ source: nil
+ ); end
+ end
+ class RemoveLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
+ sig { returns(String) }
+ attr_accessor :behavior
+ # ID of an existing line item to remove from this invoice.
+ sig { returns(String) }
+ attr_accessor :id
+ sig { params(behavior: String, id: String).void }
+ def initialize(behavior: nil, id: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :invoice_metadata
+ # The line items to remove.
+ sig { returns(T::Array[::Stripe::Invoice::RemoveLinesParams::Line]) }
+ attr_accessor :lines
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::Invoice::RemoveLinesParams::Line]).void
+ }
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
+ end
+ class SendInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData) }
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig {
+ params(amount: Integer, tax_rate_data: ::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
+ }
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount]))))
+ }
+ attr_accessor :discounts
+ # ID of an existing line item on the invoice.
+ sig { returns(String) }
+ attr_accessor :id
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount]))), id: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Period), price_data: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :invoice_metadata
+ # The line items to update.
+ sig { returns(T::Array[::Stripe::Invoice::UpdateLinesParams::Line]) }
+ attr_accessor :lines
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::Invoice::UpdateLinesParams::Line]).void
+ }
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
+ end
+ class VoidInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreatePreviewParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Customer shipping address.
+ sig {
+ returns(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address)
+ }
+ attr_accessor :address
+ # Customer name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Customer phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :ip_address
+ sig { params(ip_address: T.nilable(T.nilable(String))).void }
+ def initialize(ip_address: nil); end
+ end
+ class TaxId < Stripe::RequestParams
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(type: String, value: String).void }
+ def initialize(type: nil, value: nil); end
+ end
+ # The customer's address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address))))
+ }
+ attr_accessor :address
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping))))
+ }
+ attr_accessor :shipping
+ # Tax details about the customer.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax)) }
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId]))
+ }
+ attr_accessor :tax_ids
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping))), tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), tax_ids: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId])).void
+ }
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons to redeem into discounts for the invoice item in the preview.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount]))))
+ }
+ attr_accessor :discounts
+ # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoiceitem
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period)) }
+ attr_accessor :period
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData)) }
+ attr_accessor :price_data
+ # Non-negative integer. The quantity of units for the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount]))), invoiceitem: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoiceitem: nil,
+ metadata: nil,
+ period: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class ScheduleDetails < Stripe::RequestParams
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ sig {
+ returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item])
+ }
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData))
+ }
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :trial_end
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ ); end
+ end
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :end_behavior
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]))
+ }
+ attr_accessor :phases
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(end_behavior: nil, phases: nil, proration_behavior: nil); end
+ end
+ class SubscriptionDetails < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Subscription item to update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) }
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_at_period_end
+ # This simulates the subscription being canceled or expired immediately.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_now
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # A list of up to 20 subscription items, each with an attached price.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]))
+ }
+ attr_accessor :items
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :resume_at
+ # Date a subscription is intended to start (can be future or past).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :start_date
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :trial_end
+ sig {
+ params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
+ }
+ def initialize(
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancel_now: nil,
+ default_tax_rates: nil,
+ items: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ resume_at: nil,
+ start_date: nil,
+ trial_end: nil
+ ); end
+ end
+ # Settings for automatic tax lookup for this invoice preview.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails)) }
+ attr_accessor :customer_details
+ # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
+ sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem])) }
+ attr_accessor :invoice_items
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::Issuer)) }
+ attr_accessor :issuer
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preview_mode
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :schedule
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails)) }
+ attr_accessor :schedule_details
+ # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
+ sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails)) }
+ attr_accessor :subscription_details
+ sig {
+ params(automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax), currency: T.nilable(String), customer: T.nilable(String), customer_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem]), issuer: T.nilable(::Stripe::Invoice::CreatePreviewParams::Issuer), on_behalf_of: T.nilable(T.nilable(String)), preview_mode: T.nilable(String), schedule: T.nilable(String), schedule_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails), subscription: T.nilable(String), subscription_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails)).void
+ }
+ def initialize(
+ automatic_tax: nil,
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_items: nil,
+ issuer: nil,
+ on_behalf_of: nil,
+ preview_mode: nil,
+ schedule: nil,
+ schedule_details: nil,
+ subscription: nil,
+ subscription_details: nil
+ ); end
+ end
+ # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def add_lines(params = {}, opts = {}); end
+
+ # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.add_lines(invoice, params = {}, opts = {}); end
+
+ # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
+ sig {
+ params(params: T.any(::Stripe::Invoice::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
+ #
+ # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
+ #
+ # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
+ #
+ # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
+ sig {
+ params(params: T.any(::Stripe::Invoice::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.create_preview(params = {}, opts = {}); end
+
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.delete(invoice, params = {}, opts = {}); end
+
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
+ sig {
+ params(params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
+ sig {
+ params(params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def finalize_invoice(params = {}, opts = {}); end
+
+ # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.finalize_invoice(invoice, params = {}, opts = {}); end
+
+ # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
+ sig {
+ params(params: T.any(::Stripe::Invoice::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
+ sig {
+ params(params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def mark_uncollectible(params = {}, opts = {}); end
+
+ # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.mark_uncollectible(invoice, params = {}, opts = {}); end
+
+ # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
+ sig {
+ params(params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def pay(params = {}, opts = {}); end
+
+ # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.pay(invoice, params = {}, opts = {}); end
+
+ # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def remove_lines(params = {}, opts = {}); end
+
+ # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.remove_lines(invoice, params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Invoice::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Invoice::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
+ #
+ # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
+ sig {
+ params(params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def send_invoice(params = {}, opts = {}); end
+
+ # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
+ #
+ # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.send_invoice(invoice, params = {}, opts = {}); end
+
+ # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
+ # monetary values, as well as collection_method, become uneditable.
+ #
+ # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
+ # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
+ # auto_advance=false.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.update(invoice, params = {}, opts = {}); end
+
+ # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def update_lines(params = {}, opts = {}); end
+
+ # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.update_lines(invoice, params = {}, opts = {}); end
+
+ # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
+ #
+ # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
+ sig {
+ params(params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def void_invoice(params = {}, opts = {}); end
+
+ # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
+ #
+ # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def self.void_invoice(invoice, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi
new file mode 100644
index 00000000..1cf8939a
--- /dev/null
+++ b/rbi/stripe/resources/invoice_item.rbi
@@ -0,0 +1,475 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an
+ # invoice by creating or updating it with an `invoice` field, at which point it will be included as
+ # [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within
+ # [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).
+ #
+ # Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined
+ # with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge
+ # or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges
+ # (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
+ #
+ # Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).
+ class InvoiceItem < APIResource
+ class Parent < Stripe::StripeObject
+ class SubscriptionDetails < Stripe::StripeObject
+ # Attribute for field subscription
+ sig { returns(String) }
+ attr_reader :subscription
+ # Attribute for field subscription_item
+ sig { returns(String) }
+ attr_reader :subscription_item
+ end
+ # Attribute for field subscription_details
+ sig { returns(T.nilable(SubscriptionDetails)) }
+ attr_reader :subscription_details
+ # Attribute for field type
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Period < Stripe::StripeObject
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_reader :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_reader :start
+ end
+ class Pricing < Stripe::StripeObject
+ class PriceDetails < Stripe::StripeObject
+ # The ID of the price this item is associated with.
+ sig { returns(String) }
+ attr_reader :price
+ # The ID of the product this item is associated with.
+ sig { returns(String) }
+ attr_reader :product
+ end
+ # Attribute for field price_details
+ sig { returns(PriceDetails) }
+ attr_reader :price_details
+ # The type of the pricing details.
+ sig { returns(String) }
+ attr_reader :type
+ # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ end
+ # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The ID of the customer who will be billed when this invoice item is billed.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :date
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # If true, discounts will apply to this invoice item. Always false for prorations.
+ sig { returns(T::Boolean) }
+ attr_reader :discountable
+ # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) }
+ attr_reader :discounts
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The ID of the invoice this invoice item belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
+ attr_reader :invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field parent
+ sig { returns(T.nilable(Parent)) }
+ attr_reader :parent
+ # Attribute for field period
+ sig { returns(Period) }
+ attr_reader :period
+ # The pricing information of the invoice item.
+ sig { returns(T.nilable(Pricing)) }
+ attr_reader :pricing
+ # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
+ sig { returns(T::Boolean) }
+ attr_reader :proration
+ # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
+ attr_reader :tax_rates
+ # ID of the test clock this invoice item belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItem::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceItem::UpdateParams::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceItem::UpdateParams::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceItem::UpdateParams::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItem::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceItem::UpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceItem::UpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItem::UpdateParams::Pricing), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return invoice items that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::InvoiceItem::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :pending
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::InvoiceItem::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), limit: T.nilable(Integer), pending: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ pending: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The ID of the customer who will be billed when this invoice item is billed.
+ sig { returns(String) }
+ attr_accessor :customer
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItem::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceItem::CreateParams::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceItem::CreateParams::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceItem::CreateParams::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), customer: String, description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItem::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceItem::CreateParams::Period), price_data: T.nilable(::Stripe::InvoiceItem::CreateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItem::CreateParams::Pricing), quantity: T.nilable(Integer), subscription: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T::Array[String]), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ invoice: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
+ sig {
+ params(params: T.any(::Stripe::InvoiceItem::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.
+ sig {
+ params(invoiceitem: String, params: T.any(::Stripe::InvoiceItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def self.delete(invoiceitem, params = {}, opts = {}); end
+
+ # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.
+ sig {
+ params(params: T.any(::Stripe::InvoiceItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
+ sig {
+ params(params: T.any(::Stripe::InvoiceItem::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed.
+ sig {
+ params(invoiceitem: String, params: T.any(::Stripe::InvoiceItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def self.update(invoiceitem, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi
new file mode 100644
index 00000000..669357c6
--- /dev/null
+++ b/rbi/stripe/resources/invoice_line_item.rbi
@@ -0,0 +1,432 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice.
+ #
+ # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items).
+ class InvoiceLineItem < APIResource
+ class DiscountAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the discount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The discount that was applied to get this discount amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ end
+ class Parent < Stripe::StripeObject
+ class InvoiceItemDetails < Stripe::StripeObject
+ class ProrationDetails < Stripe::StripeObject
+ class CreditedItems < Stripe::StripeObject
+ # Invoice containing the credited invoice line items
+ sig { returns(String) }
+ attr_reader :invoice
+ # Credited invoice line items
+ sig { returns(T::Array[String]) }
+ attr_reader :invoice_line_items
+ end
+ # For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
+ sig { returns(T.nilable(CreditedItems)) }
+ attr_reader :credited_items
+ end
+ # Attribute for field invoice_item
+ sig { returns(String) }
+ attr_reader :invoice_item
+ # Whether this is a proration.
+ sig { returns(T::Boolean) }
+ attr_reader :proration
+ # Additional details for proration line items
+ sig { returns(T.nilable(ProrationDetails)) }
+ attr_reader :proration_details
+ # Attribute for field subscription
+ sig { returns(T.nilable(String)) }
+ attr_reader :subscription
+ end
+ class SubscriptionItemDetails < Stripe::StripeObject
+ class ProrationDetails < Stripe::StripeObject
+ class CreditedItems < Stripe::StripeObject
+ # Invoice containing the credited invoice line items
+ sig { returns(String) }
+ attr_reader :invoice
+ # Credited invoice line items
+ sig { returns(T::Array[String]) }
+ attr_reader :invoice_line_items
+ end
+ # For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
+ sig { returns(T.nilable(CreditedItems)) }
+ attr_reader :credited_items
+ end
+ # Attribute for field invoice_item
+ sig { returns(T.nilable(String)) }
+ attr_reader :invoice_item
+ # Whether this is a proration.
+ sig { returns(T::Boolean) }
+ attr_reader :proration
+ # Additional details for proration line items
+ sig { returns(T.nilable(ProrationDetails)) }
+ attr_reader :proration_details
+ # Attribute for field subscription
+ sig { returns(String) }
+ attr_reader :subscription
+ # Attribute for field subscription_item
+ sig { returns(String) }
+ attr_reader :subscription_item
+ end
+ # Attribute for field invoice_item_details
+ sig { returns(T.nilable(InvoiceItemDetails)) }
+ attr_reader :invoice_item_details
+ # Attribute for field subscription_item_details
+ sig { returns(T.nilable(SubscriptionItemDetails)) }
+ attr_reader :subscription_item_details
+ # Attribute for field type
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Period < Stripe::StripeObject
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_reader :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_reader :start
+ end
+ class PretaxCreditAmount < Stripe::StripeObject
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The credit balance transaction that was applied to get this pretax credit amount.
+ sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) }
+ attr_reader :credit_balance_transaction
+ # The discount that was applied to get this pretax credit amount.
+ sig { returns(T.any(String, Stripe::Discount)) }
+ attr_reader :discount
+ # Type of the pretax credit amount referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Pricing < Stripe::StripeObject
+ class PriceDetails < Stripe::StripeObject
+ # The ID of the price this item is associated with.
+ sig { returns(String) }
+ attr_reader :price
+ # The ID of the product this item is associated with.
+ sig { returns(String) }
+ attr_reader :product
+ end
+ # Attribute for field price_details
+ sig { returns(PriceDetails) }
+ attr_reader :price_details
+ # The type of the pricing details.
+ sig { returns(String) }
+ attr_reader :type
+ # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ end
+ class Tax < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ # Attribute for field tax_rate
+ sig { returns(String) }
+ attr_reader :tax_rate
+ end
+ # The amount of the tax, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Whether this tax is inclusive or exclusive.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ # The type of tax information.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The amount, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The amount of discount calculated per discount for this line item.
+ sig { returns(T.nilable(T::Array[DiscountAmount])) }
+ attr_reader :discount_amounts
+ # If true, discounts will apply to this line item. Always false for prorations.
+ sig { returns(T::Boolean) }
+ attr_reader :discountable
+ # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
+ sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
+ attr_reader :discounts
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The ID of the invoice that contains this line item.
+ sig { returns(T.nilable(String)) }
+ attr_reader :invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field parent
+ sig { returns(T.nilable(Parent)) }
+ attr_reader :parent
+ # Attribute for field period
+ sig { returns(Period) }
+ attr_reader :period
+ # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
+ sig { returns(T.nilable(T::Array[PretaxCreditAmount])) }
+ attr_reader :pretax_credit_amounts
+ # The pricing information of the line item.
+ sig { returns(T.nilable(Pricing)) }
+ attr_reader :pricing
+ # The quantity of the subscription, if the line item is a subscription or a proration.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :quantity
+ # Attribute for field subscription
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
+ attr_reader :subscription
+ # The tax information of the line item.
+ sig { returns(T.nilable(T::Array[Tax])) }
+ attr_reader :taxes
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData)) }
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ sig { returns(::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData) }
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig {
+ params(amount: Integer, tax_rate_data: ::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
+ }
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItem::UpdateParams::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItem::UpdateParams::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItem::UpdateParams::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceLineItem::UpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceLineItem::UpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceLineItem::UpdateParams::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
+ # so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
+ # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
+ # Updating an invoice's line item is only possible before the invoice is finalized.
+ sig {
+ params(invoice: String, line_item_id: String, params: T.any(::Stripe::InvoiceLineItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceLineItem)
+ }
+ def self.update(invoice, line_item_id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/invoice_payment.rbi b/rbi/stripe/resources/invoice_payment.rbi
new file mode 100644
index 00000000..0bb1b9bc
--- /dev/null
+++ b/rbi/stripe/resources/invoice_payment.rbi
@@ -0,0 +1,114 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # The invoice payment object
+ class InvoicePayment < APIResource
+ class Payment < Stripe::StripeObject
+ # ID of the successful charge for this payment when `type` is `charge`.
+ sig { returns(T.any(String, Stripe::Charge)) }
+ attr_reader :charge
+ # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ # Type of payment object associated with this invoice payment.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # The time that the payment was canceled.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # The time that the payment succeeded.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :paid_at
+ end
+ # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_paid
+ # Amount intended to be paid toward this invoice, in cents (or local equivalent)
+ sig { returns(Integer) }
+ attr_reader :amount_requested
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The invoice that was paid.
+ sig { returns(T.any(String, Stripe::Invoice)) }
+ attr_reader :invoice
+ # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.
+ sig { returns(T::Boolean) }
+ attr_reader :is_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field payment
+ sig { returns(Payment) }
+ attr_reader :payment
+ # The status of the payment, one of `open`, `paid`, or `canceled`.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ class ListParams < Stripe::RequestParams
+ class Payment < Stripe::RequestParams
+ # Attribute for param field payment_intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # Attribute for param field type
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(payment_intent: T.nilable(String), type: String).void }
+ def initialize(payment_intent: nil, type: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field invoice
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Attribute for param field payment
+ sig { returns(T.nilable(::Stripe::InvoicePayment::ListParams::Payment)) }
+ attr_accessor :payment
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Attribute for param field status
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), limit: T.nilable(Integer), payment: T.nilable(::Stripe::InvoicePayment::ListParams::Payment), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ payment: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ # When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
+ sig {
+ params(params: T.any(::Stripe::InvoicePayment::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/invoice_rendering_template.rbi b/rbi/stripe/resources/invoice_rendering_template.rbi
new file mode 100644
index 00000000..77b177e3
--- /dev/null
+++ b/rbi/stripe/resources/invoice_rendering_template.rbi
@@ -0,0 +1,104 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
+ # can be created from within the Dashboard, and they can be used over the API when creating invoices.
+ class InvoiceRenderingTemplate < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # A brief description of the template, hidden from customers
+ sig { returns(T.nilable(String)) }
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The status of the template, one of `active` or `archived`.
+ sig { returns(String) }
+ attr_reader :status
+ # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
+ sig { returns(Integer) }
+ attr_reader :version
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Attribute for param field status
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UnarchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
+ sig {
+ params(params: T.any(::Stripe::InvoiceRenderingTemplate::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def archive(params = {}, opts = {}); end
+
+ # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
+ sig {
+ params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplate::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def self.archive(template, params = {}, opts = {}); end
+
+ # List all templates, ordered by creation date, with the most recently created template appearing first.
+ sig {
+ params(params: T.any(::Stripe::InvoiceRenderingTemplate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Unarchive an invoice rendering template so it can be used on new Stripe objects again.
+ sig {
+ params(params: T.any(::Stripe::InvoiceRenderingTemplate::UnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def unarchive(params = {}, opts = {}); end
+
+ # Unarchive an invoice rendering template so it can be used on new Stripe objects again.
+ sig {
+ params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplate::UnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def self.unarchive(template, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi
new file mode 100644
index 00000000..801b5cd0
--- /dev/null
+++ b/rbi/stripe/resources/issuing/authorization.rbi
@@ -0,0 +1,1283 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
+ # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
+ # purchase to be completed successfully.
+ #
+ # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
+ class Authorization < APIResource
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :cashback_amount
+ end
+ class Fleet < Stripe::StripeObject
+ class CardholderPromptData < Stripe::StripeObject
+ # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :alphanumeric_id
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :vehicle_number
+ end
+ class ReportedBreakdown < Stripe::StripeObject
+ class Fuel < Stripe::StripeObject
+ # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :gross_amount_decimal
+ end
+ class NonFuel < Stripe::StripeObject
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :gross_amount_decimal
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_reader :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_reader :national_amount_decimal
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig { returns(T.nilable(Fuel)) }
+ attr_reader :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig { returns(T.nilable(NonFuel)) }
+ attr_reader :non_fuel
+ # Information about tax included in this transaction.
+ sig { returns(T.nilable(Tax)) }
+ attr_reader :tax
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig { returns(T.nilable(CardholderPromptData)) }
+ attr_reader :cardholder_prompt_data
+ # The type of purchase.
+ sig { returns(T.nilable(String)) }
+ attr_reader :purchase_type
+ # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig { returns(T.nilable(ReportedBreakdown)) }
+ attr_reader :reported_breakdown
+ # The type of fuel service.
+ sig { returns(T.nilable(String)) }
+ attr_reader :service_type
+ end
+ class FraudChallenge < Stripe::StripeObject
+ # The method by which the fraud challenge was delivered to the cardholder.
+ sig { returns(String) }
+ attr_reader :channel
+ # The status of the fraud challenge.
+ sig { returns(String) }
+ attr_reader :status
+ # If the challenge is not deliverable, the reason why.
+ sig { returns(T.nilable(String)) }
+ attr_reader :undeliverable_reason
+ end
+ class Fuel < Stripe::StripeObject
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_reader :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :quantity_decimal
+ # The type of fuel that was purchased.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ # The units for `quantity_decimal`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_cost_decimal
+ end
+ class MerchantData < Stripe::StripeObject
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(String) }
+ attr_reader :category
+ # The merchant category code for the seller’s business
+ sig { returns(String) }
+ attr_reader :category_code
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(String) }
+ attr_reader :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # The seller's tax identification number. Currently populated for French merchants only.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_id
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ class NetworkData < Stripe::StripeObject
+ # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :acquiring_institution_id
+ # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements.
+ sig { returns(T.nilable(String)) }
+ attr_reader :system_trace_audit_number
+ # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class PendingRequest < Stripe::StripeObject
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :cashback_amount
+ end
+ # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(AmountDetails)) }
+ attr_reader :amount_details
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ sig { returns(T::Boolean) }
+ attr_reader :is_amount_controllable
+ # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :merchant_amount
+ # The local currency the merchant is requesting to authorize.
+ sig { returns(String) }
+ attr_reader :merchant_currency
+ # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :network_risk_score
+ end
+ class RequestHistory < Stripe::StripeObject
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :cashback_amount
+ end
+ # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(AmountDetails)) }
+ attr_reader :amount_details
+ # Whether this request was approved.
+ sig { returns(T::Boolean) }
+ attr_reader :approved
+ # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :merchant_amount
+ # The currency that was collected by the merchant and presented to the cardholder for the authorization. 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).
+ sig { returns(String) }
+ attr_reader :merchant_currency
+ # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :network_risk_score
+ # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.
+ sig { returns(String) }
+ attr_reader :reason
+ # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason_message
+ # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :requested_at
+ end
+ class Treasury < Stripe::StripeObject
+ # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization
+ sig { returns(T::Array[String]) }
+ attr_reader :received_credits
+ # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization
+ sig { returns(T::Array[String]) }
+ attr_reader :received_debits
+ # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction
+ end
+ class VerificationData < Stripe::StripeObject
+ class AuthenticationExemption < Stripe::StripeObject
+ # The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ sig { returns(String) }
+ attr_reader :claimed_by
+ # The specific exemption claimed for this authorization.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class ThreeDSecure < Stripe::StripeObject
+ # The outcome of the 3D Secure authentication request.
+ sig { returns(String) }
+ attr_reader :result
+ end
+ # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.
+ sig { returns(String) }
+ attr_reader :address_line1_check
+ # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.
+ sig { returns(String) }
+ attr_reader :address_postal_code_check
+ # The exemption applied to this authorization.
+ sig { returns(T.nilable(AuthenticationExemption)) }
+ attr_reader :authentication_exemption
+ # Whether the cardholder provided a CVC and if it matched Stripe’s record.
+ sig { returns(String) }
+ attr_reader :cvc_check
+ # Whether the cardholder provided an expiry date and if it matched Stripe’s record.
+ sig { returns(String) }
+ attr_reader :expiry_check
+ # The postal code submitted as part of the authorization used for postal code verification.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # 3D Secure details.
+ sig { returns(T.nilable(ThreeDSecure)) }
+ attr_reader :three_d_secure
+ end
+ # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(AmountDetails)) }
+ attr_reader :amount_details
+ # Whether the authorization has been approved.
+ sig { returns(T::Boolean) }
+ attr_reader :approved
+ # How the card details were provided.
+ sig { returns(String) }
+ attr_reader :authorization_method
+ # List of balance transactions associated with this authorization.
+ sig { returns(T::Array[Stripe::BalanceTransaction]) }
+ attr_reader :balance_transactions
+ # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.
+ sig { returns(Stripe::Issuing::Card) }
+ attr_reader :card
+ # The cardholder to whom this authorization belongs.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) }
+ attr_reader :cardholder
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Fleet-specific information for authorizations using Fleet cards.
+ sig { returns(T.nilable(Fleet)) }
+ attr_reader :fleet
+ # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
+ sig { returns(T.nilable(T::Array[FraudChallenge])) }
+ attr_reader :fraud_challenges
+ # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
+ sig { returns(T.nilable(Fuel)) }
+ attr_reader :fuel
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different.
+ sig { returns(Integer) }
+ attr_reader :merchant_amount
+ # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. 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).
+ sig { returns(String) }
+ attr_reader :merchant_currency
+ # Attribute for field merchant_data
+ sig { returns(MerchantData) }
+ attr_reader :merchant_data
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Details about the authorization, such as identifiers, set by the card network.
+ sig { returns(T.nilable(NetworkData)) }
+ attr_reader :network_data
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
+ sig { returns(T.nilable(PendingRequest)) }
+ attr_reader :pending_request
+ # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
+ sig { returns(T::Array[RequestHistory]) }
+ attr_reader :request_history
+ # The current status of the authorization in its lifecycle.
+ sig { returns(String) }
+ attr_reader :status
+ # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) }
+ attr_reader :token
+ # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.
+ sig { returns(T::Array[Stripe::Issuing::Transaction]) }
+ attr_reader :transactions
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).
+ sig { returns(T.nilable(Treasury)) }
+ attr_reader :treasury
+ # Attribute for field verification_data
+ sig { returns(VerificationData) }
+ attr_reader :verification_data
+ # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :verified_by_fraud_challenge
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ sig { returns(T.nilable(String)) }
+ attr_reader :wallet
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return authorizations that belong to the given card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :card
+ # Only return authorizations that belong to the given cardholder.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # Only return authorizations that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::Authorization::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(card: T.nilable(String), cardholder: T.nilable(String), created: T.nilable(T.any(::Stripe::Issuing::Authorization::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class ApproveParams < Stripe::RequestParams
+ # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(amount: nil, expand: nil, metadata: nil); end
+ end
+ class DeclineParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AmountDetails < Stripe::RequestParams
+ # The ATM withdrawal fee.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :atm_fee
+ # The amount of cash requested by the cardholder.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cashback_amount
+ sig { params(atm_fee: T.nilable(Integer), cashback_amount: T.nilable(Integer)).void }
+ def initialize(atm_fee: nil, cashback_amount: nil); end
+ end
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :category
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(category: T.nilable(String), city: T.nilable(String), country: T.nilable(String), name: T.nilable(String), network_id: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), terminal_id: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ ); end
+ end
+ class NetworkData < Stripe::RequestParams
+ # Identifier assigned to the acquirer by the card network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :acquiring_institution_id
+ sig { params(acquiring_institution_id: T.nilable(String)).void }
+ def initialize(acquiring_institution_id: nil); end
+ end
+ class VerificationData < Stripe::RequestParams
+ class AuthenticationExemption < Stripe::RequestParams
+ # The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ sig { returns(String) }
+ attr_accessor :claimed_by
+ # The specific exemption claimed for this authorization.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(claimed_by: String, type: String).void }
+ def initialize(claimed_by: nil, type: nil); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ # The outcome of the 3D Secure authentication request.
+ sig { returns(String) }
+ attr_accessor :result
+ sig { params(result: String).void }
+ def initialize(result: nil); end
+ end
+ # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1_check
+ # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_postal_code_check
+ # The exemption applied to this authorization.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::VerificationData::AuthenticationExemption))
+ }
+ attr_accessor :authentication_exemption
+ # Whether the cardholder provided a CVC and if it matched Stripe’s record.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_check
+ # Whether the cardholder provided an expiry date and if it matched Stripe’s record.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :expiry_check
+ # 3D Secure details.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::VerificationData::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(address_line1_check: T.nilable(String), address_postal_code_check: T.nilable(String), authentication_exemption: T.nilable(::Stripe::Issuing::Authorization::CreateParams::VerificationData::AuthenticationExemption), cvc_check: T.nilable(String), expiry_check: T.nilable(String), three_d_secure: T.nilable(::Stripe::Issuing::Authorization::CreateParams::VerificationData::ThreeDSecure)).void
+ }
+ def initialize(
+ address_line1_check: nil,
+ address_postal_code_check: nil,
+ authentication_exemption: nil,
+ cvc_check: nil,
+ expiry_check: nil,
+ three_d_secure: nil
+ ); end
+ end
+ # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::AmountDetails)) }
+ attr_accessor :amount_details
+ # How the card details were provided. Defaults to online.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :authorization_method
+ # Card associated with this authorization.
+ sig { returns(String) }
+ attr_accessor :card
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Fleet-specific information for authorizations using Fleet cards.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet)) }
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fuel)) }
+ attr_accessor :fuel
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_amount_controllable
+ # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :merchant_amount
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :merchant_currency
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::MerchantData)) }
+ attr_accessor :merchant_data
+ # Details about the authorization, such as identifiers, set by the card network.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::NetworkData)) }
+ attr_accessor :network_data
+ # Verifications that Stripe performed on information that the cardholder provided to the merchant.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CreateParams::VerificationData)) }
+ attr_accessor :verification_data
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :wallet
+ sig {
+ params(amount: T.nilable(Integer), amount_details: T.nilable(::Stripe::Issuing::Authorization::CreateParams::AmountDetails), authorization_method: T.nilable(String), card: String, currency: T.nilable(String), expand: T.nilable(T::Array[String]), fleet: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fleet), fuel: T.nilable(::Stripe::Issuing::Authorization::CreateParams::Fuel), is_amount_controllable: T.nilable(T::Boolean), merchant_amount: T.nilable(Integer), merchant_currency: T.nilable(String), merchant_data: T.nilable(::Stripe::Issuing::Authorization::CreateParams::MerchantData), network_data: T.nilable(::Stripe::Issuing::Authorization::CreateParams::NetworkData), verification_data: T.nilable(::Stripe::Issuing::Authorization::CreateParams::VerificationData), wallet: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ amount_details: nil,
+ authorization_method: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ fleet: nil,
+ fuel: nil,
+ is_amount_controllable: nil,
+ merchant_amount: nil,
+ merchant_currency: nil,
+ merchant_data: nil,
+ network_data: nil,
+ verification_data: nil,
+ wallet: nil
+ ); end
+ end
+ class CaptureParams < Stripe::RequestParams
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :stopover_allowed
+ sig {
+ params(arrival_airport_code: T.nilable(String), carrier: T.nilable(String), departure_airport_code: T.nilable(String), flight_number: T.nilable(String), service_class: T.nilable(String), stopover_allowed: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ ); end
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refundable
+ # The legs of the trip.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight::Segment]))
+ }
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :travel_agency
+ sig {
+ params(departure_at: T.nilable(Integer), passenger_name: T.nilable(String), refundable: T.nilable(T::Boolean), segments: T.nilable(T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight::Segment]), travel_agency: T.nilable(String)).void
+ }
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :nights
+ sig { params(check_in_at: T.nilable(Integer), nights: T.nilable(Integer)).void }
+ def initialize(check_in_at: nil, nights: nil); end
+ end
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field quantity
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity
+ # Attribute for param field total
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_cost
+ sig {
+ params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void
+ }
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight))
+ }
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fuel))
+ }
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Lodging))
+ }
+ attr_accessor :lodging
+ # The line items in the purchase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Receipt]))
+ }
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(fleet: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet), flight: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight), fuel: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fuel), lodging: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Lodging), receipt: T.nilable(T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Receipt]), reference: T.nilable(String)).void
+ }
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ ); end
+ end
+ # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :capture_amount
+ # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :close_authorization
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Additional purchase information that is optionally provided by the merchant.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails)) }
+ attr_accessor :purchase_details
+ sig {
+ params(capture_amount: T.nilable(Integer), close_authorization: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), purchase_details: T.nilable(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails)).void
+ }
+ def initialize(
+ capture_amount: nil,
+ close_authorization: nil,
+ expand: nil,
+ purchase_details: nil
+ ); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FinalizeAmountParams < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :final_amount
+ # Fleet-specific information for authorizations using Fleet cards.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet)) }
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ sig { returns(T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fuel)) }
+ attr_accessor :fuel
+ sig {
+ params(expand: T.nilable(T::Array[String]), final_amount: Integer, fleet: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet), fuel: T.nilable(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fuel)).void
+ }
+ def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end
+ end
+ class RespondParams < Stripe::RequestParams
+ # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).
+ sig { returns(T::Boolean) }
+ attr_accessor :confirmed
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(confirmed: T::Boolean, expand: T.nilable(T::Array[String])).void }
+ def initialize(confirmed: nil, expand: nil); end
+ end
+ class IncrementParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :increment_amount
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_amount_controllable
+ sig {
+ params(expand: T.nilable(T::Array[String]), increment_amount: Integer, is_amount_controllable: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil); end
+ end
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :reverse_amount
+ sig { params(expand: T.nilable(T::Array[String]), reverse_amount: T.nilable(Integer)).void }
+ def initialize(expand: nil, reverse_amount: nil); end
+ end
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
+ sig {
+ params(params: T.any(::Stripe::Issuing::Authorization::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def approve(params = {}, opts = {}); end
+
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def self.approve(authorization, params = {}, opts = {}); end
+
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
+ sig {
+ params(params: T.any(::Stripe::Issuing::Authorization::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def decline(params = {}, opts = {}); end
+
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def self.decline(authorization, params = {}, opts = {}); end
+
+ # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Authorization::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def self.update(authorization, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/card.rbi b/rbi/stripe/resources/issuing/card.rbi
new file mode 100644
index 00000000..327ad5a1
--- /dev/null
+++ b/rbi/stripe/resources/issuing/card.rbi
@@ -0,0 +1,741 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.
+ class Card < APIResource
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class AddressValidation < Stripe::StripeObject
+ class NormalizedAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # The address validation capabilities to use.
+ sig { returns(String) }
+ attr_reader :mode
+ # The normalized shipping address.
+ sig { returns(T.nilable(NormalizedAddress)) }
+ attr_reader :normalized_address
+ # The validation result for the shipping address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :result
+ end
+ class Customs < Stripe::StripeObject
+ # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU.
+ sig { returns(T.nilable(String)) }
+ attr_reader :eori_number
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Address validation details for the shipment.
+ sig { returns(T.nilable(AddressValidation)) }
+ attr_reader :address_validation
+ # The delivery company that shipped a card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Additional information that may be required for clearing customs.
+ sig { returns(T.nilable(Customs)) }
+ attr_reader :customs
+ # A unix timestamp representing a best estimate of when the card will be delivered.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :eta
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone_number
+ # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :require_signature
+ # Shipment service, such as `standard` or `express`.
+ sig { returns(String) }
+ attr_reader :service
+ # The delivery status of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # A tracking number for a card shipment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ # A link to the shipping carrier's site where you can view detailed information about a card shipment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_url
+ # Packaging options.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class SpendingControls < Stripe::StripeObject
+ class SpendingLimit < Stripe::StripeObject
+ # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_reader :interval
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ sig { returns(T.nilable(T::Array[SpendingLimit])) }
+ attr_reader :spending_limits
+ # Currency of the amounts within `spending_limits`. Always the same as the currency of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :spending_limits_currency
+ end
+ class Wallets < Stripe::StripeObject
+ class ApplePay < Stripe::StripeObject
+ # Apple Pay Eligibility
+ sig { returns(T::Boolean) }
+ attr_reader :eligible
+ # Reason the card is ineligible for Apple Pay
+ sig { returns(T.nilable(String)) }
+ attr_reader :ineligible_reason
+ end
+ class GooglePay < Stripe::StripeObject
+ # Google Pay Eligibility
+ sig { returns(T::Boolean) }
+ attr_reader :eligible
+ # Reason the card is ineligible for Google Pay
+ sig { returns(T.nilable(String)) }
+ attr_reader :ineligible_reason
+ end
+ # Attribute for field apple_pay
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # Attribute for field google_pay
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # Unique identifier for a card used with digital wallets
+ sig { returns(T.nilable(String)) }
+ attr_reader :primary_account_identifier
+ end
+ # The brand of the card.
+ sig { returns(String) }
+ attr_reader :brand
+ # The reason why the card was canceled.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_reason
+ # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
+ #
+ # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
+ sig { returns(Stripe::Issuing::Cardholder) }
+ attr_reader :cardholder
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
+ sig { returns(String) }
+ attr_reader :currency
+ # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
+ sig { returns(String) }
+ attr_reader :cvc
+ # The expiration month of the card.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # The expiration year of the card.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # The financial account this card is attached to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :financial_account
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The last 4 digits of the card number.
+ sig { returns(String) }
+ attr_reader :last4
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
+ sig { returns(String) }
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The personalization design object belonging to this card.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) }
+ attr_reader :personalization_design
+ # The latest card that replaces this card, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) }
+ attr_reader :replaced_by
+ # The card this card replaces, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) }
+ attr_reader :replacement_for
+ # The reason why the previous card needed to be replaced.
+ sig { returns(T.nilable(String)) }
+ attr_reader :replacement_reason
+ # Where and how the card will be shipped.
+ sig { returns(T.nilable(Shipping)) }
+ attr_reader :shipping
+ # Attribute for field spending_controls
+ sig { returns(SpendingControls) }
+ attr_reader :spending_controls
+ # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ sig { returns(String) }
+ attr_reader :status
+ # The type of the card.
+ sig { returns(String) }
+ attr_reader :type
+ # Information relating to digital wallets (like Apple Pay and Google Pay).
+ sig { returns(T.nilable(Wallets)) }
+ attr_reader :wallets
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return cards belonging to the Cardholder with the provided ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # Only return cards that were issued during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Issuing::Card::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Only return cards that have the given expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_month
+ # Only return cards that have the given expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return cards that have the given last four digits.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last4
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Attribute for param field personalization_design
+ sig { returns(T.nilable(String)) }
+ attr_accessor :personalization_design
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return cards that have the given type. One of `virtual` or `physical`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(cardholder: T.nilable(String), created: T.nilable(T.any(::Stripe::Issuing::Card::ListParams::Created, Integer)), ending_before: T.nilable(String), exp_month: T.nilable(Integer), exp_year: T.nilable(Integer), expand: T.nilable(T::Array[String]), last4: T.nilable(String), limit: T.nilable(Integer), personalization_design: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ last4: nil,
+ limit: nil,
+ personalization_design: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :encrypted_number
+ sig { params(encrypted_number: T.nilable(String)).void }
+ def initialize(encrypted_number: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ sig { returns(String) }
+ attr_accessor :mode
+ sig { params(mode: String).void }
+ def initialize(mode: nil); end
+ end
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :eori_number
+ sig { params(eori_number: T.nilable(String)).void }
+ def initialize(eori_number: nil); end
+ end
+ # The address that the card is shipped to.
+ sig { returns(::Stripe::Issuing::Card::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # Address validation settings.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Card::CreateParams::Shipping::AddressValidation))
+ }
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::CreateParams::Shipping::Customs)) }
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ sig { returns(String) }
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_signature
+ # Shipment service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service
+ # Packaging options.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(address: ::Stripe::Issuing::Card::CreateParams::Shipping::Address, address_validation: T.nilable(::Stripe::Issuing::Card::CreateParams::Shipping::AddressValidation), customs: T.nilable(::Stripe::Issuing::Card::CreateParams::Shipping::Customs), name: String, phone_number: T.nilable(String), require_signature: T.nilable(T::Boolean), service: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Card::CreateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::Card::CreateParams::SpendingControls::SpendingLimit])).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ ); end
+ end
+ # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # The currency for the card.
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field financial_account
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The personalization design object belonging to this card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :personalization_design
+ # The desired PIN for this card.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::CreateParams::Pin)) }
+ attr_accessor :pin
+ # The card this is meant to be a replacement for (if any).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :replacement_for
+ # If `replacement_for` is specified, this should indicate why that card is being replaced.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :replacement_reason
+ # The second line to print on the card. Max length: 24 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :second_line
+ # The address where the card will be shipped.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::CreateParams::SpendingControls)) }
+ attr_accessor :spending_controls
+ # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # The type of card to issue. Possible values are `physical` or `virtual`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cardholder: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), financial_account: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), personalization_design: T.nilable(String), pin: T.nilable(::Stripe::Issuing::Card::CreateParams::Pin), replacement_for: T.nilable(String), replacement_reason: T.nilable(String), second_line: T.nilable(T.nilable(String)), shipping: T.nilable(::Stripe::Issuing::Card::CreateParams::Shipping), spending_controls: T.nilable(::Stripe::Issuing::Card::CreateParams::SpendingControls), status: T.nilable(String), type: String).void
+ }
+ def initialize(
+ cardholder: nil,
+ currency: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ replacement_for: nil,
+ replacement_reason: nil,
+ second_line: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :encrypted_number
+ sig { params(encrypted_number: T.nilable(String)).void }
+ def initialize(encrypted_number: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ sig { returns(String) }
+ attr_accessor :mode
+ sig { params(mode: String).void }
+ def initialize(mode: nil); end
+ end
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :eori_number
+ sig { params(eori_number: T.nilable(String)).void }
+ def initialize(eori_number: nil); end
+ end
+ # The address that the card is shipped to.
+ sig { returns(::Stripe::Issuing::Card::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # Address validation settings.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Card::UpdateParams::Shipping::AddressValidation))
+ }
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::UpdateParams::Shipping::Customs)) }
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ sig { returns(String) }
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_signature
+ # Shipment service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service
+ # Packaging options.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(address: ::Stripe::Issuing::Card::UpdateParams::Shipping::Address, address_validation: T.nilable(::Stripe::Issuing::Card::UpdateParams::Shipping::AddressValidation), customs: T.nilable(::Stripe::Issuing::Card::UpdateParams::Shipping::Customs), name: String, phone_number: T.nilable(String), require_signature: T.nilable(T::Boolean), service: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Card::UpdateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::Card::UpdateParams::SpendingControls::SpendingLimit])).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ ); end
+ end
+ # Reason why the `status` of this card is `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Attribute for param field personalization_design
+ sig { returns(T.nilable(String)) }
+ attr_accessor :personalization_design
+ # The desired new PIN for this card.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::UpdateParams::Pin)) }
+ attr_accessor :pin
+ # Updated shipping information for the card.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::UpdateParams::Shipping)) }
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(::Stripe::Issuing::Card::UpdateParams::SpendingControls)) }
+ attr_accessor :spending_controls
+ # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(cancellation_reason: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), personalization_design: T.nilable(String), pin: T.nilable(::Stripe::Issuing::Card::UpdateParams::Pin), shipping: T.nilable(::Stripe::Issuing::Card::UpdateParams::Shipping), spending_controls: T.nilable(::Stripe::Issuing::Card::UpdateParams::SpendingControls), status: T.nilable(String)).void
+ }
+ def initialize(
+ cancellation_reason: nil,
+ expand: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil
+ ); end
+ end
+ class DeliverCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FailCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReturnCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ShipCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class SubmitCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates an Issuing Card object.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Card::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Card::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(card: String, params: T.any(::Stripe::Issuing::Card::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def self.update(card, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/cardholder.rbi b/rbi/stripe/resources/issuing/cardholder.rbi
new file mode 100644
index 00000000..017e157b
--- /dev/null
+++ b/rbi/stripe/resources/issuing/cardholder.rbi
@@ -0,0 +1,744 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
+ #
+ # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
+ class Cardholder < APIResource
+ class Billing < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ end
+ class Company < Stripe::StripeObject
+ # Whether the company's business ID number was provided.
+ sig { returns(T::Boolean) }
+ attr_reader :tax_id_provided
+ end
+ class Individual < Stripe::StripeObject
+ class CardIssuing < Stripe::StripeObject
+ class UserTermsAcceptance < Stripe::StripeObject
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ sig { returns(T.nilable(UserTermsAcceptance)) }
+ attr_reader :user_terms_acceptance
+ end
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year of birth.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ class Verification < Stripe::StripeObject
+ class Document < Stripe::StripeObject
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :front
+ end
+ # An identifying document, either a passport or local ID card.
+ sig { returns(T.nilable(Document)) }
+ attr_reader :document
+ end
+ # Information related to the card_issuing program for this cardholder.
+ sig { returns(T.nilable(CardIssuing)) }
+ attr_reader :card_issuing
+ # The date of birth of this cardholder.
+ sig { returns(T.nilable(Dob)) }
+ attr_reader :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name
+ # Government-issued ID document for this cardholder.
+ sig { returns(T.nilable(Verification)) }
+ attr_reader :verification
+ end
+ class Requirements < Stripe::StripeObject
+ # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Array of fields that need to be collected in order to verify and re-enable the cardholder.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :past_due
+ end
+ class SpendingControls < Stripe::StripeObject
+ class SpendingLimit < Stripe::StripeObject
+ # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_reader :interval
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ sig { returns(T.nilable(T::Array[SpendingLimit])) }
+ attr_reader :spending_limits
+ # Currency of the amounts within `spending_limits`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :spending_limits_currency
+ end
+ # Attribute for field billing
+ sig { returns(Billing) }
+ attr_reader :billing
+ # Additional information about a `company` cardholder.
+ sig { returns(T.nilable(Company)) }
+ attr_reader :company
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The cardholder's email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Additional information about an `individual` cardholder.
+ sig { returns(T.nilable(Individual)) }
+ attr_reader :individual
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The cardholder's name. This will be printed on cards issued to them.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # Attribute for field requirements
+ sig { returns(Requirements) }
+ attr_reader :requirements
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(SpendingControls)) }
+ attr_reader :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards.
+ sig { returns(String) }
+ attr_reader :status
+ # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return cardholders that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::Cardholder::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return cardholders that have the given email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return cardholders that have the given phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return cardholders that have the given type. One of `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Issuing::Cardholder::ListParams::Created, Integer)), email: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), phone_number: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ phone_number: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The cardholder’s billing address.
+ sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Billing::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Issuing::Cardholder::CreateParams::Billing::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ sig { params(tax_id: T.nilable(String)).void }
+ def initialize(tax_id: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing::UserTermsAcceptance))
+ }
+ attr_accessor :user_terms_acceptance
+ sig {
+ params(user_terms_acceptance: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing::UserTermsAcceptance)).void
+ }
+ def initialize(user_terms_acceptance: nil); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::Dob)) }
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing), dob: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::Dob), first_name: T.nilable(String), last_name: T.nilable(String), verification: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Cardholder::CreateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :spending_limits_currency
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::Cardholder::CreateParams::SpendingControls::SpendingLimit]), spending_limits_currency: T.nilable(String)).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ ); end
+ end
+ # The cardholder's billing address.
+ sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Billing) }
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Company)) }
+ attr_accessor :company
+ # The cardholder's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
+ sig { returns(String) }
+ attr_accessor :name
+ # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::CreateParams::SpendingControls)) }
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(billing: ::Stripe::Issuing::Cardholder::CreateParams::Billing, company: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Company), email: T.nilable(String), expand: T.nilable(T::Array[String]), individual: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::Individual), metadata: T.nilable(T::Hash[String, String]), name: String, phone_number: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), spending_controls: T.nilable(::Stripe::Issuing::Cardholder::CreateParams::SpendingControls), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ name: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The cardholder’s billing address.
+ sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Billing::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Issuing::Cardholder::UpdateParams::Billing::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ sig { params(tax_id: T.nilable(String)).void }
+ def initialize(tax_id: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing::UserTermsAcceptance))
+ }
+ attr_accessor :user_terms_acceptance
+ sig {
+ params(user_terms_acceptance: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing::UserTermsAcceptance)).void
+ }
+ def initialize(user_terms_acceptance: nil); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Dob)) }
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing), dob: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Dob), first_name: T.nilable(String), last_name: T.nilable(String), verification: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :spending_limits_currency
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls::SpendingLimit]), spending_limits_currency: T.nilable(String)).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ ); end
+ end
+ # The cardholder's billing address.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Billing)) }
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Company)) }
+ attr_accessor :company
+ # The cardholder's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls)) }
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(billing: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Billing), company: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Company), email: T.nilable(String), expand: T.nilable(T::Array[String]), individual: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::Individual), metadata: T.nilable(T::Hash[String, String]), phone_number: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), spending_controls: T.nilable(::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls), status: T.nilable(String)).void
+ }
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil
+ ); end
+ end
+ # Creates a new Issuing Cardholder object that can be issued cards.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Cardholder::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Cardholder::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(cardholder: String, params: T.any(::Stripe::Issuing::Cardholder::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder)
+ }
+ def self.update(cardholder, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/dispute.rbi b/rbi/stripe/resources/issuing/dispute.rbi
new file mode 100644
index 00000000..7a5adf79
--- /dev/null
+++ b/rbi/stripe/resources/issuing/dispute.rbi
@@ -0,0 +1,913 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
+ #
+ # Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)
+ class Dispute < APIResource
+ class Evidence < Stripe::StripeObject
+ class Canceled < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :cancellation_policy_provided
+ # Reason for canceling the order.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_type
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :returned_at
+ end
+ class Duplicate < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ sig { returns(T.nilable(String)) }
+ attr_reader :original_transaction
+ end
+ class Fraudulent < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ end
+ class MerchandiseNotAsDescribed < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :received_at
+ # Description of the cardholder's attempt to return the product.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_description
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :returned_at
+ end
+ class NoValidAuthorization < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ end
+ class NotReceived < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_type
+ end
+ class Other < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_type
+ end
+ class ServiceNotAsDescribed < Stripe::StripeObject
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Reason for canceling the order.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :received_at
+ end
+ # Attribute for field canceled
+ sig { returns(Canceled) }
+ attr_reader :canceled
+ # Attribute for field duplicate
+ sig { returns(Duplicate) }
+ attr_reader :duplicate
+ # Attribute for field fraudulent
+ sig { returns(Fraudulent) }
+ attr_reader :fraudulent
+ # Attribute for field merchandise_not_as_described
+ sig { returns(MerchandiseNotAsDescribed) }
+ attr_reader :merchandise_not_as_described
+ # Attribute for field no_valid_authorization
+ sig { returns(NoValidAuthorization) }
+ attr_reader :no_valid_authorization
+ # Attribute for field not_received
+ sig { returns(NotReceived) }
+ attr_reader :not_received
+ # Attribute for field other
+ sig { returns(Other) }
+ attr_reader :other
+ # The reason for filing the dispute. Its value will match the field containing the evidence.
+ sig { returns(String) }
+ attr_reader :reason
+ # Attribute for field service_not_as_described
+ sig { returns(ServiceNotAsDescribed) }
+ attr_reader :service_not_as_described
+ end
+ class Treasury < Stripe::StripeObject
+ # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute
+ sig { returns(T.nilable(String)) }
+ attr_reader :debit_reversal
+ # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.
+ sig { returns(String) }
+ attr_reader :received_debit
+ end
+ # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # List of balance transactions associated with the dispute.
+ sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) }
+ attr_reader :balance_transactions
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The currency the `transaction` was made in.
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field evidence
+ sig { returns(Evidence) }
+ attr_reader :evidence
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
+ sig { returns(String) }
+ attr_reader :loss_reason
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Current status of the dispute.
+ sig { returns(String) }
+ attr_reader :status
+ # The transaction being disputed.
+ sig { returns(T.any(String, Stripe::Issuing::Transaction)) }
+ attr_reader :transaction
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
+ sig { returns(T.nilable(Treasury)) }
+ attr_reader :treasury
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return Issuing disputes that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Issuing::Dispute::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Select Issuing disputes with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Select the Issuing dispute for the given transaction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Issuing::Dispute::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), transaction: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ transaction: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Boolean)))) }
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_policy_provided: T.nilable(T.nilable(T.any(String, T::Boolean))), cancellation_reason: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String))), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :original_transaction
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), card_statement: T.nilable(T.nilable(String)), cash_receipt: T.nilable(T.nilable(String)), check_image: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), original_transaction: T.nilable(String)).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ ); end
+ end
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer))), return_description: T.nilable(T.nilable(String)), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_reason: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ ); end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Canceled))))
+ }
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Duplicate))))
+ }
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Fraudulent))))
+ }
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::MerchandiseNotAsDescribed))))
+ }
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::NoValidAuthorization))))
+ }
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::NotReceived))))
+ }
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Other))))
+ }
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::ServiceNotAsDescribed))))
+ }
+ attr_accessor :service_not_as_described
+ sig {
+ params(canceled: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Canceled))), duplicate: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Duplicate))), fraudulent: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Fraudulent))), merchandise_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::MerchandiseNotAsDescribed))), no_valid_authorization: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::NoValidAuthorization))), not_received: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::NotReceived))), other: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::Other))), reason: T.nilable(String), service_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::CreateParams::Evidence::ServiceNotAsDescribed)))).void
+ }
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ ); end
+ end
+ class Treasury < Stripe::RequestParams
+ # The ID of the ReceivedDebit to initiate an Issuings dispute for.
+ sig { returns(String) }
+ attr_accessor :received_debit
+ sig { params(received_debit: String).void }
+ def initialize(received_debit: nil); end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ sig { returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence)) }
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction
+ # Params for disputes related to Treasury FinancialAccounts
+ sig { returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Treasury)) }
+ attr_accessor :treasury
+ sig {
+ params(amount: T.nilable(Integer), evidence: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), transaction: T.nilable(String), treasury: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Treasury)).void
+ }
+ def initialize(
+ amount: nil,
+ evidence: nil,
+ expand: nil,
+ metadata: nil,
+ transaction: nil,
+ treasury: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Boolean)))) }
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_policy_provided: T.nilable(T.nilable(T.any(String, T::Boolean))), cancellation_reason: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String))), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :original_transaction
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), card_statement: T.nilable(T.nilable(String)), cash_receipt: T.nilable(T.nilable(String)), check_image: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), original_transaction: T.nilable(String)).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ ); end
+ end
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer))), return_description: T.nilable(T.nilable(String)), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_reason: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ ); end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Canceled))))
+ }
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Duplicate))))
+ }
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Fraudulent))))
+ }
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::MerchandiseNotAsDescribed))))
+ }
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::NoValidAuthorization))))
+ }
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::NotReceived))))
+ }
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Other))))
+ }
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::ServiceNotAsDescribed))))
+ }
+ attr_accessor :service_not_as_described
+ sig {
+ params(canceled: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Canceled))), duplicate: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Duplicate))), fraudulent: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Fraudulent))), merchandise_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::MerchandiseNotAsDescribed))), no_valid_authorization: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::NoValidAuthorization))), not_received: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::NotReceived))), other: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::Other))), reason: T.nilable(String), service_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::Dispute::UpdateParams::Evidence::ServiceNotAsDescribed)))).void
+ }
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ ); end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ sig { returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence)) }
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(amount: T.nilable(Integer), evidence: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil); end
+ end
+ class SubmitParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Dispute::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Dispute::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
+ sig {
+ params(params: T.any(::Stripe::Issuing::Dispute::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def submit(params = {}, opts = {}); end
+
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Issuing::Dispute::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def self.submit(dispute, params = {}, opts = {}); end
+
+ # Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Issuing::Dispute::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def self.update(dispute, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/personalization_design.rbi b/rbi/stripe/resources/issuing/personalization_design.rbi
new file mode 100644
index 00000000..c930e232
--- /dev/null
+++ b/rbi/stripe/resources/issuing/personalization_design.rbi
@@ -0,0 +1,338 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
+ class PersonalizationDesign < APIResource
+ class CarrierText < Stripe::StripeObject
+ # The footer body text of the carrier letter.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer_body
+ # The footer title text of the carrier letter.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer_title
+ # The header body text of the carrier letter.
+ sig { returns(T.nilable(String)) }
+ attr_reader :header_body
+ # The header title text of the carrier letter.
+ sig { returns(T.nilable(String)) }
+ attr_reader :header_title
+ end
+ class Preferences < Stripe::StripeObject
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ sig { returns(T::Boolean) }
+ attr_reader :is_default
+ # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :is_platform_default
+ end
+ class RejectionReasons < Stripe::StripeObject
+ # The reason(s) the card logo was rejected.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :card_logo
+ # The reason(s) the carrier text was rejected.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :carrier_text
+ end
+ # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ sig { returns(T.nilable(CarrierText)) }
+ attr_reader :carrier_text
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :lookup_key
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Friendly display name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The physical bundle object belonging to this personalization design.
+ sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) }
+ attr_reader :physical_bundle
+ # Attribute for field preferences
+ sig { returns(Preferences) }
+ attr_reader :preferences
+ # Attribute for field rejection_reasons
+ sig { returns(RejectionReasons) }
+ attr_reader :rejection_reasons
+ # Whether this personalization design can be used to create cards.
+ sig { returns(String) }
+ attr_reader :status
+ class ListParams < Stripe::RequestParams
+ class Preferences < Stripe::RequestParams
+ # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_default
+ # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_platform_default
+ sig {
+ params(is_default: T.nilable(T::Boolean), is_platform_default: T.nilable(T::Boolean)).void
+ }
+ def initialize(is_default: nil, is_platform_default: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return personalization designs with the given lookup keys.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :lookup_keys
+ # Only return personalization designs with the given preferences.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesign::ListParams::Preferences))
+ }
+ attr_accessor :preferences
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return personalization designs with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), lookup_keys: T.nilable(T::Array[String]), preferences: T.nilable(::Stripe::Issuing::PersonalizationDesign::ListParams::Preferences), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ preferences: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_title
+ sig {
+ params(footer_body: T.nilable(T.nilable(String)), footer_title: T.nilable(T.nilable(String)), header_body: T.nilable(T.nilable(String)), header_title: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ footer_body: nil,
+ footer_title: nil,
+ header_body: nil,
+ header_title: nil
+ ); end
+ end
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ sig { returns(T::Boolean) }
+ attr_accessor :is_default
+ sig { params(is_default: T::Boolean).void }
+ def initialize(is_default: nil); end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesign::CreateParams::CarrierText))
+ }
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Friendly display name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ sig { returns(String) }
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesign::CreateParams::Preferences))
+ }
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ sig {
+ params(card_logo: T.nilable(String), carrier_text: T.nilable(::Stripe::Issuing::PersonalizationDesign::CreateParams::CarrierText), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(String), physical_bundle: String, preferences: T.nilable(::Stripe::Issuing::PersonalizationDesign::CreateParams::Preferences), transfer_lookup_key: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_title
+ sig {
+ params(footer_body: T.nilable(T.nilable(String)), footer_title: T.nilable(T.nilable(String)), header_body: T.nilable(T.nilable(String)), header_title: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ footer_body: nil,
+ footer_title: nil,
+ header_body: nil,
+ header_title: nil
+ ); end
+ end
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ sig { returns(T::Boolean) }
+ attr_accessor :is_default
+ sig { params(is_default: T::Boolean).void }
+ def initialize(is_default: nil); end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::PersonalizationDesign::UpdateParams::CarrierText))))
+ }
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Friendly display name. Providing an empty string will set the field to null.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesign::UpdateParams::Preferences))
+ }
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ sig {
+ params(card_logo: T.nilable(T.nilable(String)), carrier_text: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::PersonalizationDesign::UpdateParams::CarrierText))), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(T.nilable(String)), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(T.nilable(String)), physical_bundle: T.nilable(String), preferences: T.nilable(::Stripe::Issuing::PersonalizationDesign::UpdateParams::Preferences), transfer_lookup_key: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ ); end
+ end
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RejectParams < Stripe::RequestParams
+ class RejectionReasons < Stripe::RequestParams
+ # The reason(s) the card logo was rejected.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :card_logo
+ # The reason(s) the carrier text was rejected.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :carrier_text
+ sig {
+ params(card_logo: T.nilable(T::Array[String]), carrier_text: T.nilable(T::Array[String])).void
+ }
+ def initialize(card_logo: nil, carrier_text: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The reason(s) the personalization design was rejected.
+ sig { returns(::Stripe::Issuing::PersonalizationDesign::RejectParams::RejectionReasons) }
+ attr_accessor :rejection_reasons
+ sig {
+ params(expand: T.nilable(T::Array[String]), rejection_reasons: ::Stripe::Issuing::PersonalizationDesign::RejectParams::RejectionReasons).void
+ }
+ def initialize(expand: nil, rejection_reasons: nil); end
+ end
+ # Creates a personalization design object.
+ sig {
+ params(params: T.any(::Stripe::Issuing::PersonalizationDesign::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::PersonalizationDesign::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a card personalization object.
+ sig {
+ params(personalization_design: String, params: T.any(::Stripe::Issuing::PersonalizationDesign::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def self.update(personalization_design, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/physical_bundle.rbi b/rbi/stripe/resources/issuing/physical_bundle.rbi
new file mode 100644
index 00000000..72582c3d
--- /dev/null
+++ b/rbi/stripe/resources/issuing/physical_bundle.rbi
@@ -0,0 +1,79 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.
+ class PhysicalBundle < APIResource
+ class Features < Stripe::StripeObject
+ # The policy for how to use card logo images in a card design with this physical bundle.
+ sig { returns(String) }
+ attr_reader :card_logo
+ # The policy for how to use carrier letter text in a card design with this physical bundle.
+ sig { returns(String) }
+ attr_reader :carrier_text
+ # The policy for how to use a second line on a card with this physical bundle.
+ sig { returns(String) }
+ attr_reader :second_line
+ end
+ # Attribute for field features
+ sig { returns(Features) }
+ attr_reader :features
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Friendly display name.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Whether this physical bundle can be used to create cards.
+ sig { returns(String) }
+ attr_reader :status
+ # Whether this physical bundle is a standard Stripe offering or custom-made for you.
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return physical bundles with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return physical bundles with the given type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::PhysicalBundle::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/token.rbi b/rbi/stripe/resources/issuing/token.rbi
new file mode 100644
index 00000000..35676a0c
--- /dev/null
+++ b/rbi/stripe/resources/issuing/token.rbi
@@ -0,0 +1,226 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe.
+ class Token < APIResource
+ class NetworkData < Stripe::StripeObject
+ class Device < Stripe::StripeObject
+ # An obfuscated ID derived from the device ID.
+ sig { returns(String) }
+ attr_reader :device_fingerprint
+ # The IP address of the device at provisioning time.
+ sig { returns(String) }
+ attr_reader :ip_address
+ # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal.
+ sig { returns(String) }
+ attr_reader :location
+ # The name of the device used for tokenization.
+ sig { returns(String) }
+ attr_reader :name
+ # The phone number of the device used for tokenization.
+ sig { returns(String) }
+ attr_reader :phone_number
+ # The type of device used for tokenization.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Mastercard < Stripe::StripeObject
+ # A unique reference ID from MasterCard to represent the card account number.
+ sig { returns(String) }
+ attr_reader :card_reference_id
+ # The network-unique identifier for the token.
+ sig { returns(String) }
+ attr_reader :token_reference_id
+ # The ID of the entity requesting tokenization, specific to MasterCard.
+ sig { returns(String) }
+ attr_reader :token_requestor_id
+ # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard.
+ sig { returns(String) }
+ attr_reader :token_requestor_name
+ end
+ class Visa < Stripe::StripeObject
+ # A unique reference ID from Visa to represent the card account number.
+ sig { returns(String) }
+ attr_reader :card_reference_id
+ # The network-unique identifier for the token.
+ sig { returns(String) }
+ attr_reader :token_reference_id
+ # The ID of the entity requesting tokenization, specific to Visa.
+ sig { returns(String) }
+ attr_reader :token_requestor_id
+ # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa.
+ sig { returns(String) }
+ attr_reader :token_risk_score
+ end
+ class WalletProvider < Stripe::StripeObject
+ class CardholderAddress < Stripe::StripeObject
+ # The street address of the cardholder tokenizing the card.
+ sig { returns(String) }
+ attr_reader :line1
+ # The postal code of the cardholder tokenizing the card.
+ sig { returns(String) }
+ attr_reader :postal_code
+ end
+ # The wallet provider-given account ID of the digital wallet the token belongs to.
+ sig { returns(String) }
+ attr_reader :account_id
+ # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy.
+ sig { returns(Integer) }
+ attr_reader :account_trust_score
+ # The method used for tokenizing a card.
+ sig { returns(String) }
+ attr_reader :card_number_source
+ # Attribute for field cardholder_address
+ sig { returns(CardholderAddress) }
+ attr_reader :cardholder_address
+ # The name of the cardholder tokenizing the card.
+ sig { returns(String) }
+ attr_reader :cardholder_name
+ # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy.
+ sig { returns(Integer) }
+ attr_reader :device_trust_score
+ # The hashed email address of the cardholder's account with the wallet provider.
+ sig { returns(String) }
+ attr_reader :hashed_account_email_address
+ # The reasons for suggested tokenization given by the card network.
+ sig { returns(T::Array[String]) }
+ attr_reader :reason_codes
+ # The recommendation on responding to the tokenization request.
+ sig { returns(String) }
+ attr_reader :suggested_decision
+ # The version of the standard for mapping reason codes followed by the wallet provider.
+ sig { returns(String) }
+ attr_reader :suggested_decision_version
+ end
+ # Attribute for field device
+ sig { returns(Device) }
+ attr_reader :device
+ # Attribute for field mastercard
+ sig { returns(Mastercard) }
+ attr_reader :mastercard
+ # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field visa
+ sig { returns(Visa) }
+ attr_reader :visa
+ # Attribute for field wallet_provider
+ sig { returns(WalletProvider) }
+ attr_reader :wallet_provider
+ end
+ # Card associated with this token.
+ sig { returns(T.any(String, Stripe::Issuing::Card)) }
+ attr_reader :card
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The hashed ID derived from the device ID from the card network associated with the token.
+ sig { returns(T.nilable(String)) }
+ attr_reader :device_fingerprint
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The last four digits of the token.
+ sig { returns(String) }
+ attr_reader :last4
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The token service provider / card network associated with the token.
+ sig { returns(String) }
+ attr_reader :network
+ # Attribute for field network_data
+ sig { returns(NetworkData) }
+ attr_reader :network_data
+ # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :network_updated_at
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The usage state of the token.
+ sig { returns(String) }
+ attr_reader :status
+ # The digital wallet for this token, if one was used.
+ sig { returns(String) }
+ attr_reader :wallet_provider
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # The Issuing card identifier to list tokens for.
+ sig { returns(String) }
+ attr_accessor :card
+ # Only return Issuing tokens that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Issuing::Token::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Select Issuing tokens with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(card: String, created: T.nilable(T.any(::Stripe::Issuing::Token::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ card: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Specifies which status the token should be updated to.
+ sig { returns(String) }
+ attr_accessor :status
+ sig { params(expand: T.nilable(T::Array[String]), status: String).void }
+ def initialize(expand: nil, status: nil); end
+ end
+ # Lists all Issuing Token objects for a given card.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Token::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Attempts to update the specified Issuing Token object to the status specified.
+ sig {
+ params(token: String, params: T.any(::Stripe::Issuing::Token::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Token)
+ }
+ def self.update(token, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi
new file mode 100644
index 00000000..a3d48d71
--- /dev/null
+++ b/rbi/stripe/resources/issuing/transaction.rbi
@@ -0,0 +1,1061 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ # Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving
+ # your Stripe account, such as a completed purchase or refund, is represented by an Issuing
+ # `Transaction` object.
+ #
+ # Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions)
+ class Transaction < APIResource
+ class AmountDetails < Stripe::StripeObject
+ # The fee charged by the ATM for the cash withdrawal.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :atm_fee
+ # The amount of cash requested by the cardholder.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :cashback_amount
+ end
+ class MerchantData < Stripe::StripeObject
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(String) }
+ attr_reader :category
+ # The merchant category code for the seller’s business
+ sig { returns(String) }
+ attr_reader :category_code
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(String) }
+ attr_reader :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # The seller's tax identification number. Currently populated for French merchants only.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_id
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ class NetworkData < Stripe::StripeObject
+ # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :processing_date
+ # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ end
+ class PurchaseDetails < Stripe::StripeObject
+ class Fleet < Stripe::StripeObject
+ class CardholderPromptData < Stripe::StripeObject
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :vehicle_number
+ end
+ class ReportedBreakdown < Stripe::StripeObject
+ class Fuel < Stripe::StripeObject
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :gross_amount_decimal
+ end
+ class NonFuel < Stripe::StripeObject
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :gross_amount_decimal
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_reader :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_reader :national_amount_decimal
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig { returns(T.nilable(Fuel)) }
+ attr_reader :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig { returns(T.nilable(NonFuel)) }
+ attr_reader :non_fuel
+ # Information about tax included in this transaction.
+ sig { returns(T.nilable(Tax)) }
+ attr_reader :tax
+ end
+ # Answers to prompts presented to cardholder at point of sale.
+ sig { returns(T.nilable(CardholderPromptData)) }
+ attr_reader :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig { returns(T.nilable(ReportedBreakdown)) }
+ attr_reader :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :service_type
+ end
+ class Flight < Stripe::StripeObject
+ class Segment < Stripe::StripeObject
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_reader :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_reader :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_reader :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :stopover_allowed
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_reader :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :refundable
+ # The legs of the trip.
+ sig { returns(T.nilable(T::Array[Segment])) }
+ attr_reader :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_reader :travel_agency
+ end
+ class Fuel < Stripe::StripeObject
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_reader :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(String) }
+ attr_reader :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(String) }
+ attr_reader :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(String) }
+ attr_reader :unit_cost_decimal
+ end
+ class Lodging < Stripe::StripeObject
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :nights
+ end
+ class Receipt < Stripe::StripeObject
+ # The description of the item. The maximum length of this field is 26 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The quantity of the item.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :quantity
+ # The total for this line item in cents.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :total
+ # The unit cost of the item in cents.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_cost
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig { returns(T.nilable(Fleet)) }
+ attr_reader :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig { returns(T.nilable(Flight)) }
+ attr_reader :flight
+ # Information about fuel that was purchased with this transaction.
+ sig { returns(T.nilable(Fuel)) }
+ attr_reader :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig { returns(T.nilable(Lodging)) }
+ attr_reader :lodging
+ # The line items in the purchase.
+ sig { returns(T.nilable(T::Array[Receipt])) }
+ attr_reader :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class Treasury < Stripe::StripeObject
+ # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund
+ sig { returns(T.nilable(String)) }
+ attr_reader :received_credit
+ # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture
+ sig { returns(T.nilable(String)) }
+ attr_reader :received_debit
+ end
+ # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(AmountDetails)) }
+ attr_reader :amount_details
+ # The `Authorization` object that led to this transaction.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) }
+ attr_reader :authorization
+ # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # The card used to make this transaction.
+ sig { returns(T.any(String, Stripe::Issuing::Card)) }
+ attr_reader :card
+ # The cardholder to whom this transaction belongs.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) }
+ attr_reader :cardholder
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # If you've disputed the transaction, the ID of the dispute.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) }
+ attr_reader :dispute
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
+ sig { returns(Integer) }
+ attr_reader :merchant_amount
+ # The currency with which the merchant is taking payment.
+ sig { returns(String) }
+ attr_reader :merchant_currency
+ # Attribute for field merchant_data
+ sig { returns(MerchantData) }
+ attr_reader :merchant_data
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Details about the transaction, such as processing dates, set by the card network.
+ sig { returns(T.nilable(NetworkData)) }
+ attr_reader :network_data
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Additional purchase information that is optionally provided by the merchant.
+ sig { returns(T.nilable(PurchaseDetails)) }
+ attr_reader :purchase_details
+ # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
+ sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) }
+ attr_reader :token
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
+ sig { returns(T.nilable(Treasury)) }
+ attr_reader :treasury
+ # The nature of the transaction.
+ sig { returns(String) }
+ attr_reader :type
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :wallet
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return transactions that belong to the given card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :card
+ # Only return transactions that belong to the given cardholder.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # Only return transactions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::Transaction::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return transactions that have the given type. One of `capture` or `refund`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(card: T.nilable(String), cardholder: T.nilable(String), created: T.nilable(T.any(::Stripe::Issuing::Transaction::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class RefundParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ sig { params(expand: T.nilable(T::Array[String]), refund_amount: T.nilable(Integer)).void }
+ def initialize(expand: nil, refund_amount: nil); end
+ end
+ class CreateForceCaptureParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :category
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(category: T.nilable(String), city: T.nilable(String), country: T.nilable(String), name: T.nilable(String), network_id: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), terminal_id: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ ); end
+ end
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :stopover_allowed
+ sig {
+ params(arrival_airport_code: T.nilable(String), carrier: T.nilable(String), departure_airport_code: T.nilable(String), flight_number: T.nilable(String), service_class: T.nilable(String), stopover_allowed: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ ); end
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refundable
+ # The legs of the trip.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight::Segment]))
+ }
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :travel_agency
+ sig {
+ params(departure_at: T.nilable(Integer), passenger_name: T.nilable(String), refundable: T.nilable(T::Boolean), segments: T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight::Segment]), travel_agency: T.nilable(String)).void
+ }
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :nights
+ sig { params(check_in_at: T.nilable(Integer), nights: T.nilable(Integer)).void }
+ def initialize(check_in_at: nil, nights: nil); end
+ end
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field quantity
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity
+ # Attribute for param field total
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_cost
+ sig {
+ params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void
+ }
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight))
+ }
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fuel))
+ }
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Lodging))
+ }
+ attr_accessor :lodging
+ # The line items in the purchase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Receipt]))
+ }
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(fleet: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet), flight: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight), fuel: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fuel), lodging: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Lodging), receipt: T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Receipt]), reference: T.nilable(String)).void
+ }
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ ); end
+ end
+ # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Card associated with this transaction.
+ sig { returns(String) }
+ attr_accessor :card
+ # The currency of the capture. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::MerchantData))
+ }
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails))
+ }
+ attr_accessor :purchase_details
+ sig {
+ params(amount: Integer, card: String, currency: T.nilable(String), expand: T.nilable(T::Array[String]), merchant_data: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::MerchantData), purchase_details: T.nilable(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails)).void
+ }
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ ); end
+ end
+ class CreateUnlinkedRefundParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :category
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(category: T.nilable(String), city: T.nilable(String), country: T.nilable(String), name: T.nilable(String), network_id: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), terminal_id: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ ); end
+ end
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :stopover_allowed
+ sig {
+ params(arrival_airport_code: T.nilable(String), carrier: T.nilable(String), departure_airport_code: T.nilable(String), flight_number: T.nilable(String), service_class: T.nilable(String), stopover_allowed: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ ); end
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refundable
+ # The legs of the trip.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment]))
+ }
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :travel_agency
+ sig {
+ params(departure_at: T.nilable(Integer), passenger_name: T.nilable(String), refundable: T.nilable(T::Boolean), segments: T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment]), travel_agency: T.nilable(String)).void
+ }
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :nights
+ sig { params(check_in_at: T.nilable(Integer), nights: T.nilable(Integer)).void }
+ def initialize(check_in_at: nil, nights: nil); end
+ end
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field quantity
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity
+ # Attribute for param field total
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_cost
+ sig {
+ params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void
+ }
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight))
+ }
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fuel))
+ }
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Lodging))
+ }
+ attr_accessor :lodging
+ # The line items in the purchase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Receipt]))
+ }
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(fleet: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet), flight: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight), fuel: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fuel), lodging: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Lodging), receipt: T.nilable(T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Receipt]), reference: T.nilable(String)).void
+ }
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ ); end
+ end
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Card associated with this unlinked refund transaction.
+ sig { returns(String) }
+ attr_accessor :card
+ # The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::MerchantData))
+ }
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails))
+ }
+ attr_accessor :purchase_details
+ sig {
+ params(amount: Integer, card: String, currency: T.nilable(String), expand: T.nilable(T::Array[String]), merchant_data: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::MerchantData), purchase_details: T.nilable(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails)).void
+ }
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ ); end
+ end
+ # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::Issuing::Transaction::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction)
+ }
+ def self.update(transaction, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi
new file mode 100644
index 00000000..f8fe1d87
--- /dev/null
+++ b/rbi/stripe/resources/line_item.rbi
@@ -0,0 +1,72 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A line item.
+ class LineItem < APIResource
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ sig { returns(Stripe::Discount) }
+ attr_reader :discount
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # Total discount amount applied. If no discounts were applied, defaults to 0.
+ sig { returns(Integer) }
+ attr_reader :amount_discount
+ # Total before any discounts or taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total tax amount applied. If no tax was applied, defaults to 0.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Total after discounts and taxes.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The discounts applied to the line item.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The price used to generate the line item.
+ sig { returns(T.nilable(Stripe::Price)) }
+ attr_reader :price
+ # The quantity of products being purchased.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :quantity
+ # The taxes applied to the line item.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/login_link.rbi b/rbi/stripe/resources/login_link.rbi
new file mode 100644
index 00000000..04437ebe
--- /dev/null
+++ b/rbi/stripe/resources/login_link.rbi
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard.
+ class LoginLink < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The URL for the login link.
+ sig { returns(String) }
+ attr_reader :url
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi
new file mode 100644
index 00000000..2047bed6
--- /dev/null
+++ b/rbi/stripe/resources/mandate.rbi
@@ -0,0 +1,187 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A Mandate is a record of the permission that your customer gives you to debit their payment method.
+ class Mandate < APIResource
+ class CustomerAcceptance < Stripe::StripeObject
+ class Offline < Stripe::StripeObject; end
+ class Online < Stripe::StripeObject
+ # The customer accepts the mandate from this IP address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # The customer accepts the mandate using the user agent of the browser.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ # The time that the customer accepts the mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :accepted_at
+ # Attribute for field offline
+ sig { returns(Offline) }
+ attr_reader :offline
+ # Attribute for field online
+ sig { returns(Online) }
+ attr_reader :online
+ # The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class MultiUse < Stripe::StripeObject; end
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T::Array[String]) }
+ attr_reader :default_for
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(String) }
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(String) }
+ attr_reader :transaction_type
+ end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBecsDebit < Stripe::StripeObject
+ # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
+ sig { returns(String) }
+ attr_reader :url
+ end
+ class BacsDebit < Stripe::StripeObject
+ # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.
+ sig { returns(String) }
+ attr_reader :network_status
+ # The unique reference identifying the mandate on the Bacs network.
+ sig { returns(String) }
+ attr_reader :reference
+ # When the mandate is revoked on the Bacs network this field displays the reason for the revocation.
+ sig { returns(T.nilable(String)) }
+ attr_reader :revocation_reason
+ # The URL that will contain the mandate that the customer has signed.
+ sig { returns(String) }
+ attr_reader :url
+ end
+ class Card < Stripe::StripeObject; end
+ class Cashapp < Stripe::StripeObject; end
+ class KakaoPay < Stripe::StripeObject; end
+ class KrCard < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+ class NaverPay < Stripe::StripeObject; end
+ class NzBankAccount < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_agreement_id
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_id
+ end
+ class RevolutPay < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject
+ # The unique reference of the mandate.
+ sig { returns(String) }
+ attr_reader :reference
+ # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
+ sig { returns(String) }
+ attr_reader :url
+ end
+ class UsBankAccount < Stripe::StripeObject
+ # Mandate collection method
+ sig { returns(String) }
+ attr_reader :collection_method
+ end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class SingleUse < Stripe::StripeObject
+ # The amount of the payment on a single use mandate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The currency of the payment on a single use mandate.
+ sig { returns(String) }
+ attr_reader :currency
+ end
+ # Attribute for field customer_acceptance
+ sig { returns(CustomerAcceptance) }
+ attr_reader :customer_acceptance
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Attribute for field multi_use
+ sig { returns(MultiUse) }
+ attr_reader :multi_use
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account (if any) that the mandate is intended for.
+ sig { returns(String) }
+ attr_reader :on_behalf_of
+ # ID of the payment method associated with this mandate.
+ sig { returns(T.any(String, Stripe::PaymentMethod)) }
+ attr_reader :payment_method
+ # Attribute for field payment_method_details
+ sig { returns(PaymentMethodDetails) }
+ attr_reader :payment_method_details
+ # Attribute for field single_use
+ sig { returns(SingleUse) }
+ attr_reader :single_use
+ # The mandate status indicates whether or not you can use it to initiate a payment.
+ sig { returns(String) }
+ attr_reader :status
+ # The type of the mandate.
+ sig { returns(String) }
+ attr_reader :type
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi
new file mode 100644
index 00000000..67eee592
--- /dev/null
+++ b/rbi/stripe/resources/payment_intent.rbi
@@ -0,0 +1,9731 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ class PaymentIntent < APIResource
+ class AmountDetails < Stripe::StripeObject
+ class Tip < Stripe::StripeObject
+ # Portion of the amount that corresponds to a tip.
+ sig { returns(Integer) }
+ attr_reader :amount
+ end
+ # Attribute for field tip
+ sig { returns(Tip) }
+ attr_reader :tip
+ end
+ class AutomaticPaymentMethods < Stripe::StripeObject
+ # Controls whether this PaymentIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ sig { returns(String) }
+ attr_reader :allow_redirects
+ # Automatically calculates compatible payment methods
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class LastPaymentError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ sig { returns(String) }
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ sig { returns(String) }
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ sig { returns(String) }
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ sig { returns(String) }
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ sig { returns(String) }
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ sig { returns(Stripe::PaymentIntent) }
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ sig { returns(Stripe::PaymentMethod) }
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ sig { returns(String) }
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ sig { returns(String) }
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ sig { returns(Stripe::SetupIntent) }
+ attr_reader :setup_intent
+ # Attribute for field source
+ sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) }
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class NextAction < Stripe::StripeObject
+ class AlipayHandleRedirect < Stripe::StripeObject
+ # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App.
+ sig { returns(T.nilable(String)) }
+ attr_reader :native_data
+ # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.
+ sig { returns(T.nilable(String)) }
+ attr_reader :native_url
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_url
+ # The URL you must redirect your customer to in order to authenticate the payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ class BoletoDisplayDetails < Stripe::StripeObject
+ # The timestamp after which the boleto expires.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_voucher_url
+ # The boleto number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :number
+ # The URL to the downloadable boleto voucher PDF.
+ sig { returns(T.nilable(String)) }
+ attr_reader :pdf
+ end
+ class CardAwaitNotification < Stripe::StripeObject
+ # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :charge_attempt_at
+ # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :customer_approval_required
+ end
+ class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject
+ class QrCode < Stripe::StripeObject
+ # The date (unix timestamp) when the QR code expires.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # The image_url_png string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration.
+ sig { returns(String) }
+ attr_reader :hosted_instructions_url
+ # The url for mobile redirect based auth
+ sig { returns(String) }
+ attr_reader :mobile_auth_url
+ # Attribute for field qr_code
+ sig { returns(QrCode) }
+ attr_reader :qr_code
+ end
+ class DisplayBankTransferInstructions < Stripe::StripeObject
+ class FinancialAddress < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The ABA account number
+ sig { returns(String) }
+ attr_reader :account_number
+ # The account type
+ sig { returns(String) }
+ attr_reader :account_type
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The bank name
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The ABA routing number
+ sig { returns(String) }
+ attr_reader :routing_number
+ end
+ class Iban < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The BIC/SWIFT code of the account.
+ sig { returns(String) }
+ attr_reader :bic
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # The IBAN of the account.
+ sig { returns(String) }
+ attr_reader :iban
+ end
+ class SortCode < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The name of the person or business that owns the bank account
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The account number
+ sig { returns(String) }
+ attr_reader :account_number
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The six-digit sort code
+ sig { returns(String) }
+ attr_reader :sort_code
+ end
+ class Spei < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The three-digit bank code
+ sig { returns(String) }
+ attr_reader :bank_code
+ # The short banking institution name
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The CLABE number
+ sig { returns(String) }
+ attr_reader :clabe
+ end
+ class Swift < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The account number
+ sig { returns(String) }
+ attr_reader :account_number
+ # The account type
+ sig { returns(String) }
+ attr_reader :account_type
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The bank name
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The SWIFT code
+ sig { returns(String) }
+ attr_reader :swift_code
+ end
+ class Zengin < Stripe::StripeObject
+ class AccountHolderAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class BankAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field account_holder_address
+ sig { returns(AccountHolderAddress) }
+ attr_reader :account_holder_address
+ # The account holder name
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_name
+ # The account number
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_number
+ # The bank account type. In Japan, this can only be `futsu` or `toza`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # Attribute for field bank_address
+ sig { returns(BankAddress) }
+ attr_reader :bank_address
+ # The bank code of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # The bank name of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # The branch code of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_code
+ # The branch name of the account
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_name
+ end
+ # ABA Records contain U.S. bank account details per the ABA format.
+ sig { returns(Aba) }
+ attr_reader :aba
+ # Iban Records contain E.U. bank account details per the SEPA format.
+ sig { returns(Iban) }
+ attr_reader :iban
+ # Sort Code Records contain U.K. bank account details per the sort code format.
+ sig { returns(SortCode) }
+ attr_reader :sort_code
+ # SPEI Records contain Mexico bank account details per the SPEI format.
+ sig { returns(Spei) }
+ attr_reader :spei
+ # The payment networks supported by this FinancialAddress
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_networks
+ # SWIFT Records contain U.S. bank account details per the SWIFT format.
+ sig { returns(Swift) }
+ attr_reader :swift
+ # The type of financial address
+ sig { returns(String) }
+ attr_reader :type
+ # Zengin Records contain Japan bank account details per the Zengin format.
+ sig { returns(Zengin) }
+ attr_reader :zengin
+ end
+ # The remaining amount that needs to be transferred to complete the payment.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_remaining
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # A list of financial addresses that can be used to fund the customer balance
+ sig { returns(T::Array[FinancialAddress]) }
+ attr_reader :financial_addresses
+ # A link to a hosted page that guides your customer through completing the transfer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_instructions_url
+ # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Type of bank transfer
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class KonbiniDisplayDetails < Stripe::StripeObject
+ class Stores < Stripe::StripeObject
+ class Familymart < Stripe::StripeObject
+ # The confirmation number.
+ sig { returns(String) }
+ attr_reader :confirmation_number
+ # The payment code.
+ sig { returns(String) }
+ attr_reader :payment_code
+ end
+ class Lawson < Stripe::StripeObject
+ # The confirmation number.
+ sig { returns(String) }
+ attr_reader :confirmation_number
+ # The payment code.
+ sig { returns(String) }
+ attr_reader :payment_code
+ end
+ class Ministop < Stripe::StripeObject
+ # The confirmation number.
+ sig { returns(String) }
+ attr_reader :confirmation_number
+ # The payment code.
+ sig { returns(String) }
+ attr_reader :payment_code
+ end
+ class Seicomart < Stripe::StripeObject
+ # The confirmation number.
+ sig { returns(String) }
+ attr_reader :confirmation_number
+ # The payment code.
+ sig { returns(String) }
+ attr_reader :payment_code
+ end
+ # FamilyMart instruction details.
+ sig { returns(T.nilable(Familymart)) }
+ attr_reader :familymart
+ # Lawson instruction details.
+ sig { returns(T.nilable(Lawson)) }
+ attr_reader :lawson
+ # Ministop instruction details.
+ sig { returns(T.nilable(Ministop)) }
+ attr_reader :ministop
+ # Seicomart instruction details.
+ sig { returns(T.nilable(Seicomart)) }
+ attr_reader :seicomart
+ end
+ # The timestamp at which the pending Konbini payment expires.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_voucher_url
+ # Attribute for field stores
+ sig { returns(Stores) }
+ attr_reader :stores
+ end
+ class MultibancoDisplayDetails < Stripe::StripeObject
+ # Entity number associated with this Multibanco payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :entity
+ # The timestamp at which the Multibanco voucher expires.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_voucher_url
+ # Reference number associated with this Multibanco payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class OxxoDisplayDetails < Stripe::StripeObject
+ # The timestamp after which the OXXO voucher expires.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_after
+ # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_voucher_url
+ # OXXO reference number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :number
+ end
+ class PaynowDisplayQrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ sig { returns(String) }
+ attr_reader :data
+ # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_instructions_url
+ # The image_url_png string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ class PixDisplayQrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ sig { returns(String) }
+ attr_reader :data
+ # The date (unix timestamp) when the PIX expires.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # The URL to the hosted pix instructions page, which allows customers to view the pix QR code.
+ sig { returns(String) }
+ attr_reader :hosted_instructions_url
+ # The image_url_png string used to render png QR code
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The image_url_svg string used to render svg QR code
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ class PromptpayDisplayQrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ sig { returns(String) }
+ attr_reader :data
+ # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.
+ sig { returns(String) }
+ attr_reader :hosted_instructions_url
+ # The PNG path used to render the QR code, can be used as the source in an HTML img tag
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The SVG path used to render the QR code, can be used as the source in an HTML img tag
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ class RedirectToUrl < Stripe::StripeObject
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_url
+ # The URL you must redirect your customer to in order to authenticate the payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject
+ class QrCode < Stripe::StripeObject
+ # The raw data string used to generate QR code, it should be used together with QR code library.
+ sig { returns(String) }
+ attr_reader :data
+ # The image_url_png string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ # The URL to the hosted Swish instructions page, which allows customers to view the QR code.
+ sig { returns(String) }
+ attr_reader :hosted_instructions_url
+ # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests).
+ sig { returns(String) }
+ attr_reader :mobile_auth_url
+ # Attribute for field qr_code
+ sig { returns(QrCode) }
+ attr_reader :qr_code
+ end
+ class VerifyWithMicrodeposits < Stripe::StripeObject
+ # The timestamp when the microdeposits are expected to land.
+ sig { returns(Integer) }
+ attr_reader :arrival_date
+ # The URL for the hosted verification page, which allows customers to verify their bank account.
+ sig { returns(String) }
+ attr_reader :hosted_verification_url
+ # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
+ sig { returns(T.nilable(String)) }
+ attr_reader :microdeposit_type
+ end
+ class WechatPayDisplayQrCode < Stripe::StripeObject
+ # The data being used to generate QR code
+ sig { returns(String) }
+ attr_reader :data
+ # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code.
+ sig { returns(String) }
+ attr_reader :hosted_instructions_url
+ # The base64 image data for a pre-generated QR code
+ sig { returns(String) }
+ attr_reader :image_data_url
+ # The image_url_png string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ class WechatPayRedirectToAndroidApp < Stripe::StripeObject
+ # app_id is the APP ID registered on WeChat open platform
+ sig { returns(String) }
+ attr_reader :app_id
+ # nonce_str is a random string
+ sig { returns(String) }
+ attr_reader :nonce_str
+ # package is static value
+ sig { returns(String) }
+ attr_reader :package
+ # an unique merchant ID assigned by WeChat Pay
+ sig { returns(String) }
+ attr_reader :partner_id
+ # an unique trading ID assigned by WeChat Pay
+ sig { returns(String) }
+ attr_reader :prepay_id
+ # A signature
+ sig { returns(String) }
+ attr_reader :sign
+ # Specifies the current time in epoch format
+ sig { returns(String) }
+ attr_reader :timestamp
+ end
+ class WechatPayRedirectToIosApp < Stripe::StripeObject
+ # An universal link that redirect to WeChat Pay app
+ sig { returns(String) }
+ attr_reader :native_url
+ end
+ # Attribute for field alipay_handle_redirect
+ sig { returns(AlipayHandleRedirect) }
+ attr_reader :alipay_handle_redirect
+ # Attribute for field boleto_display_details
+ sig { returns(BoletoDisplayDetails) }
+ attr_reader :boleto_display_details
+ # Attribute for field card_await_notification
+ sig { returns(CardAwaitNotification) }
+ attr_reader :card_await_notification
+ # Attribute for field cashapp_handle_redirect_or_display_qr_code
+ sig { returns(CashappHandleRedirectOrDisplayQrCode) }
+ attr_reader :cashapp_handle_redirect_or_display_qr_code
+ # Attribute for field display_bank_transfer_instructions
+ sig { returns(DisplayBankTransferInstructions) }
+ attr_reader :display_bank_transfer_instructions
+ # Attribute for field konbini_display_details
+ sig { returns(KonbiniDisplayDetails) }
+ attr_reader :konbini_display_details
+ # Attribute for field multibanco_display_details
+ sig { returns(MultibancoDisplayDetails) }
+ attr_reader :multibanco_display_details
+ # Attribute for field oxxo_display_details
+ sig { returns(OxxoDisplayDetails) }
+ attr_reader :oxxo_display_details
+ # Attribute for field paynow_display_qr_code
+ sig { returns(PaynowDisplayQrCode) }
+ attr_reader :paynow_display_qr_code
+ # Attribute for field pix_display_qr_code
+ sig { returns(PixDisplayQrCode) }
+ attr_reader :pix_display_qr_code
+ # Attribute for field promptpay_display_qr_code
+ sig { returns(PromptpayDisplayQrCode) }
+ attr_reader :promptpay_display_qr_code
+ # Attribute for field redirect_to_url
+ sig { returns(RedirectToUrl) }
+ attr_reader :redirect_to_url
+ # Attribute for field swish_handle_redirect_or_display_qr_code
+ sig { returns(SwishHandleRedirectOrDisplayQrCode) }
+ attr_reader :swish_handle_redirect_or_display_qr_code
+ # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
+ sig { returns(String) }
+ attr_reader :type
+ # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
+ sig { returns(T::Hash[String, T.untyped]) }
+ attr_reader :use_stripe_sdk
+ # Attribute for field verify_with_microdeposits
+ sig { returns(VerifyWithMicrodeposits) }
+ attr_reader :verify_with_microdeposits
+ # Attribute for field wechat_pay_display_qr_code
+ sig { returns(WechatPayDisplayQrCode) }
+ attr_reader :wechat_pay_display_qr_code
+ # Attribute for field wechat_pay_redirect_to_android_app
+ sig { returns(WechatPayRedirectToAndroidApp) }
+ attr_reader :wechat_pay_redirect_to_android_app
+ # Attribute for field wechat_pay_redirect_to_ios_app
+ sig { returns(WechatPayRedirectToIosApp) }
+ attr_reader :wechat_pay_redirect_to_ios_app
+ end
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
+ # ID of the payment method configuration used.
+ sig { returns(String) }
+ attr_reader :id
+ # ID of the parent payment method configuration used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :parent
+ end
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # A URL for custom mandate text
+ sig { returns(String) }
+ attr_reader :custom_mandate_url
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_type
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ class Affirm < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(String) }
+ attr_reader :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class AfterpayClearpay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Alipay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Alma < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ end
+ class AmazonPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class AuBecsDebit < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class BacsDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(String) }
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class Bancontact < Stripe::StripeObject
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(String) }
+ attr_reader :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Blik < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Boleto < Stripe::StripeObject
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(Integer) }
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Card < Stripe::StripeObject
+ class Installments < Stripe::StripeObject
+ class AvailablePlan < Stripe::StripeObject
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :count
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Plan < Stripe::StripeObject
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :count
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Installment plans that may be selected for this PaymentIntent.
+ sig { returns(T.nilable(T::Array[AvailablePlan])) }
+ attr_reader :available_plans
+ # Whether Installments are enabled for this PaymentIntent.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Installment plan selected for this PaymentIntent.
+ sig { returns(T.nilable(Plan)) }
+ attr_reader :plan
+ end
+ class MandateOptions < Stripe::StripeObject
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_reader :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_reader :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_reader :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :supported_types
+ end
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Installment details for this payment (Mexico only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig { returns(T.nilable(Installments)) }
+ attr_reader :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig { returns(T.nilable(MandateOptions)) }
+ attr_reader :mandate_options
+ # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(String) }
+ attr_reader :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(String) }
+ attr_reader :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(String) }
+ attr_reader :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(String) }
+ attr_reader :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_reader :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T::Boolean) }
+ attr_reader :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(String) }
+ attr_reader :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(String) }
+ attr_reader :statement_descriptor_suffix_kanji
+ end
+ class CardPresent < Stripe::StripeObject
+ class Routing < Stripe::StripeObject
+ # Requested routing priority
+ sig { returns(T.nilable(String)) }
+ attr_reader :requested_priority
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :request_incremental_authorization_support
+ # Attribute for field routing
+ sig { returns(Routing) }
+ attr_reader :routing
+ end
+ class Cashapp < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ sig { returns(EuBankTransfer) }
+ attr_reader :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T::Array[String]) }
+ attr_reader :requested_address_types
+ # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ sig { returns(BankTransfer) }
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Eps < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Fpx < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Giropay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Grabpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Ideal < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class InteracPresent < Stripe::StripeObject; end
+ class KakaoPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Klarna < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Preferred locale of the Klarna checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Konbini < Stripe::StripeObject
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.
+ sig { returns(T.nilable(String)) }
+ attr_reader :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(String)) }
+ attr_reader :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class KrCard < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Link < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_reader :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Mobilepay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Multibanco < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class NaverPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class NzBankAccount < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class Oxxo < Stripe::StripeObject
+ # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(Integer) }
+ attr_reader :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class P24 < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class PayByBank < Stripe::StripeObject; end
+ class Payco < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ end
+ class Paynow < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Paypal < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Preferred locale of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Pix < Stripe::StripeObject
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_after_seconds
+ # The timestamp at which the Pix expires.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Promptpay < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class RevolutPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class SamsungPay < Stripe::StripeObject
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ end
+ class SepaDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(String) }
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ end
+ class Sofort < Stripe::StripeObject
+ # Preferred language of the SOFORT authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Swish < Stripe::StripeObject
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Twint < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ sig { returns(T::Array[String]) }
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ sig { returns(Filters) }
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ sig { returns(T::Array[String]) }
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(String) }
+ attr_reader :return_url
+ end
+ class MandateOptions < Stripe::StripeObject
+ # Mandate collection method
+ sig { returns(String) }
+ attr_reader :collection_method
+ end
+ # Attribute for field financial_connections
+ sig { returns(FinancialConnections) }
+ attr_reader :financial_connections
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Preferred transaction settlement speed
+ sig { returns(String) }
+ attr_reader :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(String) }
+ attr_reader :target_date
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ class WechatPay < Stripe::StripeObject
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_reader :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_reader :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ class Zip < Stripe::StripeObject
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(String) }
+ attr_reader :setup_future_usage
+ end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # Attribute for field alma
+ sig { returns(Alma) }
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field blik
+ sig { returns(Blik) }
+ attr_reader :blik
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ sig { returns(CustomerBalance) }
+ attr_reader :customer_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field fpx
+ sig { returns(Fpx) }
+ attr_reader :fpx
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field interac_present
+ sig { returns(InteracPresent) }
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field konbini
+ sig { returns(Konbini) }
+ attr_reader :konbini
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field mobilepay
+ sig { returns(Mobilepay) }
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # Attribute for field oxxo
+ sig { returns(Oxxo) }
+ attr_reader :oxxo
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ sig { returns(PayByBank) }
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ sig { returns(Payco) }
+ attr_reader :payco
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field pix
+ sig { returns(Pix) }
+ attr_reader :pix
+ # Attribute for field promptpay
+ sig { returns(Promptpay) }
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field twint
+ sig { returns(Twint) }
+ attr_reader :twint
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ sig { returns(WechatPay) }
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ sig { returns(Zip) }
+ attr_reader :zip
+ end
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ sig { returns(Integer) }
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ sig { returns(String) }
+ attr_reader :presentment_currency
+ end
+ class Processing < Stripe::StripeObject
+ class Card < Stripe::StripeObject
+ class CustomerNotification < Stripe::StripeObject
+ # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :approval_requested
+ # If customer approval is required, they need to provide approval before this time.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :completes_at
+ end
+ # Attribute for field customer_notification
+ sig { returns(CustomerNotification) }
+ attr_reader :customer_notification
+ end
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Type of the payment method for which payment is in `processing` state, one of `card`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ end
+ class TransferData < Stripe::StripeObject
+ # The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account.
+ # The amount must be less than or equal to the [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount), and must be a positive integer
+ # representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Amount that can be captured from this PaymentIntent.
+ sig { returns(Integer) }
+ attr_reader :amount_capturable
+ # Attribute for field amount_details
+ sig { returns(AmountDetails) }
+ attr_reader :amount_details
+ # Amount that this PaymentIntent collects.
+ sig { returns(Integer) }
+ attr_reader :amount_received
+ # ID of the Connect application that created the PaymentIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :application_fee_amount
+ # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)
+ sig { returns(T.nilable(AutomaticPaymentMethods)) }
+ attr_reader :automatic_payment_methods
+ # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_reason
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(String) }
+ attr_reader :capture_method
+ # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
+ #
+ # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ #
+ # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_secret
+ # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ sig { returns(String) }
+ attr_reader :confirmation_method
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
+ sig { returns(T.nilable(LastPaymentError)) }
+ attr_reader :last_payment_error
+ # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :latest_charge
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
+ sig { returns(T.nilable(NextAction)) }
+ attr_reader :next_action
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # ID of the payment method used in this PaymentIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :payment_method
+ # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent.
+ sig { returns(T.nilable(PaymentMethodConfigurationDetails)) }
+ attr_reader :payment_method_configuration_details
+ # Payment-method-specific configuration for this PaymentIntent.
+ sig { returns(T.nilable(PaymentMethodOptions)) }
+ attr_reader :payment_method_options
+ # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
+ sig { returns(T::Array[String]) }
+ attr_reader :payment_method_types
+ # Attribute for field presentment_details
+ sig { returns(PresentmentDetails) }
+ attr_reader :presentment_details
+ # If present, this property tells you about the processing state of the payment.
+ sig { returns(T.nilable(Processing)) }
+ attr_reader :processing
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_reader :receipt_email
+ # ID of the review associated with this PaymentIntent, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::Review))) }
+ attr_reader :review
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_reader :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig { returns(T.nilable(Shipping)) }
+ attr_reader :shipping
+ # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
+ sig {
+ returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
+ }
+ attr_reader :source
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_suffix
+ # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
+ sig { returns(String) }
+ attr_reader :status
+ # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ sig { returns(T.nilable(String)) }
+ attr_reader :transfer_group
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::PaymentIntent::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return PaymentIntents for the customer that this customer ID specifies.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::PaymentIntent::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this PaymentIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(allow_redirects: T.nilable(String), enabled: T::Boolean).void }
+ def initialize(allow_redirects: nil, enabled: nil); end
+ end
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :user_agent
+ sig { params(ip_address: String, user_agent: String).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig { returns(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance) }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: ::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Eps)) }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payco)) }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), reference: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(code: T.nilable(String), setup_future_usage: T.nilable(T.nilable(String))).void
+ }
+ def initialize(code: nil, setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(String) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(String) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(String) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: String, electronic_commerce_indicator: T.nilable(String), exemption_indicator: T.nilable(String), network_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: String, version: String).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), cvc_token: T.nilable(String), installments: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments), mandate_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), require_cvc_recollection: T.nilable(T::Boolean), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), statement_descriptor_suffix_kana: T.nilable(T.nilable(String)), statement_descriptor_suffix_kanji: T.nilable(T.nilable(String)), three_d_secure: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requested_priority
+ sig { params(requested_priority: T.nilable(String)).void }
+ def initialize(requested_priority: nil); end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent::Routing))
+ }
+ attr_accessor :routing
+ sig {
+ params(request_extended_authorization: T.nilable(T::Boolean), request_incremental_authorization_support: T.nilable(T::Boolean), routing: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent::Routing)).void
+ }
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(confirmation_number: T.nilable(T.nilable(String)), expires_after_days: T.nilable(T.nilable(T.any(String, Integer))), expires_at: T.nilable(T.nilable(T.any(String, Integer))), product_description: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), persistent_token: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_seconds: T.nilable(Integer), expires_at: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(reference: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(reference: nil, setup_future_usage: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks), preferred_settlement_speed: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Affirm))))
+ }
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AfterpayClearpay))))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alipay))))
+ }
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alma))))
+ }
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AmazonPay))))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AuBecsDebit))))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit))))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Blik))))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Boleto))))
+ }
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent))))
+ }
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp))))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Eps))))
+ }
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Fpx))))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Giropay))))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Grabpay))))
+ }
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Ideal))))
+ }
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::InteracPresent))))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KakaoPay))))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna))))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KrCard))))
+ }
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Link))))
+ }
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Mobilepay))))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Multibanco))))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NaverPay))))
+ }
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NzBankAccount))))
+ }
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Oxxo))))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::P24))))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::PayByBank))))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payco))))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paynow))))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal))))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Pix))))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Promptpay))))
+ }
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::RevolutPay))))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SamsungPay))))
+ }
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Sofort))))
+ }
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Swish))))
+ }
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Twint))))
+ }
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::WechatPay))))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Zip))))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Bancontact))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SamsungPay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Zip)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::PaymentIntent::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::PaymentIntent::CreateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ # The amount is capped at the total transaction amount and if no amount is set,
+ # the full amount is transferred.
+ #
+ # If you intend to collect a fee and you need a more robust reporting experience, using
+ # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount)
+ # might be a better fit for your integration.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::AutomaticPaymentMethods)) }
+ attr_accessor :automatic_payment_methods
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :confirm
+ # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mandate
+ # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(T.any(T::Boolean, String))) }
+ attr_accessor :off_session
+ # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent.
+ #
+ # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # 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. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a Transfer.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(amount: Integer, application_fee_amount: T.nilable(Integer), automatic_payment_methods: T.nilable(::Stripe::PaymentIntent::CreateParams::AutomaticPaymentMethods), capture_method: T.nilable(String), confirm: T.nilable(T::Boolean), confirmation_method: T.nilable(String), confirmation_token: T.nilable(String), currency: String, customer: T.nilable(String), description: T.nilable(String), error_on_requires_action: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), mandate: T.nilable(String), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::CreateParams::MandateData))), metadata: T.nilable(T::Hash[String, String]), off_session: T.nilable(T.any(T::Boolean, String)), on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), radar_options: T.nilable(::Stripe::PaymentIntent::CreateParams::RadarOptions), receipt_email: T.nilable(String), return_url: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::PaymentIntent::CreateParams::Shipping), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::CreateParams::TransferData), transfer_group: T.nilable(String), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ automatic_payment_methods: nil,
+ capture_method: nil,
+ confirm: nil,
+ confirmation_method: nil,
+ confirmation_token: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Eps)) }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payco)) }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), reference: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(code: T.nilable(String), setup_future_usage: T.nilable(T.nilable(String))).void
+ }
+ def initialize(code: nil, setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(String) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(String) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(String) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: String, electronic_commerce_indicator: T.nilable(String), exemption_indicator: T.nilable(String), network_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: String, version: String).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), cvc_token: T.nilable(String), installments: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments), mandate_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), require_cvc_recollection: T.nilable(T::Boolean), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), statement_descriptor_suffix_kana: T.nilable(T.nilable(String)), statement_descriptor_suffix_kanji: T.nilable(T.nilable(String)), three_d_secure: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requested_priority
+ sig { params(requested_priority: T.nilable(String)).void }
+ def initialize(requested_priority: nil); end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent::Routing))
+ }
+ attr_accessor :routing
+ sig {
+ params(request_extended_authorization: T.nilable(T::Boolean), request_incremental_authorization_support: T.nilable(T::Boolean), routing: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent::Routing)).void
+ }
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(confirmation_number: T.nilable(T.nilable(String)), expires_after_days: T.nilable(T.nilable(T.any(String, Integer))), expires_at: T.nilable(T.nilable(T.any(String, Integer))), product_description: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), persistent_token: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_seconds: T.nilable(Integer), expires_at: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(reference: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(reference: nil, setup_future_usage: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks), preferred_settlement_speed: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Affirm))))
+ }
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AfterpayClearpay))))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alipay))))
+ }
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alma))))
+ }
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AmazonPay))))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AuBecsDebit))))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit))))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Blik))))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Boleto))))
+ }
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent))))
+ }
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp))))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Eps))))
+ }
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Fpx))))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Giropay))))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Grabpay))))
+ }
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Ideal))))
+ }
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::InteracPresent))))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KakaoPay))))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna))))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KrCard))))
+ }
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Link))))
+ }
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Mobilepay))))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Multibanco))))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NaverPay))))
+ }
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NzBankAccount))))
+ }
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Oxxo))))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::P24))))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::PayByBank))))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payco))))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paynow))))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal))))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Pix))))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Promptpay))))
+ }
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::RevolutPay))))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SamsungPay))))
+ }
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Sofort))))
+ }
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Swish))))
+ }
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Twint))))
+ }
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::WechatPay))))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Zip))))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Bancontact))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SamsungPay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Zip)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::PaymentIntent::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::PaymentIntent::UpdateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :receipt_email
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), capture_method: T.nilable(String), currency: T.nilable(String), customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), receipt_email: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::UpdateParams::Shipping))), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::UpdateParams::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ capture_method: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class ApplyCustomerBalanceParams < Stripe::RequestParams
+ # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter.
+ #
+ # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent.
+ #
+ # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amount: nil, currency: nil, expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(cancellation_reason: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(cancellation_reason: nil, expand: nil); end
+ end
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_to_capture
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :final_capture
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a transfer after the payment
+ # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(::Stripe::PaymentIntent::CaptureParams::TransferData)) }
+ attr_accessor :transfer_data
+ sig {
+ params(amount_to_capture: T.nilable(Integer), application_fee_amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), final_capture: T.nilable(T::Boolean), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::CaptureParams::TransferData)).void
+ }
+ def initialize(
+ amount_to_capture: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ final_capture: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil
+ ); end
+ end
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig { params(ip_address: T.nilable(String), user_agent: T.nilable(String)).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance))
+ }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance)).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Eps)) }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payco)) }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), reference: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(code: T.nilable(String), setup_future_usage: T.nilable(T.nilable(String))).void
+ }
+ def initialize(code: nil, setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(String) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(String) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(String) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: String, electronic_commerce_indicator: T.nilable(String), exemption_indicator: T.nilable(String), network_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: String, version: String).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), cvc_token: T.nilable(String), installments: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments), mandate_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), require_cvc_recollection: T.nilable(T::Boolean), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), statement_descriptor_suffix_kana: T.nilable(T.nilable(String)), statement_descriptor_suffix_kanji: T.nilable(T.nilable(String)), three_d_secure: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requested_priority
+ sig { params(requested_priority: T.nilable(String)).void }
+ def initialize(requested_priority: nil); end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent::Routing))
+ }
+ attr_accessor :routing
+ sig {
+ params(request_extended_authorization: T.nilable(T::Boolean), request_incremental_authorization_support: T.nilable(T::Boolean), routing: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent::Routing)).void
+ }
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(confirmation_number: T.nilable(T.nilable(String)), expires_after_days: T.nilable(T.nilable(T.any(String, Integer))), expires_at: T.nilable(T.nilable(T.any(String, Integer))), product_description: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), persistent_token: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_seconds: T.nilable(Integer), expires_at: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(reference: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(reference: nil, setup_future_usage: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), preferred_settlement_speed: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Affirm))))
+ }
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alipay))))
+ }
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alma))))
+ }
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AmazonPay))))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AuBecsDebit))))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit))))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Blik))))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Boleto))))
+ }
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent))))
+ }
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp))))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Eps))))
+ }
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Fpx))))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Giropay))))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Grabpay))))
+ }
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Ideal))))
+ }
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::InteracPresent))))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KakaoPay))))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna))))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KrCard))))
+ }
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Link))))
+ }
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Mobilepay))))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Multibanco))))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NaverPay))))
+ }
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NzBankAccount))))
+ }
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Oxxo))))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::P24))))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::PayByBank))))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payco))))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paynow))))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal))))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Pix))))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Promptpay))))
+ }
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::RevolutPay))))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SamsungPay))))
+ }
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Sofort))))
+ }
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Swish))))
+ }
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Twint))))
+ }
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::WechatPay))))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Zip))))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Bancontact))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SamsungPay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Zip)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::PaymentIntent::ConfirmParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::PaymentIntent::ConfirmParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mandate
+ # Attribute for param field mandate_data
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
+ sig { returns(T.nilable(T.any(T::Boolean, String))) }
+ attr_accessor :off_session
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :receipt_email
+ # 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(capture_method: T.nilable(String), confirmation_token: T.nilable(String), error_on_requires_action: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), mandate: T.nilable(String), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::MandateData))), off_session: T.nilable(T.any(T::Boolean, String)), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), radar_options: T.nilable(::Stripe::PaymentIntent::ConfirmParams::RadarOptions), receipt_email: T.nilable(T.nilable(String)), return_url: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::ConfirmParams::Shipping))), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ capture_method: nil,
+ confirmation_token: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ off_session: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class IncrementAuthorizationParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Text that appears on the customer's statement as the statement descriptor for a non-card or 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The parameters used to automatically create a transfer after the payment is captured.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(amount: Integer, application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ ); end
+ end
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amounts: T.nilable(T::Array[Integer]), descriptor_code: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil); end
+ end
+ # Manually reconcile the remaining amount for a customer_balance PaymentIntent.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::ApplyCustomerBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def apply_customer_balance(params = {}, opts = {}); end
+
+ # Manually reconcile the remaining amount for a customer_balance PaymentIntent.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::ApplyCustomerBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.apply_customer_balance(intent, params = {}, opts = {}); end
+
+ # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
+ #
+ # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
+ #
+ # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
+ #
+ # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
+ #
+ # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.cancel(intent, params = {}, opts = {}); end
+
+ # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
+ #
+ # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
+ #
+ # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def capture(params = {}, opts = {}); end
+
+ # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
+ #
+ # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
+ #
+ # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.capture(intent, params = {}, opts = {}); end
+
+ # Confirm that your customer intends to pay with current or provided
+ # payment method. Upon confirmation, the PaymentIntent will attempt to initiate
+ # a payment.
+ # If the selected payment method requires additional authentication steps, the
+ # PaymentIntent will transition to the requires_action status and
+ # suggest additional actions via next_action. If payment fails,
+ # the PaymentIntent transitions to the requires_payment_method status or the
+ # canceled status if the confirmation limit is reached. If
+ # payment succeeds, the PaymentIntent will transition to the succeeded
+ # status (or requires_capture, if capture_method is set to manual).
+ # If the confirmation_method is automatic, payment may be attempted
+ # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
+ # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
+ # After next_actions are handled by the client, no additional
+ # confirmation is required to complete the payment.
+ # If the confirmation_method is manual, all payment attempts must be
+ # initiated using a secret key.
+ # If any actions are required for the payment, the PaymentIntent will
+ # return to the requires_confirmation state
+ # after those actions are completed. Your server needs to then
+ # explicitly re-confirm the PaymentIntent to initiate the next payment
+ # attempt.
+ # There is a variable upper limit on how many times a PaymentIntent can be confirmed.
+ # After this limit is reached, any further calls to this endpoint will
+ # transition the PaymentIntent to the canceled state.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def confirm(params = {}, opts = {}); end
+
+ # Confirm that your customer intends to pay with current or provided
+ # payment method. Upon confirmation, the PaymentIntent will attempt to initiate
+ # a payment.
+ # If the selected payment method requires additional authentication steps, the
+ # PaymentIntent will transition to the requires_action status and
+ # suggest additional actions via next_action. If payment fails,
+ # the PaymentIntent transitions to the requires_payment_method status or the
+ # canceled status if the confirmation limit is reached. If
+ # payment succeeds, the PaymentIntent will transition to the succeeded
+ # status (or requires_capture, if capture_method is set to manual).
+ # If the confirmation_method is automatic, payment may be attempted
+ # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
+ # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
+ # After next_actions are handled by the client, no additional
+ # confirmation is required to complete the payment.
+ # If the confirmation_method is manual, all payment attempts must be
+ # initiated using a secret key.
+ # If any actions are required for the payment, the PaymentIntent will
+ # return to the requires_confirmation state
+ # after those actions are completed. Your server needs to then
+ # explicitly re-confirm the PaymentIntent to initiate the next payment
+ # attempt.
+ # There is a variable upper limit on how many times a PaymentIntent can be confirmed.
+ # After this limit is reached, any further calls to this endpoint will
+ # transition the PaymentIntent to the canceled state.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.confirm(intent, params = {}, opts = {}); end
+
+ # Creates a PaymentIntent object.
+ #
+ # After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm)
+ # to continue the payment. Learn more about the available payment flows
+ # with the Payment Intents API.
+ #
+ # When you use confirm=true during creation, it's equivalent to creating
+ # and confirming the PaymentIntent in the same call. You can use any parameters
+ # available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply
+ # confirm=true.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Perform an incremental authorization on an eligible
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
+ # PaymentIntent's status must be requires_capture and
+ # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
+ # must be true.
+ #
+ # Incremental authorizations attempt to increase the authorized amount on
+ # your customer's card to the new, higher amount provided. Similar to the
+ # initial authorization, incremental authorizations can be declined. A
+ # single PaymentIntent can call this endpoint multiple times to further
+ # increase the authorized amount.
+ #
+ # If the incremental authorization succeeds, the PaymentIntent object
+ # returns with the updated
+ # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
+ # If the incremental authorization fails, a
+ # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
+ # fields on the PaymentIntent or Charge update. The PaymentIntent
+ # object remains capturable for the previously authorized amount.
+ #
+ # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
+ # After it's captured, a PaymentIntent can no longer be incremented.
+ #
+ # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::IncrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def increment_authorization(params = {}, opts = {}); end
+
+ # Perform an incremental authorization on an eligible
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
+ # PaymentIntent's status must be requires_capture and
+ # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
+ # must be true.
+ #
+ # Incremental authorizations attempt to increase the authorized amount on
+ # your customer's card to the new, higher amount provided. Similar to the
+ # initial authorization, incremental authorizations can be declined. A
+ # single PaymentIntent can call this endpoint multiple times to further
+ # increase the authorized amount.
+ #
+ # If the incremental authorization succeeds, the PaymentIntent object
+ # returns with the updated
+ # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
+ # If the incremental authorization fails, a
+ # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
+ # fields on the PaymentIntent or Charge update. The PaymentIntent
+ # object remains capturable for the previously authorized amount.
+ #
+ # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
+ # After it's captured, a PaymentIntent can no longer be incremented.
+ #
+ # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::IncrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.increment_authorization(intent, params = {}, opts = {}); end
+
+ # Returns a list of PaymentIntents.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Updates properties on a PaymentIntent object without confirming.
+ #
+ # Depending on which properties you update, you might need to confirm the
+ # PaymentIntent again. For example, updating the payment_method
+ # always requires you to confirm the PaymentIntent again. If you prefer to
+ # update and confirm at the same time, we recommend updating properties through
+ # the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.update(intent, params = {}, opts = {}); end
+
+ # Verifies microdeposits on a PaymentIntent object.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def verify_microdeposits(params = {}, opts = {}); end
+
+ # Verifies microdeposits on a PaymentIntent object.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def self.verify_microdeposits(intent, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/payment_link.rbi b/rbi/stripe/resources/payment_link.rbi
new file mode 100644
index 00000000..d85010cf
--- /dev/null
+++ b/rbi/stripe/resources/payment_link.rbi
@@ -0,0 +1,1801 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # 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.
+ #
+ # 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.
+ #
+ # Related guide: [Payment Links API](https://stripe.com/docs/payment-links)
+ class PaymentLink < APIResource
+ class AfterCompletion < Stripe::StripeObject
+ class HostedConfirmation < Stripe::StripeObject
+ # The custom message that is displayed to the customer after the purchase is complete.
+ sig { returns(T.nilable(String)) }
+ attr_reader :custom_message
+ end
+ class Redirect < Stripe::StripeObject
+ # The URL the customer will be redirected to after the purchase is complete.
+ sig { returns(String) }
+ attr_reader :url
+ end
+ # Attribute for field hosted_confirmation
+ sig { returns(HostedConfirmation) }
+ attr_reader :hosted_confirmation
+ # Attribute for field redirect
+ sig { returns(Redirect) }
+ attr_reader :redirect
+ # The specified behavior after the purchase is complete.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # If `true`, tax will be calculated automatically using the customer's location.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ end
+ class ConsentCollection < Stripe::StripeObject
+ class PaymentMethodReuseAgreement < Stripe::StripeObject
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
+ #
+ # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ sig { returns(String) }
+ attr_reader :position
+ end
+ # Settings related to the payment method reuse text shown in the Checkout UI.
+ sig { returns(T.nilable(PaymentMethodReuseAgreement)) }
+ attr_reader :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications.
+ sig { returns(T.nilable(String)) }
+ attr_reader :promotions
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terms_of_service
+ end
+ class CustomField < Stripe::StripeObject
+ class Dropdown < Stripe::StripeObject
+ class Option < Stripe::StripeObject
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_reader :label
+ # 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.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # The value that will pre-fill on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig { returns(T::Array[Option]) }
+ attr_reader :options
+ end
+ class Label < Stripe::StripeObject
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Numeric < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum_length
+ end
+ class Text < Stripe::StripeObject
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_reader :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum_length
+ end
+ # Attribute for field dropdown
+ sig { returns(Dropdown) }
+ attr_reader :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_reader :key
+ # Attribute for field label
+ sig { returns(Label) }
+ attr_reader :label
+ # Attribute for field numeric
+ sig { returns(Numeric) }
+ attr_reader :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_reader :optional
+ # Attribute for field text
+ sig { returns(Text) }
+ attr_reader :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class CustomText < Stripe::StripeObject
+ class AfterSubmit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ class Submit < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ class TermsOfServiceAcceptance < Stripe::StripeObject
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig { returns(T.nilable(AfterSubmit)) }
+ attr_reader :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig { returns(T.nilable(Submit)) }
+ attr_reader :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig { returns(T.nilable(TermsOfServiceAcceptance)) }
+ attr_reader :terms_of_service_acceptance
+ end
+ class InvoiceCreation < Stripe::StripeObject
+ class InvoiceData < Stripe::StripeObject
+ class CustomField < Stripe::StripeObject
+ # The name of the custom field.
+ sig { returns(String) }
+ attr_reader :name
+ # The value of the custom field.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class RenderingOptions < Stripe::StripeObject
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
+ sig { returns(T.nilable(String)) }
+ attr_reader :amount_tax_display
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :account_tax_ids
+ # A list of up to 4 custom fields to be displayed on the invoice.
+ sig { returns(T.nilable(T::Array[CustomField])) }
+ attr_reader :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Footer to be displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(Issuer)) }
+ attr_reader :issuer
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Options for invoice PDF rendering.
+ sig { returns(T.nilable(RenderingOptions)) }
+ attr_reader :rendering_options
+ end
+ # Enable creating an invoice on successful payment.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Configuration for the invoice. Default invoice values will be used if unspecified.
+ sig { returns(T.nilable(InvoiceData)) }
+ attr_reader :invoice_data
+ end
+ class OptionalItem < Stripe::StripeObject
+ class AdjustableQuantity < Stripe::StripeObject
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum
+ end
+ # Attribute for field adjustable_quantity
+ sig { returns(T.nilable(AdjustableQuantity)) }
+ attr_reader :adjustable_quantity
+ # Attribute for field price
+ sig { returns(String) }
+ attr_reader :price
+ # Attribute for field quantity
+ sig { returns(Integer) }
+ attr_reader :quantity
+ end
+ class PaymentIntentData < Stripe::StripeObject
+ # Indicates when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Indicates that you intend to make future payments with the payment method collected during checkout.
+ sig { returns(T.nilable(String)) }
+ attr_reader :setup_future_usage
+ # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor_suffix
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transfer_group
+ end
+ class PhoneNumberCollection < Stripe::StripeObject
+ # If `true`, a phone number will be collected during checkout.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ end
+ class Restrictions < Stripe::StripeObject
+ class CompletedSessions < Stripe::StripeObject
+ # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met.
+ sig { returns(Integer) }
+ attr_reader :count
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ sig { returns(Integer) }
+ attr_reader :limit
+ end
+ # Attribute for field completed_sessions
+ sig { returns(CompletedSessions) }
+ attr_reader :completed_sessions
+ end
+ class ShippingAddressCollection < Stripe::StripeObject
+ # 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`.
+ sig { returns(T::Array[String]) }
+ attr_reader :allowed_countries
+ end
+ class ShippingOption < Stripe::StripeObject
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_reader :shipping_amount
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.any(String, Stripe::ShippingRate)) }
+ attr_reader :shipping_rate
+ end
+ class SubscriptionData < Stripe::StripeObject
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Attribute for field issuer
+ sig { returns(Issuer) }
+ attr_reader :issuer
+ end
+ class TrialSettings < Stripe::StripeObject
+ class EndBehavior < Stripe::StripeObject
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_reader :missing_payment_method
+ end
+ # Defines how a subscription behaves when a free trial ends.
+ sig { returns(EndBehavior) }
+ attr_reader :end_behavior
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Attribute for field invoice_settings
+ sig { returns(InvoiceSettings) }
+ attr_reader :invoice_settings
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_period_days
+ # Settings related to subscription trials.
+ sig { returns(T.nilable(TrialSettings)) }
+ attr_reader :trial_settings
+ end
+ class TaxIdCollection < Stripe::StripeObject
+ # Indicates whether tax ID collection is enabled for the session.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Attribute for field required
+ sig { returns(String) }
+ attr_reader :required
+ end
+ class TransferData < Stripe::StripeObject
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # The connected account receiving the transfer.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ # 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.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Attribute for field after_completion
+ sig { returns(AfterCompletion) }
+ attr_reader :after_completion
+ # Whether user redeemable promotion codes are enabled.
+ sig { returns(T::Boolean) }
+ attr_reader :allow_promotion_codes
+ # The ID of the Connect application that created the Payment Link.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :application_fee_amount
+ # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ sig { returns(String) }
+ attr_reader :billing_address_collection
+ # When set, provides configuration to gather active consent from customers.
+ sig { returns(T.nilable(ConsentCollection)) }
+ attr_reader :consent_collection
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig { returns(T::Array[CustomField]) }
+ attr_reader :custom_fields
+ # Attribute for field custom_text
+ sig { returns(CustomText) }
+ attr_reader :custom_text
+ # Configuration for Customer creation during checkout.
+ sig { returns(String) }
+ attr_reader :customer_creation
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ sig { returns(T.nilable(String)) }
+ attr_reader :inactive_message
+ # Configuration for creating invoice for payment mode payment links.
+ sig { returns(T.nilable(InvoiceCreation)) }
+ attr_reader :invoice_creation
+ # The line items representing what is being sold.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # 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.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # The optional items presented to the customer at checkout.
+ sig { returns(T.nilable(T::Array[OptionalItem])) }
+ attr_reader :optional_items
+ # Indicates the parameters to be passed to PaymentIntent creation during checkout.
+ sig { returns(T.nilable(PaymentIntentData)) }
+ attr_reader :payment_intent_data
+ # Configuration for collecting a payment method during checkout. Defaults to `always`.
+ sig { returns(String) }
+ attr_reader :payment_method_collection
+ # 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).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :payment_method_types
+ # Attribute for field phone_number_collection
+ sig { returns(PhoneNumberCollection) }
+ attr_reader :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ sig { returns(T.nilable(Restrictions)) }
+ attr_reader :restrictions
+ # Configuration for collecting the customer's shipping address.
+ sig { returns(T.nilable(ShippingAddressCollection)) }
+ attr_reader :shipping_address_collection
+ # The shipping rate options applied to the session.
+ sig { returns(T::Array[ShippingOption]) }
+ attr_reader :shipping_options
+ # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
+ sig { returns(String) }
+ attr_reader :submit_type
+ # 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`.
+ sig { returns(T.nilable(SubscriptionData)) }
+ attr_reader :subscription_data
+ # Attribute for field tax_id_collection
+ sig { returns(TaxIdCollection) }
+ attr_reader :tax_id_collection
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ # The public URL that can be shared with customers.
+ sig { returns(String) }
+ attr_reader :url
+ class ListParams < Stripe::RequestParams
+ # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ 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
+ }
+ def initialize(
+ active: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :custom_message
+ sig { params(custom_message: T.nilable(String)).void }
+ def initialize(custom_message: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # 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.
+ sig { returns(String) }
+ attr_accessor :url
+ sig { params(url: String).void }
+ def initialize(url: nil); end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::HostedConfirmation))
+ }
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::Redirect)) }
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(hosted_confirmation: T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion::Redirect), type: String).void
+ }
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ sig { returns(String) }
+ attr_accessor :position
+ sig { params(position: String).void }
+ def initialize(position: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection::PaymentMethodReuseAgreement))
+ }
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terms_of_service
+ sig {
+ params(payment_method_reuse_agreement: T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection::PaymentMethodReuseAgreement), promotions: T.nilable(String), terms_of_service: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_reuse_agreement: nil,
+ promotions: nil,
+ terms_of_service: nil
+ ); end
+ end
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_accessor :label
+ # 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.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(label: String, value: String).void }
+ def initialize(label: nil, value: nil); end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig {
+ returns(T::Array[::Stripe::PaymentLink::CreateParams::CustomField::Dropdown::Option])
+ }
+ attr_accessor :options
+ sig {
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::PaymentLink::CreateParams::CustomField::Dropdown::Option]).void
+ }
+ def initialize(default_value: nil, options: nil); end
+ end
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(String) }
+ attr_accessor :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(custom: String, type: String).void }
+ def initialize(custom: nil, type: nil); end
+ end
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ # Configuration for `type=dropdown` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Dropdown)) }
+ attr_accessor :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ sig { returns(::Stripe::PaymentLink::CreateParams::CustomField::Label) }
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Numeric)) }
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomField::Text)) }
+ attr_accessor :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ 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
+ }
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ ); end
+ end
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::AfterSubmit))))
+ }
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::ShippingAddress))))
+ }
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::Submit))))
+ }
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::CustomText::TermsOfServiceAcceptance))))
+ }
+ attr_accessor :terms_of_service_acceptance
+ sig {
+ 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
+ }
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ ); end
+ end
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ sig { params(amount_tax_display: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(amount_tax_display: nil); end
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::Issuer))
+ }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ 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
+ }
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ ); end
+ end
+ # Whether the feature is enabled
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData))
+ }
+ attr_accessor :invoice_data
+ sig {
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData)).void
+ }
+ def initialize(enabled: nil, invoice_data: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ sig { returns(String) }
+ attr_accessor :price
+ # The quantity of the line item being purchased.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLink::CreateParams::LineItem::AdjustableQuantity), price: String, quantity: Integer).void
+ }
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
+ end
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::OptionalItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ sig { returns(String) }
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLink::CreateParams::OptionalItem::AdjustableQuantity), price: String, quantity: Integer).void
+ }
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
+ end
+ class PaymentIntentData < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ 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
+ }
+ def initialize(
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ setup_future_usage: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ ); end
+ end
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ sig { returns(Integer) }
+ attr_accessor :limit
+ sig { params(limit: Integer).void }
+ def initialize(limit: nil); end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ sig { returns(::Stripe::PaymentLink::CreateParams::Restrictions::CompletedSessions) }
+ attr_accessor :completed_sessions
+ sig {
+ params(completed_sessions: ::Stripe::PaymentLink::CreateParams::Restrictions::CompletedSessions).void
+ }
+ def initialize(completed_sessions: nil); end
+ end
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ sig { returns(T::Array[String]) }
+ attr_accessor :allowed_countries
+ sig { params(allowed_countries: T::Array[String]).void }
+ def initialize(allowed_countries: nil); end
+ end
+ class ShippingOption < Stripe::RequestParams
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(issuer: T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings::Issuer)).void
+ }
+ def initialize(issuer: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig {
+ returns(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings::EndBehavior)
+ }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings))
+ }
+ attr_accessor :trial_settings
+ sig {
+ 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
+ }
+ def initialize(
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :required
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
+ def initialize(enabled: nil, required: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # Behavior after the purchase is complete.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AfterCompletion)) }
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # 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.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Configuration for automatic tax collection.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address_collection
+ # Configure fields to gather active consent from customers.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::ConsentCollection)) }
+ attr_accessor :consent_collection
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::CustomField])) }
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomText)) }
+ attr_accessor :custom_text
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation)) }
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ sig { returns(T::Array[::Stripe::PaymentLink::CreateParams::LineItem]) }
+ attr_accessor :line_items
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # 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).
+ # 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.
+ # There is a maximum of 20 combined line items and optional items.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::OptionalItem])) }
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::PaymentIntentData)) }
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_collection
+ # 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)).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::PhoneNumberCollection)) }
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::Restrictions)) }
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::ShippingAddressCollection)) }
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::ShippingOption])) }
+ attr_accessor :shipping_options
+ # 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`).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :submit_type
+ # 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`.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::TaxIdCollection)) }
+ attr_accessor :tax_id_collection
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ sig {
+ 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
+ }
+ def initialize(
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil,
+ transfer_data: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :custom_message
+ sig { params(custom_message: T.nilable(String)).void }
+ def initialize(custom_message: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # 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.
+ sig { returns(String) }
+ attr_accessor :url
+ sig { params(url: String).void }
+ def initialize(url: nil); end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::HostedConfirmation))
+ }
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::Redirect)) }
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(hosted_confirmation: T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion::Redirect), type: String).void
+ }
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_accessor :label
+ # 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.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(label: String, value: String).void }
+ def initialize(label: nil, value: nil); end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig {
+ returns(T::Array[::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown::Option])
+ }
+ attr_accessor :options
+ sig {
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown::Option]).void
+ }
+ def initialize(default_value: nil, options: nil); end
+ end
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(String) }
+ attr_accessor :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(custom: String, type: String).void }
+ def initialize(custom: nil, type: nil); end
+ end
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ # Configuration for `type=dropdown` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown)) }
+ attr_accessor :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ sig { returns(::Stripe::PaymentLink::UpdateParams::CustomField::Label) }
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Numeric)) }
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomField::Text)) }
+ attr_accessor :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ 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
+ }
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ ); end
+ end
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::AfterSubmit))))
+ }
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::ShippingAddress))))
+ }
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::Submit))))
+ }
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::CustomText::TermsOfServiceAcceptance))))
+ }
+ attr_accessor :terms_of_service_acceptance
+ sig {
+ 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
+ }
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ ); end
+ end
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ sig { params(amount_tax_display: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(amount_tax_display: nil); end
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::Issuer))
+ }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ 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
+ }
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ ); end
+ end
+ # Whether the feature is enabled
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData))
+ }
+ attr_accessor :invoice_data
+ sig {
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData)).void
+ }
+ def initialize(enabled: nil, invoice_data: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::LineItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of an existing line item on the payment link.
+ sig { returns(String) }
+ attr_accessor :id
+ # The quantity of the line item being purchased.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLink::UpdateParams::LineItem::AdjustableQuantity), id: String, quantity: T.nilable(Integer)).void
+ }
+ def initialize(adjustable_quantity: nil, id: nil, quantity: nil); end
+ end
+ class PaymentIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :transfer_group
+ sig {
+ 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
+ }
+ def initialize(
+ description: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ ); end
+ end
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ sig { returns(Integer) }
+ attr_accessor :limit
+ sig { params(limit: Integer).void }
+ def initialize(limit: nil); end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ sig { returns(::Stripe::PaymentLink::UpdateParams::Restrictions::CompletedSessions) }
+ attr_accessor :completed_sessions
+ sig {
+ params(completed_sessions: ::Stripe::PaymentLink::UpdateParams::Restrictions::CompletedSessions).void
+ }
+ def initialize(completed_sessions: nil); end
+ end
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ sig { returns(T::Array[String]) }
+ attr_accessor :allowed_countries
+ sig { params(allowed_countries: T::Array[String]).void }
+ def initialize(allowed_countries: nil); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(issuer: T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings::Issuer)).void
+ }
+ def initialize(issuer: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig {
+ returns(::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings::EndBehavior)
+ }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings))))
+ }
+ attr_accessor :trial_settings
+ sig {
+ 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
+ }
+ def initialize(
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :required
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
+ def initialize(enabled: nil, required: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Behavior after the purchase is complete.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AfterCompletion)) }
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # Configuration for automatic tax collection.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address_collection
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLink::UpdateParams::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText)) }
+ attr_accessor :custom_text
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation)) }
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::LineItem])) }
+ attr_accessor :line_items
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::PaymentIntentData)) }
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_collection
+ # 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).
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::PhoneNumberCollection)) }
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::Restrictions))))
+ }
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLink::UpdateParams::ShippingAddressCollection))))
+ }
+ attr_accessor :shipping_address_collection
+ # 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`).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :submit_type
+ # 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`.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::TaxIdCollection)) }
+ attr_accessor :tax_id_collection
+ sig {
+ 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
+ }
+ def initialize(
+ active: nil,
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil
+ ); end
+ end
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Creates a payment link.
+ sig {
+ params(params: T.any(::Stripe::PaymentLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of your payment links.
+ sig {
+ params(params: T.any(::Stripe::PaymentLink::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # 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.
+ sig {
+ params(params: T.any(::Stripe::PaymentLink::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_line_items(params = {}, opts = {}); end
+
+ # 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.
+ sig {
+ params(payment_link: String, params: T.any(::Stripe::PaymentLink::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_line_items(payment_link, params = {}, opts = {}); end
+
+ # Updates a payment link.
+ sig {
+ params(payment_link: String, params: T.any(::Stripe::PaymentLink::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
+ }
+ def self.update(payment_link, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi
new file mode 100644
index 00000000..9172c992
--- /dev/null
+++ b/rbi/stripe/resources/payment_method.rbi
@@ -0,0 +1,1822 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ class PaymentMethod < APIResource
+ class AcssDebit < Stripe::StripeObject
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Institution number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :institution_number
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Transit number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transit_number
+ end
+ class Affirm < Stripe::StripeObject; end
+ class AfterpayClearpay < Stripe::StripeObject; end
+ class Alipay < Stripe::StripeObject; end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBecsDebit < Stripe::StripeObject
+ # Six-digit number identifying bank and branch associated with this bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bsb_number
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class BacsDebit < Stripe::StripeObject
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_reader :sort_code
+ end
+ class Bancontact < Stripe::StripeObject; end
+ class Billie < Stripe::StripeObject; end
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Billing address.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ end
+ class Blik < Stripe::StripeObject; end
+ class Boleto < Stripe::StripeObject
+ # Uniquely identifies the customer tax id (CNPJ or CPF)
+ sig { returns(String) }
+ attr_reader :tax_id
+ end
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ end
+ class GeneratedFrom < Stripe::StripeObject
+ class PaymentMethodDetails < Stripe::StripeObject
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Receipt < Stripe::StripeObject
+ # The type of account being debited or credited
+ sig { returns(String) }
+ attr_reader :account_type
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_cryptogram
+ # Mnenomic of the Application Identifier.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application_preferred_name
+ # Identifier for this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # EMV tag 8A. A code returned by the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_response_code
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_verification_method
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dedicated_file_name
+ # The outcome of a series of EMV functions performed by the card reader.
+ sig { returns(T.nilable(String)) }
+ attr_reader :terminal_verification_results
+ # An indication of various EMV functions performed during the transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_status_information
+ end
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The authorized amount
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_authorized
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand_product
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
+ sig { returns(Integer) }
+ attr_reader :capture_before
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Authorization response cryptogram.
+ sig { returns(T.nilable(String)) }
+ attr_reader :emv_auth_data
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :generated_card
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
+ sig { returns(T::Boolean) }
+ attr_reader :incremental_authorization_supported
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_transaction_id
+ # Details about payments collected offline.
+ sig { returns(T.nilable(Offline)) }
+ attr_reader :offline
+ # Defines whether the authorized amount can be over-captured or not
+ sig { returns(T::Boolean) }
+ attr_reader :overcapture_supported
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
+ sig { returns(T.nilable(Receipt)) }
+ attr_reader :receipt
+ # Attribute for field wallet
+ sig { returns(Wallet) }
+ attr_reader :wallet
+ end
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The charge that created this object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :charge
+ # Transaction-specific details of the payment method used in the payment.
+ sig { returns(T.nilable(PaymentMethodDetails)) }
+ attr_reader :payment_method_details
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) }
+ attr_reader :setup_attempt
+ end
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ sig { returns(T::Array[String]) }
+ attr_reader :available
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ class ThreeDSecureUsage < Stripe::StripeObject
+ # Whether 3D Secure is supported on this card.
+ sig { returns(T::Boolean) }
+ attr_reader :supported
+ end
+ class Wallet < Stripe::StripeObject
+ class AmexExpressCheckout < Stripe::StripeObject; end
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+ class Masterpass < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(BillingAddress)) }
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ class SamsungPay < Stripe::StripeObject; end
+ class VisaCheckout < Stripe::StripeObject
+ class BillingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class ShippingAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(BillingAddress)) }
+ attr_reader :billing_address
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(ShippingAddress)) }
+ attr_reader :shipping_address
+ end
+ # Attribute for field amex_express_checkout
+ sig { returns(AmexExpressCheckout) }
+ attr_reader :amex_express_checkout
+ # Attribute for field apple_pay
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # (For tokenized numbers only.) The last four digits of the device account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :dynamic_last4
+ # Attribute for field google_pay
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field masterpass
+ sig { returns(Masterpass) }
+ attr_reader :masterpass
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field visa_checkout
+ sig { returns(VisaCheckout) }
+ attr_reader :visa_checkout
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :brand
+ # Checks on Card address and CVC if provided.
+ sig { returns(T.nilable(Checks)) }
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future.
+ sig { returns(T.nilable(String)) }
+ attr_reader :display_brand
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :funding
+ # Details of the original PaymentMethod that created this object.
+ sig { returns(T.nilable(GeneratedFrom)) }
+ attr_reader :generated_from
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(String) }
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # Status of a card based on the card issuer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :regulated_status
+ # Contains details on how this Card may be used for 3D Secure authentication.
+ sig { returns(T.nilable(ThreeDSecureUsage)) }
+ attr_reader :three_d_secure_usage
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ sig { returns(T.nilable(Wallet)) }
+ attr_reader :wallet
+ end
+ class CardPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ sig { returns(T::Array[String]) }
+ attr_reader :available
+ # The preferred network for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Wallet < Stripe::StripeObject
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand_product
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # Details about payment methods collected offline.
+ sig { returns(T.nilable(Offline)) }
+ attr_reader :offline
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # Attribute for field wallet
+ sig { returns(Wallet) }
+ attr_reader :wallet
+ end
+ class Cashapp < Stripe::StripeObject
+ # A unique and immutable identifier assigned by Cash App to every buyer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ # A public identifier for buyers using Cash App.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cashtag
+ end
+ class CustomerBalance < Stripe::StripeObject; end
+ class Eps < Stripe::StripeObject
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ end
+ class Fpx < Stripe::StripeObject
+ # Account holder type, if provided. Can be one of `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
+ sig { returns(String) }
+ attr_reader :bank
+ end
+ class Giropay < Stripe::StripeObject; end
+ class Grabpay < Stripe::StripeObject; end
+ class Ideal < Stripe::StripeObject
+ # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank, if the bank was provided.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ end
+ class InteracPresent < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
+ sig { returns(T::Array[String]) }
+ attr_reader :available
+ # The preferred network for the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ end
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cardholder_name
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ sig { returns(Integer) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(Integer) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Contains information about card networks that can be used to process the payment.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :preferred_locales
+ # How card details were read in this transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ end
+ class KakaoPay < Stripe::StripeObject; end
+ class Klarna < Stripe::StripeObject
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year of birth.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ # The customer's date of birth, if provided.
+ sig { returns(T.nilable(Dob)) }
+ attr_reader :dob
+ end
+ class Konbini < Stripe::StripeObject; end
+ class KrCard < Stripe::StripeObject
+ # The local credit or debit card brand.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # The last four digits of the card. This may not be present for American Express cards.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class Link < Stripe::StripeObject
+ # Account owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(String) }
+ attr_reader :persistent_token
+ end
+ class Mobilepay < Stripe::StripeObject; end
+ class Multibanco < Stripe::StripeObject; end
+ class NaverPay < Stripe::StripeObject
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :buyer_id
+ # Whether to fund this transaction with Naver Pay points or a card.
+ sig { returns(String) }
+ attr_reader :funding
+ end
+ class NzBankAccount < Stripe::StripeObject
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_name
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_reader :bank_code
+ # The name of the bank.
+ sig { returns(String) }
+ attr_reader :bank_name
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_reader :branch_code
+ # Last four digits of the bank account number.
+ sig { returns(String) }
+ attr_reader :last4
+ # The suffix of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :suffix
+ end
+ class Oxxo < Stripe::StripeObject; end
+ class P24 < Stripe::StripeObject
+ # The customer's bank, if provided.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ end
+ class PayByBank < Stripe::StripeObject; end
+ class Payco < Stripe::StripeObject; end
+ class Paynow < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Owner's email. Values are provided by PayPal directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_email
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payer_id
+ end
+ class Pix < Stripe::StripeObject; end
+ class Promptpay < Stripe::StripeObject; end
+ class RadarOptions < Stripe::StripeObject
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(String) }
+ attr_reader :session
+ end
+ class RevolutPay < Stripe::StripeObject; end
+ class SamsungPay < Stripe::StripeObject; end
+ class Satispay < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject
+ class GeneratedFrom < Stripe::StripeObject
+ # The ID of the Charge that generated this PaymentMethod, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :charge
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
+ sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) }
+ attr_reader :setup_attempt
+ end
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Branch code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_code
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Information about the object that generated this PaymentMethod.
+ sig { returns(T.nilable(GeneratedFrom)) }
+ attr_reader :generated_from
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class Sofort < Stripe::StripeObject
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ end
+ class Swish < Stripe::StripeObject; end
+ class Twint < Stripe::StripeObject; end
+ class UsBankAccount < Stripe::StripeObject
+ class Networks < Stripe::StripeObject
+ # The preferred network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred
+ # All supported networks.
+ sig { returns(T::Array[String]) }
+ attr_reader :supported
+ end
+ class StatusDetails < Stripe::StripeObject
+ class Blocked < Stripe::StripeObject
+ # The ACH network code that resulted in this block.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_code
+ # The reason why this PaymentMethod's fingerprint has been blocked
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ # Attribute for field blocked
+ sig { returns(Blocked) }
+ attr_reader :blocked
+ end
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # The name of the bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # The ID of the Financial Connections Account used to create the payment method.
+ sig { returns(T.nilable(String)) }
+ attr_reader :financial_connections_account
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Contains information about US bank account networks that can be used.
+ sig { returns(T.nilable(Networks)) }
+ attr_reader :networks
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ # Contains information about the future reusability of this PaymentMethod.
+ sig { returns(T.nilable(StatusDetails)) }
+ attr_reader :status_details
+ end
+ class WechatPay < Stripe::StripeObject; end
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # 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. The field defaults to “unspecified”.
+ sig { returns(String) }
+ attr_reader :allow_redisplay
+ # Attribute for field alma
+ sig { returns(Alma) }
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field billie
+ sig { returns(Billie) }
+ attr_reader :billie
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # Attribute for field blik
+ sig { returns(Blik) }
+ attr_reader :blik
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Attribute for field customer_balance
+ sig { returns(CustomerBalance) }
+ attr_reader :customer_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field fpx
+ sig { returns(Fpx) }
+ attr_reader :fpx
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field interac_present
+ sig { returns(InteracPresent) }
+ attr_reader :interac_present
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field konbini
+ sig { returns(Konbini) }
+ attr_reader :konbini
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Attribute for field mobilepay
+ sig { returns(Mobilepay) }
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field oxxo
+ sig { returns(Oxxo) }
+ attr_reader :oxxo
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field pay_by_bank
+ sig { returns(PayByBank) }
+ attr_reader :pay_by_bank
+ # Attribute for field payco
+ sig { returns(Payco) }
+ attr_reader :payco
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field pix
+ sig { returns(Pix) }
+ attr_reader :pix
+ # Attribute for field promptpay
+ sig { returns(Promptpay) }
+ attr_reader :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig { returns(RadarOptions) }
+ attr_reader :radar_options
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field samsung_pay
+ sig { returns(SamsungPay) }
+ attr_reader :samsung_pay
+ # Attribute for field satispay
+ sig { returns(Satispay) }
+ attr_reader :satispay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field twint
+ sig { returns(Twint) }
+ attr_reader :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ sig { returns(WechatPay) }
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ sig { returns(Zip) }
+ attr_reader :zip
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose PaymentMethods will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethod::CreateParams::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethod::CreateParams::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred
+ sig { params(preferred: T.nilable(String)).void }
+ def initialize(preferred: nil); end
+ end
+ # The card's CVC. It is highly recommended to always include this value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Card::Networks)) }
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :token
+ sig {
+ params(cvc: T.nilable(String), exp_month: T.nilable(Integer), exp_year: T.nilable(Integer), networks: T.nilable(::Stripe::PaymentMethod::CreateParams::Card::Networks), number: T.nilable(String), token: T.nilable(String)).void
+ }
+ def initialize(
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ networks: nil,
+ number: nil,
+ token: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Klarna::Dob)) }
+ attr_accessor :dob
+ sig { params(dob: T.nilable(::Stripe::PaymentMethod::CreateParams::Klarna::Dob)).void }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::AcssDebit)) }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::AfterpayClearpay)) }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::AmazonPay)) }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::AuBecsDebit)) }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::BacsDebit)) }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Bancontact)) }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::BillingDetails)) }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Card)) }
+ attr_accessor :card
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Cashapp)) }
+ attr_accessor :cashapp
+ # The `Customer` to whom the original PaymentMethod is attached.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::CustomerBalance)) }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Eps)) }
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Giropay)) }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Grabpay)) }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::InteracPresent)) }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::KakaoPay)) }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Konbini)) }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Mobilepay)) }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Multibanco)) }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::NaverPay)) }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::NzBankAccount)) }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::PayByBank)) }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Payco)) }
+ attr_accessor :payco
+ # The PaymentMethod to share.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Promptpay)) }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::RevolutPay)) }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::SamsungPay)) }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Satispay)) }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::SepaDebit)) }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::UsBankAccount)) }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::WechatPay)) }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethod::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethod::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethod::CreateParams::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentMethod::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethod::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethod::CreateParams::Billie), billing_details: T.nilable(::Stripe::PaymentMethod::CreateParams::BillingDetails), blik: T.nilable(::Stripe::PaymentMethod::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethod::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethod::CreateParams::Card), cashapp: T.nilable(::Stripe::PaymentMethod::CreateParams::Cashapp), customer: T.nilable(String), customer_balance: T.nilable(::Stripe::PaymentMethod::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethod::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethod::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethod::CreateParams::Giropay), grabpay: T.nilable(::Stripe::PaymentMethod::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethod::CreateParams::Ideal), interac_present: T.nilable(::Stripe::PaymentMethod::CreateParams::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::KakaoPay), klarna: T.nilable(::Stripe::PaymentMethod::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethod::CreateParams::Konbini), kr_card: T.nilable(::Stripe::PaymentMethod::CreateParams::KrCard), link: T.nilable(::Stripe::PaymentMethod::CreateParams::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentMethod::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethod::CreateParams::Multibanco), naver_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentMethod::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethod::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethod::CreateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethod::CreateParams::PayByBank), payco: T.nilable(::Stripe::PaymentMethod::CreateParams::Payco), payment_method: T.nilable(String), paynow: T.nilable(::Stripe::PaymentMethod::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethod::CreateParams::Paypal), pix: T.nilable(::Stripe::PaymentMethod::CreateParams::Pix), promptpay: T.nilable(::Stripe::PaymentMethod::CreateParams::Promptpay), radar_options: T.nilable(::Stripe::PaymentMethod::CreateParams::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::SamsungPay), satispay: T.nilable(::Stripe::PaymentMethod::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethod::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethod::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethod::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethod::CreateParams::Twint), type: T.nilable(String), us_bank_account: T.nilable(::Stripe::PaymentMethod::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethod::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethod::CreateParams::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ payment_method: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethod::UpdateParams::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethod::UpdateParams::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred
+ sig { params(preferred: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(preferred: nil); end
+ end
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::Card::Networks)) }
+ attr_accessor :networks
+ sig {
+ params(exp_month: T.nilable(Integer), exp_year: T.nilable(Integer), networks: T.nilable(::Stripe::PaymentMethod::UpdateParams::Card::Networks)).void
+ }
+ def initialize(exp_month: nil, exp_year: nil, networks: nil); end
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Bank account holder type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Bank account type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ sig { params(account_holder_type: T.nilable(String), account_type: T.nilable(String)).void }
+ def initialize(account_holder_type: nil, account_type: nil); end
+ end
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::BillingDetails)) }
+ attr_accessor :billing_details
+ # If this is a `card` PaymentMethod, this hash contains the user's card details.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::Card)) }
+ attr_accessor :card
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::PayByBank)) }
+ attr_accessor :pay_by_bank
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::UsBankAccount)) }
+ attr_accessor :us_bank_account
+ sig {
+ params(allow_redisplay: T.nilable(String), billing_details: T.nilable(::Stripe::PaymentMethod::UpdateParams::BillingDetails), card: T.nilable(::Stripe::PaymentMethod::UpdateParams::Card), expand: T.nilable(T::Array[String]), link: T.nilable(::Stripe::PaymentMethod::UpdateParams::Link), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), pay_by_bank: T.nilable(::Stripe::PaymentMethod::UpdateParams::PayByBank), us_bank_account: T.nilable(::Stripe::PaymentMethod::UpdateParams::UsBankAccount)).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ billing_details: nil,
+ card: nil,
+ expand: nil,
+ link: nil,
+ metadata: nil,
+ pay_by_bank: nil,
+ us_bank_account: nil
+ ); end
+ end
+ class AttachParams < Stripe::RequestParams
+ # The ID of the customer to which to attach the PaymentMethod.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(customer: String, expand: T.nilable(T::Array[String])).void }
+ def initialize(customer: nil, expand: nil); end
+ end
+ class DetachParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Attaches a PaymentMethod object to a Customer.
+ #
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
+ # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
+ # future use, which makes later declines and payment friction more likely.
+ # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
+ # future payments.
+ #
+ # To use this PaymentMethod as the default for invoice or subscription payments,
+ # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
+ # on the Customer to the PaymentMethod's ID.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethod::AttachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def attach(params = {}, opts = {}); end
+
+ # Attaches a PaymentMethod object to a Customer.
+ #
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
+ # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
+ # future use, which makes later declines and payment friction more likely.
+ # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
+ # future payments.
+ #
+ # To use this PaymentMethod as the default for invoice or subscription payments,
+ # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
+ # on the Customer to the PaymentMethod's ID.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethod::AttachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def self.attach(payment_method, params = {}, opts = {}); end
+
+ # Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
+ #
+ # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethod::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethod::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def detach(params = {}, opts = {}); end
+
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethod::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def self.detach(payment_method, params = {}, opts = {}); end
+
+ # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethod::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethod::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def self.update(payment_method, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/payment_method_configuration.rbi b/rbi/stripe/resources/payment_method_configuration.rbi
new file mode 100644
index 00000000..786c7670
--- /dev/null
+++ b/rbi/stripe/resources/payment_method_configuration.rbi
@@ -0,0 +1,3154 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios.
+ #
+ # There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges):
+ #
+ # **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect.
+ #
+ # **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter.
+ #
+ # Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API.
+ #
+ # Related guides:
+ # - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations)
+ # - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)
+ # - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations)
+ class PaymentMethodConfiguration < APIResource
+ class AcssDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Affirm < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class AfterpayClearpay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Alipay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Alma < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class AmazonPay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class ApplePay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class AuBecsDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class BacsDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Bancontact < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Billie < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Blik < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Boleto < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Card < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class CartesBancaires < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Cashapp < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class CustomerBalance < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Eps < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Fpx < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Giropay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class GooglePay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Grabpay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Ideal < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Jcb < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Klarna < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Konbini < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Link < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Mobilepay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Multibanco < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class NzBankAccount < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Oxxo < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class P24 < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class PayByBank < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Paynow < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Paypal < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Promptpay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class RevolutPay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Satispay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class SepaDebit < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Sofort < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Swish < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Twint < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class UsBankAccount < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class WechatPay < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ class Zip < Stripe::StripeObject
+ class DisplayPreference < Stripe::StripeObject
+ # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :overridable
+ # The account's display preference.
+ sig { returns(String) }
+ attr_reader :preference
+ # The effective display preference value.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ sig { returns(T::Boolean) }
+ attr_reader :available
+ # Attribute for field display_preference
+ sig { returns(DisplayPreference) }
+ attr_reader :display_preference
+ end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Whether the configuration can be used for new payments.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # Attribute for field alma
+ sig { returns(Alma) }
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field apple_pay
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # For child configs, the Connect application associated with the configuration.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field billie
+ sig { returns(Billie) }
+ attr_reader :billie
+ # Attribute for field blik
+ sig { returns(Blik) }
+ attr_reader :blik
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field cartes_bancaires
+ sig { returns(CartesBancaires) }
+ attr_reader :cartes_bancaires
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field customer_balance
+ sig { returns(CustomerBalance) }
+ attr_reader :customer_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field fpx
+ sig { returns(Fpx) }
+ attr_reader :fpx
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field google_pay
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # The default configuration is used whenever a payment method configuration is not specified.
+ sig { returns(T::Boolean) }
+ attr_reader :is_default
+ # Attribute for field jcb
+ sig { returns(Jcb) }
+ attr_reader :jcb
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field konbini
+ sig { returns(Konbini) }
+ attr_reader :konbini
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Attribute for field mobilepay
+ sig { returns(Mobilepay) }
+ attr_reader :mobilepay
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # The configuration's name.
+ sig { returns(String) }
+ attr_reader :name
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field oxxo
+ sig { returns(Oxxo) }
+ attr_reader :oxxo
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # For child configs, the configuration's parent configuration.
+ sig { returns(T.nilable(String)) }
+ attr_reader :parent
+ # Attribute for field pay_by_bank
+ sig { returns(PayByBank) }
+ attr_reader :pay_by_bank
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field promptpay
+ sig { returns(Promptpay) }
+ attr_reader :promptpay
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field satispay
+ sig { returns(Satispay) }
+ attr_reader :satispay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field twint
+ sig { returns(Twint) }
+ attr_reader :twint
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ # Attribute for field wechat_pay
+ sig { returns(WechatPay) }
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ sig { returns(Zip) }
+ attr_reader :zip
+ class ListParams < Stripe::RequestParams
+ # The Connect application to filter by.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :application
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(application: T.nilable(T.nilable(String)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ application: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Affirm::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Affirm::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alipay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alipay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alma::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alma::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Billie::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Billie::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Blik::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Blik::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Boleto::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Boleto::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Card::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Card::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Eps::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Eps::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Fpx::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Fpx::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Giropay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Giropay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Ideal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Ideal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Jcb::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Jcb::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Klarna::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Klarna::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Konbini::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Konbini::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Link::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Link::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::NzBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::NzBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::P24::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::P24::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::PayByBank::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::PayByBank::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paynow::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paynow::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paypal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paypal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Satispay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Satispay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Sofort::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Sofort::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Swish::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Swish::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Twint::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Twint::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Zip::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Zip::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit)) }
+ attr_accessor :acss_debit
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Affirm)) }
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alipay)) }
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alma)) }
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay)) }
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay)) }
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater)) }
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit)) }
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit)) }
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact)) }
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Billie)) }
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Blik)) }
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Boleto)) }
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Card)) }
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp)) }
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Eps)) }
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Fpx)) }
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Giropay)) }
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay)) }
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay)) }
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Ideal)) }
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Jcb)) }
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Klarna)) }
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Konbini)) }
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Link)) }
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay)) }
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco)) }
+ attr_accessor :multibanco
+ # Configuration name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::NzBankAccount)) }
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo)) }
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::P24)) }
+ attr_accessor :p24
+ # Configuration's parent configuration. Specify to create a child configuration.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :parent
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::PayByBank)) }
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paynow)) }
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paypal)) }
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay)) }
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay)) }
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Satispay)) }
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit)) }
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Sofort)) }
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Swish)) }
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Twint)) }
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount)) }
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay)) }
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alipay), alma: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay), apple_pay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay), apple_pay_later: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater), au_becs_debit: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Billie), blik: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Card), cartes_bancaires: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires), cashapp: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp), customer_balance: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Giropay), google_pay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay), grabpay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Ideal), jcb: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Jcb), klarna: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Konbini), link: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Link), mobilepay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco), name: T.nilable(String), nz_bank_account: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::P24), parent: T.nilable(String), pay_by_bank: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::PayByBank), paynow: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Paypal), promptpay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay), revolut_pay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay), satispay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Twint), us_bank_account: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodConfiguration::CreateParams::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ parent: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alma::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alma::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Billie::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Billie::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Blik::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Blik::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Card::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Card::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Eps::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Eps::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Link::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Link::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::NzBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::NzBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::P24::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::P24::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::PayByBank::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::PayByBank::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Satispay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Satispay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Swish::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Swish::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Twint::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Twint::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Zip::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Zip::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit)) }
+ attr_accessor :acss_debit
+ # Whether the configuration can be used for new payments.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm)) }
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay)) }
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alma)) }
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay)) }
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay)) }
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater)) }
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit)) }
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit)) }
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact)) }
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Billie)) }
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Blik)) }
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto)) }
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Card)) }
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp)) }
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Eps)) }
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx)) }
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay)) }
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay)) }
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay)) }
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal)) }
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb)) }
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna)) }
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini)) }
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Link)) }
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay)) }
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco)) }
+ attr_accessor :multibanco
+ # Configuration name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::NzBankAccount)) }
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo)) }
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::P24)) }
+ attr_accessor :p24
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::PayByBank)) }
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow)) }
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal)) }
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay)) }
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay)) }
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Satispay)) }
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit)) }
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort)) }
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Swish)) }
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Twint)) }
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount)) }
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay)) }
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit), active: T.nilable(T::Boolean), affirm: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay), alma: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay), apple_pay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay), apple_pay_later: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater), au_becs_debit: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Billie), blik: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Card), cartes_bancaires: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires), cashapp: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp), customer_balance: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay), google_pay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay), grabpay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal), jcb: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb), klarna: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini), link: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Link), mobilepay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco), name: T.nilable(String), nz_bank_account: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::PayByBank), paynow: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal), promptpay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay), revolut_pay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay), satispay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Twint), us_bank_account: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodConfiguration::UpdateParams::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ active: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ # Creates a payment method configuration
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodConfiguration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # List payment method configurations
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodConfiguration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Update payment method configuration
+ sig {
+ params(configuration: String, params: T.any(::Stripe::PaymentMethodConfiguration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration)
+ }
+ def self.update(configuration, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/payment_method_domain.rbi b/rbi/stripe/resources/payment_method_domain.rbi
new file mode 100644
index 00000000..e3e7c7f0
--- /dev/null
+++ b/rbi/stripe/resources/payment_method_domain.rbi
@@ -0,0 +1,212 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A payment method domain represents a web domain that you have registered with Stripe.
+ # Stripe Elements use registered payment method domains to control where certain payment methods are shown.
+ #
+ # Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
+ class PaymentMethodDomain < APIResource
+ class AmazonPay < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ end
+ class ApplePay < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ end
+ class GooglePay < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ end
+ class Link < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ end
+ class Paypal < Stripe::StripeObject
+ class StatusDetails < Stripe::StripeObject
+ # The error message associated with the status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :error_message
+ end
+ # The status of the payment method on the domain.
+ sig { returns(String) }
+ attr_reader :status
+ # Contains additional details about the status of a payment method for a specific payment method domain.
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ end
+ # Indicates the status of a specific payment method on a payment method domain.
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Indicates the status of a specific payment method on a payment method domain.
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The domain name that this payment method domain object represents.
+ sig { returns(String) }
+ attr_reader :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # Indicates the status of a specific payment method on a payment method domain.
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Indicates the status of a specific payment method on a payment method domain.
+ sig { returns(Link) }
+ attr_reader :link
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Indicates the status of a specific payment method on a payment method domain.
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ class ListParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(domain_name: T.nilable(String), enabled: 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
+ }
+ def initialize(
+ domain_name: nil,
+ enabled: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ sig { returns(String) }
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(domain_name: String, enabled: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(domain_name: nil, enabled: nil, expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(enabled: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
+ def initialize(enabled: nil, expand: nil); end
+ end
+ class ValidateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a payment method domain.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodDomain::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Lists the details of existing payment method domains.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodDomain::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates an existing payment method domain.
+ sig {
+ params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomain::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def self.update(payment_method_domain, params = {}, opts = {}); end
+
+ # Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
+ # The payment method doesn't appear in Elements or Embedded Checkout for this domain until it is active.
+ #
+ # To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint.
+ #
+ # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodDomain::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def validate(params = {}, opts = {}); end
+
+ # Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
+ # The payment method doesn't appear in Elements or Embedded Checkout for this domain until it is active.
+ #
+ # To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint.
+ #
+ # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
+ sig {
+ params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomain::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def self.validate(payment_method_domain, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/payout.rbi b/rbi/stripe/resources/payout.rbi
new file mode 100644
index 00000000..36b49a4c
--- /dev/null
+++ b/rbi/stripe/resources/payout.rbi
@@ -0,0 +1,300 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A `Payout` object is created when you receive funds from Stripe, or when you
+ # initiate a payout to either a bank account or debit card of a [connected
+ # Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
+ # and list all payouts. Payouts are made on [varying
+ # schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
+ # industry.
+ #
+ # Related guide: [Receiving payouts](https://stripe.com/docs/payouts)
+ class Payout < APIResource
+ class TraceId < Stripe::StripeObject
+ # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`.
+ sig { returns(String) }
+ attr_reader :status
+ # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :value
+ end
+ # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
+ sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) }
+ attr_reader :application_fee
+ # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :application_fee_amount
+ # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.
+ sig { returns(Integer) }
+ attr_reader :arrival_date
+ # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts).
+ sig { returns(T::Boolean) }
+ attr_reader :automatic
+ # ID of the balance transaction that describes the impact of this payout on your account balance.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # ID of the bank account or card the payout is sent to.
+ sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) }
+ attr_reader :destination
+ # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :failure_balance_transaction
+ # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures).
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_code
+ # Message that provides the reason for a payout failure, if available.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_message
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ sig { returns(String) }
+ attr_reader :method
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # If the payout reverses another, this is the ID of the original payout.
+ sig { returns(T.nilable(T.any(String, Stripe::Payout))) }
+ attr_reader :original_payout
+ # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout.
+ sig { returns(String) }
+ attr_reader :reconciliation_status
+ # If the payout reverses, this is the ID of the payout that reverses this payout.
+ sig { returns(T.nilable(T.any(String, Stripe::Payout))) }
+ attr_reader :reversed_by
+ # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`.
+ sig { returns(String) }
+ attr_reader :source_type
+ # Extra information about a payout that displays on the user's bank statement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`.
+ sig { returns(String) }
+ attr_reader :status
+ # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar.
+ sig { returns(T.nilable(TraceId)) }
+ attr_reader :trace_id
+ # Can be `bank_account` or `card`.
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ class ArrivalDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return payouts that are expected to arrive during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Payout::ListParams::ArrivalDate, Integer))) }
+ attr_accessor :arrival_date
+ # Only return payouts that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Payout::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # The ID of an external account - only return payouts sent to this external account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(arrival_date: T.nilable(T.any(::Stripe::Payout::ListParams::ArrivalDate, Integer)), created: T.nilable(T.any(::Stripe::Payout::ListParams::Created, Integer)), destination: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ arrival_date: nil,
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents representing how much to payout.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :method
+ # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source_type
+ # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), destination: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), method: T.nilable(String), source_type: T.nilable(String), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ method: nil,
+ source_type: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
+ sig {
+ params(params: T.any(::Stripe::Payout::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
+ sig {
+ params(payout: String, params: T.any(::Stripe::Payout::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def self.cancel(payout, params = {}, opts = {}); end
+
+ # To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
+ #
+ # If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode.
+ #
+ # If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type.
+ sig {
+ params(params: T.any(::Stripe::Payout::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
+ sig {
+ params(params: T.any(::Stripe::Payout::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead.
+ #
+ # By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
+ sig {
+ params(params: T.any(::Stripe::Payout::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def reverse(params = {}, opts = {}); end
+
+ # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead.
+ #
+ # By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
+ sig {
+ params(payout: String, params: T.any(::Stripe::Payout::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def self.reverse(payout, params = {}, opts = {}); end
+
+ # Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments.
+ sig {
+ params(payout: String, params: T.any(::Stripe::Payout::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def self.update(payout, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/person.rbi b/rbi/stripe/resources/person.rbi
new file mode 100644
index 00000000..e74cc688
--- /dev/null
+++ b/rbi/stripe/resources/person.rbi
@@ -0,0 +1,371 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # This is an object representing a person associated with a Stripe account.
+ #
+ # A platform can only access a subset of data in a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
+ #
+ # See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information).
+ class Person < APIResource
+ class AdditionalTosAcceptances < Stripe::StripeObject
+ class Account < Stripe::StripeObject
+ # The Unix timestamp marking when the legal guardian accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :date
+ # The IP address from which the legal guardian accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip
+ # The user agent of the browser from which the legal guardian accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :user_agent
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ sig { returns(T.nilable(Account)) }
+ attr_reader :account
+ end
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class AddressKana < Stripe::StripeObject
+ # City/Ward.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Block/Building number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # Town/cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_reader :town
+ end
+ class AddressKanji < Stripe::StripeObject
+ # City/Ward.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Block/Building number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # Town/cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_reader :town
+ end
+ class Dob < Stripe::StripeObject
+ # The day of birth, between 1 and 31.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :day
+ # The month of birth, between 1 and 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The four-digit year of birth.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :year
+ end
+ class FutureRequirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :original_fields_due
+ end
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ sig { returns(T.nilable(T::Array[Alternative])) }
+ attr_reader :alternatives
+ # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.
+ sig { returns(T::Array[String]) }
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T::Array[Error]) }
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.
+ sig { returns(T::Array[String]) }
+ attr_reader :eventually_due
+ # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T::Array[String]) }
+ attr_reader :pending_verification
+ end
+ class RegisteredAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class Relationship < Stripe::StripeObject
+ # Whether the person is the authorizer of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :executive
+ # Whether the person is the legal guardian of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_reader :title
+ end
+ class Requirements < Stripe::StripeObject
+ class Alternative < Stripe::StripeObject
+ # Fields that can be provided to satisfy all fields in `original_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :alternative_fields_due
+ # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
+ sig { returns(T::Array[String]) }
+ attr_reader :original_fields_due
+ end
+ class Error < Stripe::StripeObject
+ # The code for the type of error.
+ sig { returns(String) }
+ attr_reader :code
+ # An informative message that indicates the error type and provides additional details about the error.
+ sig { returns(String) }
+ attr_reader :reason
+ # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
+ sig { returns(String) }
+ attr_reader :requirement
+ end
+ # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
+ sig { returns(T.nilable(T::Array[Alternative])) }
+ attr_reader :alternatives
+ # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
+ sig { returns(T::Array[String]) }
+ attr_reader :currently_due
+ # Fields that are `currently_due` and need to be collected again because validation or verification failed.
+ sig { returns(T::Array[Error]) }
+ attr_reader :errors
+ # Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.
+ sig { returns(T::Array[String]) }
+ attr_reader :eventually_due
+ # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.
+ sig { returns(T::Array[String]) }
+ attr_reader :past_due
+ # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
+ sig { returns(T::Array[String]) }
+ attr_reader :pending_verification
+ end
+ class Verification < Stripe::StripeObject
+ class AdditionalDocument < Stripe::StripeObject
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :back
+ # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read".
+ sig { returns(T.nilable(String)) }
+ attr_reader :details
+ # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :details_code
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :front
+ end
+ class Document < Stripe::StripeObject
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :back
+ # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read".
+ sig { returns(T.nilable(String)) }
+ attr_reader :details
+ # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.
+ sig { returns(T.nilable(String)) }
+ attr_reader :details_code
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(T.any(String, Stripe::File))) }
+ attr_reader :front
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig { returns(T.nilable(AdditionalDocument)) }
+ attr_reader :additional_document
+ # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified".
+ sig { returns(T.nilable(String)) }
+ attr_reader :details
+ # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.
+ sig { returns(T.nilable(String)) }
+ attr_reader :details_code
+ # Attribute for field document
+ sig { returns(Document) }
+ attr_reader :document
+ # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.
+ sig { returns(String) }
+ attr_reader :status
+ end
+ # The account the person is associated with.
+ sig { returns(String) }
+ attr_reader :account
+ # Attribute for field additional_tos_acceptances
+ sig { returns(AdditionalTosAcceptances) }
+ attr_reader :additional_tos_acceptances
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The Kana variation of the person's address (Japan only).
+ sig { returns(T.nilable(AddressKana)) }
+ attr_reader :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ sig { returns(T.nilable(AddressKanji)) }
+ attr_reader :address_kanji
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Attribute for field dob
+ sig { returns(Dob) }
+ attr_reader :dob
+ # The person's email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # The person's first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name
+ # The Kana variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name_kana
+ # The Kanji variation of the person's first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :first_name_kanji
+ # A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T::Array[String]) }
+ attr_reader :full_name_aliases
+ # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
+ sig { returns(T.nilable(FutureRequirements)) }
+ attr_reader :future_requirements
+ # The person's gender.
+ sig { returns(T.nilable(String)) }
+ attr_reader :gender
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`).
+ sig { returns(T::Boolean) }
+ attr_reader :id_number_provided
+ # Whether the person's `id_number_secondary` was provided.
+ sig { returns(T::Boolean) }
+ attr_reader :id_number_secondary_provided
+ # The person's last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name
+ # The Kana variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name_kana
+ # The Kanji variation of the person's last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last_name_kanji
+ # The person's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :maiden_name
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The country where the person is a national.
+ sig { returns(T.nilable(String)) }
+ attr_reader :nationality
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The person's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(String) }
+ attr_reader :political_exposure
+ # Attribute for field registered_address
+ sig { returns(RegisteredAddress) }
+ attr_reader :registered_address
+ # Attribute for field relationship
+ sig { returns(Relationship) }
+ attr_reader :relationship
+ # Information about the requirements for this person, including what information needs to be collected, and by when.
+ sig { returns(T.nilable(Requirements)) }
+ attr_reader :requirements
+ # Whether the last four digits of the person's Social Security number have been provided (U.S. only).
+ sig { returns(T::Boolean) }
+ attr_reader :ssn_last_4_provided
+ # Attribute for field verification
+ sig { returns(Verification) }
+ attr_reader :verification
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi
new file mode 100644
index 00000000..22b23602
--- /dev/null
+++ b/rbi/stripe/resources/plan.rbi
@@ -0,0 +1,373 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
+ #
+ # Plans define the base price, currency, and billing cycle for recurring purchases of products.
+ # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
+ #
+ # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
+ class Plan < APIResource
+ class Tier < Stripe::StripeObject
+ # Price for the entire tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :flat_amount
+ # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :flat_amount_decimal
+ # Per unit price for units relevant to the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ # Up to and including to this quantity will be contained in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :up_to
+ end
+ class TransformUsage < Stripe::StripeObject
+ # Divide usage by this number.
+ sig { returns(Integer) }
+ attr_reader :divide_by
+ # After division, either round the result `up` or `down`.
+ sig { returns(String) }
+ attr_reader :round
+ end
+ # Whether the plan can be used for new purchases.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :amount_decimal
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ sig { returns(String) }
+ attr_reader :billing_scheme
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
+ sig { returns(Integer) }
+ attr_reader :interval_count
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # The meter tracking the usage of a metered price
+ sig { returns(T.nilable(String)) }
+ attr_reader :meter
+ # A brief description of the plan, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The product whose pricing this plan determines.
+ sig { returns(T.nilable(T.any(String, Stripe::Product))) }
+ attr_reader :product
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T::Array[Tier]) }
+ attr_reader :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
+ sig { returns(T.nilable(TransformUsage)) }
+ attr_reader :transform_usage
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ sig { returns(String) }
+ attr_reader :usage_type
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Whether the plan is currently available for new subscriptions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # A brief description of the plan, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nickname: T.nilable(String), product: T.nilable(String), trial_period_days: T.nilable(Integer)).void
+ }
+ def initialize(
+ active: nil,
+ expand: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ trial_period_days: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::Plan::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return plans for the given product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::Plan::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), product: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ product: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_label
+ sig {
+ params(active: T.nilable(T::Boolean), id: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: String, statement_descriptor: T.nilable(String), tax_code: T.nilable(String), unit_label: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ ); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ class TransformUsage < Stripe::RequestParams
+ # Divide usage by this number.
+ sig { returns(Integer) }
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ sig { returns(String) }
+ attr_accessor :round
+ sig { params(divide_by: Integer, round: String).void }
+ def initialize(divide_by: nil, round: nil); end
+ end
+ # Whether the plan is currently available for new subscriptions. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :amount_decimal
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_scheme
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The meter tracking the usage of a metered price
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # A brief description of the plan, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # Attribute for param field product
+ sig { returns(T.nilable(T.any(::Stripe::Plan::CreateParams::Product, String))) }
+ attr_accessor :product
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T.nilable(T::Array[::Stripe::Plan::CreateParams::Tier])) }
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ sig { returns(T.nilable(::Stripe::Plan::CreateParams::TransformUsage)) }
+ attr_accessor :transform_usage
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage_type
+ sig {
+ params(active: T.nilable(T::Boolean), amount: T.nilable(Integer), amount_decimal: T.nilable(String), billing_scheme: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), id: T.nilable(String), interval: String, interval_count: T.nilable(Integer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), meter: T.nilable(String), nickname: T.nilable(String), product: T.nilable(T.any(::Stripe::Plan::CreateParams::Product, String)), tiers: T.nilable(T::Array[::Stripe::Plan::CreateParams::Tier]), tiers_mode: T.nilable(String), transform_usage: T.nilable(::Stripe::Plan::CreateParams::TransformUsage), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ amount: nil,
+ amount_decimal: nil,
+ billing_scheme: nil,
+ currency: nil,
+ expand: nil,
+ id: nil,
+ interval: nil,
+ interval_count: nil,
+ metadata: nil,
+ meter: nil,
+ nickname: nil,
+ product: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transform_usage: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ ); end
+ end
+ # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
+ sig {
+ params(params: T.any(::Stripe::Plan::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deleting plans means new subscribers can't be added. Existing subscribers aren't affected.
+ sig {
+ params(plan: String, params: T.any(::Stripe::Plan::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def self.delete(plan, params = {}, opts = {}); end
+
+ # Deleting plans means new subscribers can't be added. Existing subscribers aren't affected.
+ sig {
+ params(params: T.any(::Stripe::Plan::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your plans.
+ sig {
+ params(params: T.any(::Stripe::Plan::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle.
+ sig {
+ params(plan: String, params: T.any(::Stripe::Plan::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def self.update(plan, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi
new file mode 100644
index 00000000..45973686
--- /dev/null
+++ b/rbi/stripe/resources/price.rbi
@@ -0,0 +1,694 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
+ # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
+ #
+ # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
+ class Price < APIResource
+ class CurrencyOptions < Stripe::StripeObject
+ class CustomUnitAmount < Stripe::StripeObject
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :preset
+ end
+ class Tier < Stripe::StripeObject
+ # Price for the entire tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :flat_amount
+ # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :flat_amount_decimal
+ # Per unit price for units relevant to the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ # Up to and including to this quantity will be contained in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :up_to
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig { returns(T.nilable(CustomUnitAmount)) }
+ attr_reader :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T::Array[Tier]) }
+ attr_reader :tiers
+ # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_amount
+ # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ end
+ class CustomUnitAmount < Stripe::StripeObject
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :preset
+ end
+ class Recurring < Stripe::StripeObject
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
+ sig { returns(Integer) }
+ attr_reader :interval_count
+ # The meter tracking the usage of a metered price
+ sig { returns(T.nilable(String)) }
+ attr_reader :meter
+ # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ sig { returns(String) }
+ attr_reader :usage_type
+ end
+ class Tier < Stripe::StripeObject
+ # Price for the entire tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :flat_amount
+ # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :flat_amount_decimal
+ # Per unit price for units relevant to the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_amount
+ # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ # Up to and including to this quantity will be contained in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :up_to
+ end
+ class TransformQuantity < Stripe::StripeObject
+ # Divide usage by this number.
+ sig { returns(Integer) }
+ attr_reader :divide_by
+ # After division, either round the result `up` or `down`.
+ sig { returns(String) }
+ attr_reader :round
+ end
+ # Whether the price can be used for new purchases.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ sig { returns(String) }
+ attr_reader :billing_scheme
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T::Hash[String, CurrencyOptions]) }
+ attr_reader :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig { returns(T.nilable(CustomUnitAmount)) }
+ attr_reader :custom_unit_amount
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_reader :lookup_key
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # A brief description of the price, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The ID of the product this price is associated with.
+ sig { returns(T.any(String, Stripe::Product)) }
+ attr_reader :product
+ # The recurring components of a price such as `interval` and `usage_type`.
+ sig { returns(T.nilable(Recurring)) }
+ attr_reader :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T::Array[Tier]) }
+ attr_reader :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
+ sig { returns(T.nilable(TransformQuantity)) }
+ attr_reader :transform_quantity
+ # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
+ sig { returns(String) }
+ attr_reader :type
+ # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :unit_amount
+ # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_amount_decimal
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Filter by billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Filter by the price's meter.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # Filter by the usage type for this price. Can be either `metered` or `licensed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage_type
+ sig {
+ params(interval: T.nilable(String), meter: T.nilable(String), usage_type: T.nilable(String)).void
+ }
+ def initialize(interval: nil, meter: nil, usage_type: nil); end
+ end
+ # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::Price::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return prices for the given currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :lookup_keys
+ # Only return prices for the given product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Only return prices with these recurring fields.
+ sig { returns(T.nilable(::Stripe::Price::ListParams::Recurring)) }
+ attr_accessor :recurring
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return prices of type `recurring` or `one_time`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::Price::ListParams::Created, Integer)), currency: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), lookup_keys: T.nilable(T::Array[String]), product: T.nilable(String), recurring: T.nilable(::Stripe::Price::ListParams::Recurring), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ product: nil,
+ recurring: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig { returns(T.nilable(::Stripe::Price::CreateParams::CurrencyOptions::CustomUnitAmount)) }
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T.nilable(T::Array[::Stripe::Price::CreateParams::CurrencyOptions::Tier])) }
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(custom_unit_amount: T.nilable(::Stripe::Price::CreateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::Price::CreateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class ProductData < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_label
+ sig {
+ params(active: T.nilable(T::Boolean), id: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: String, statement_descriptor: T.nilable(String), tax_code: T.nilable(String), unit_label: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ ); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # The meter tracking the usage of a metered price
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage_type
+ sig {
+ params(interval: String, interval_count: T.nilable(Integer), meter: T.nilable(String), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void
+ }
+ def initialize(
+ interval: nil,
+ interval_count: nil,
+ meter: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ ); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ class TransformQuantity < Stripe::RequestParams
+ # Divide usage by this number.
+ sig { returns(Integer) }
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ sig { returns(String) }
+ attr_accessor :round
+ sig { params(divide_by: Integer, round: String).void }
+ def initialize(divide_by: nil, round: nil); end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_scheme
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T.nilable(T::Hash[String, ::Stripe::Price::CreateParams::CurrencyOptions])) }
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig { returns(T.nilable(::Stripe::Price::CreateParams::CustomUnitAmount)) }
+ attr_accessor :custom_unit_amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # These fields can be used to create a new product that this price will belong to.
+ sig { returns(T.nilable(::Stripe::Price::CreateParams::ProductData)) }
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `usage_type`.
+ sig { returns(T.nilable(::Stripe::Price::CreateParams::Recurring)) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T.nilable(T::Array[::Stripe::Price::CreateParams::Tier])) }
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tiers_mode
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ sig { returns(T.nilable(::Stripe::Price::CreateParams::TransformQuantity)) }
+ attr_accessor :transform_quantity
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(active: T.nilable(T::Boolean), billing_scheme: T.nilable(String), currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Price::CreateParams::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::Price::CreateParams::CustomUnitAmount), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(String), product: T.nilable(String), product_data: T.nilable(::Stripe::Price::CreateParams::ProductData), recurring: T.nilable(::Stripe::Price::CreateParams::Recurring), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::Price::CreateParams::Tier]), tiers_mode: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean), transform_quantity: T.nilable(::Stripe::Price::CreateParams::TransformQuantity), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ billing_scheme: nil,
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transfer_lookup_key: nil,
+ transform_quantity: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig { returns(T.nilable(::Stripe::Price::UpdateParams::CurrencyOptions::CustomUnitAmount)) }
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T.nilable(T::Array[::Stripe::Price::UpdateParams::CurrencyOptions::Tier])) }
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(custom_unit_amount: T.nilable(::Stripe::Price::UpdateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::Price::UpdateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Hash[String, ::Stripe::Price::UpdateParams::CurrencyOptions]))))
+ }
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ sig {
+ params(active: T.nilable(T::Boolean), currency_options: T.nilable(T.nilable(T.any(String, T::Hash[String, ::Stripe::Price::UpdateParams::CurrencyOptions]))), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nickname: T.nilable(String), tax_behavior: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ active: nil,
+ currency_options: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ tax_behavior: nil,
+ transfer_lookup_key: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ # Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time.
+ sig {
+ params(params: T.any(::Stripe::Price::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
+ sig {
+ params(params: T.any(::Stripe::Price::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Price::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Price::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
+ sig {
+ params(price: String, params: T.any(::Stripe::Price::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price)
+ }
+ def self.update(price, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi
new file mode 100644
index 00000000..6050837f
--- /dev/null
+++ b/rbi/stripe/resources/product.rbi
@@ -0,0 +1,557 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Products describe the specific goods or services you offer to your customers.
+ # For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.
+ # They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),
+ # [share a Payment Link](https://stripe.com/docs/payment-links),
+ # [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),
+ # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)
+ class Product < APIResource
+ class MarketingFeature < Stripe::StripeObject
+ # The marketing feature name. Up to 80 characters long.
+ sig { returns(String) }
+ attr_reader :name
+ end
+ class PackageDimensions < Stripe::StripeObject
+ # Height, in inches.
+ sig { returns(Float) }
+ attr_reader :height
+ # Length, in inches.
+ sig { returns(Float) }
+ attr_reader :length
+ # Weight, in ounces.
+ sig { returns(Float) }
+ attr_reader :weight
+ # Width, in inches.
+ sig { returns(Float) }
+ attr_reader :width
+ end
+ # Whether the product is currently available for purchase.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ sig { returns(T.nilable(T.any(String, Stripe::Price))) }
+ attr_reader :default_price
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T::Array[String]) }
+ attr_reader :images
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ sig { returns(T::Array[MarketingFeature]) }
+ attr_reader :marketing_features
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The dimensions of this product for shipping purposes.
+ sig { returns(T.nilable(PackageDimensions)) }
+ attr_reader :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :shippable
+ # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) }
+ attr_reader :tax_code
+ # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.
+ sig { returns(String) }
+ attr_reader :type
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_reader :unit_label
+ # Time at which the object was last updated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :updated
+ # A URL of a publicly-accessible webpage for this product.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ sig { returns(String) }
+ attr_accessor :name
+ sig { params(name: String).void }
+ def initialize(name: nil); end
+ end
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :width
+ sig { params(height: Float, length: Float, weight: Float, width: Float).void }
+ def initialize(height: nil, length: nil, weight: nil, width: nil); end
+ end
+ # Whether the product is available for purchase.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_price
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Product::UpdateParams::MarketingFeature]))))
+ }
+ attr_accessor :marketing_features
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Product::UpdateParams::PackageDimensions))))
+ }
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :url
+ sig {
+ params(active: T.nilable(T::Boolean), default_price: T.nilable(String), description: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), images: T.nilable(T.nilable(T.any(String, T::Array[String]))), marketing_features: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Product::UpdateParams::MarketingFeature]))), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), package_dimensions: T.nilable(T.nilable(T.any(String, ::Stripe::Product::UpdateParams::PackageDimensions))), shippable: T.nilable(T::Boolean), statement_descriptor: T.nilable(String), tax_code: T.nilable(T.nilable(String)), unit_label: T.nilable(T.nilable(String)), url: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ active: nil,
+ default_price: nil,
+ description: nil,
+ expand: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil,
+ url: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return products that are active or inactive (e.g., pass `false` to list all inactive products).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Only return products that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Product::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :ids
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return products that can be shipped (i.e., physical, not digital products).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :shippable
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return products of this type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # Only return products with the given url.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::Product::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), ids: T.nilable(T::Array[String]), limit: T.nilable(Integer), shippable: T.nilable(T::Boolean), starting_after: T.nilable(String), type: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ ids: nil,
+ limit: nil,
+ shippable: nil,
+ starting_after: nil,
+ type: nil,
+ url: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DefaultPriceData < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig {
+ returns(T.nilable(::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount))
+ }
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::Tier]))
+ }
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(custom_unit_amount: T.nilable(::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig {
+ returns(T.nilable(::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount))
+ }
+ attr_accessor :custom_unit_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(T.nilable(::Stripe::Product::CreateParams::DefaultPriceData::Recurring)) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount), metadata: T.nilable(T::Hash[String, String]), recurring: T.nilable(::Stripe::Product::CreateParams::DefaultPriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ metadata: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ sig { returns(String) }
+ attr_accessor :name
+ sig { params(name: String).void }
+ def initialize(name: nil); end
+ end
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :width
+ sig { params(height: Float, length: Float, weight: Float, width: Float).void }
+ def initialize(height: nil, length: nil, weight: nil, width: nil); end
+ end
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
+ sig { returns(T.nilable(::Stripe::Product::CreateParams::DefaultPriceData)) }
+ attr_accessor :default_price_data
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ sig { returns(T.nilable(T::Array[::Stripe::Product::CreateParams::MarketingFeature])) }
+ attr_accessor :marketing_features
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ sig { returns(T.nilable(::Stripe::Product::CreateParams::PackageDimensions)) }
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. Only used for subscription payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(active: T.nilable(T::Boolean), default_price_data: T.nilable(::Stripe::Product::CreateParams::DefaultPriceData), description: T.nilable(String), expand: T.nilable(T::Array[String]), id: T.nilable(String), images: T.nilable(T::Array[String]), marketing_features: T.nilable(T::Array[::Stripe::Product::CreateParams::MarketingFeature]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::Product::CreateParams::PackageDimensions), shippable: T.nilable(T::Boolean), statement_descriptor: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String), unit_label: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ default_price_data: nil,
+ description: nil,
+ expand: nil,
+ id: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ type: nil,
+ unit_label: nil,
+ url: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ # Creates a new product object.
+ sig {
+ params(params: T.any(::Stripe::Product::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
+ sig {
+ params(id: String, params: T.any(::Stripe::Product::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def self.delete(id, params = {}, opts = {}); end
+
+ # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
+ sig {
+ params(params: T.any(::Stripe::Product::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
+ sig {
+ params(params: T.any(::Stripe::Product::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Product::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Product::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(id: String, params: T.any(::Stripe::Product::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def self.update(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/product_feature.rbi b/rbi/stripe/resources/product_feature.rbi
new file mode 100644
index 00000000..09a60cb3
--- /dev/null
+++ b/rbi/stripe/resources/product_feature.rbi
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A product_feature represents an attachment between a feature and a product.
+ # When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer.
+ class ProductFeature < APIResource
+ # A feature represents a monetizable ability or functionality in your system.
+ # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
+ sig { returns(Stripe::Entitlements::Feature) }
+ attr_reader :entitlement_feature
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/promotion_code.rbi b/rbi/stripe/resources/promotion_code.rbi
new file mode 100644
index 00000000..19e4af04
--- /dev/null
+++ b/rbi/stripe/resources/promotion_code.rbi
@@ -0,0 +1,261 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to
+ # create multiple codes for a single coupon.
+ class PromotionCode < APIResource
+ class Restrictions < Stripe::StripeObject
+ class CurrencyOptions < Stripe::StripeObject
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(Integer) }
+ attr_reader :minimum_amount
+ end
+ # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T::Hash[String, CurrencyOptions]) }
+ attr_reader :currency_options
+ # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ sig { returns(T::Boolean) }
+ attr_reader :first_time_transaction
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minimum_amount
+ # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ sig { returns(T.nilable(String)) }
+ attr_reader :minimum_amount_currency
+ end
+ # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ sig { returns(String) }
+ attr_reader :code
+ # A coupon contains information about a percent-off or amount-off discount you
+ # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
+ # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
+ sig { returns(Stripe::Coupon) }
+ attr_reader :coupon
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The customer that this promotion code can be used by.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Date at which the promotion code can no longer be redeemed.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Maximum number of times this promotion code can be redeemed.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :max_redemptions
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field restrictions
+ sig { returns(Restrictions) }
+ attr_reader :restrictions
+ # Number of times this promotion code has been used.
+ sig { returns(Integer) }
+ attr_reader :times_redeemed
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Filter promotion codes by whether they are active.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Only return promotion codes that have this case-insensitive code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Only return promotion codes for this coupon.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::PromotionCode::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return promotion codes that are restricted to this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), code: T.nilable(String), coupon: T.nilable(String), created: T.nilable(T.any(::Stripe::PromotionCode::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_amount
+ sig { params(minimum_amount: T.nilable(Integer)).void }
+ def initialize(minimum_amount: nil); end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::PromotionCode::CreateParams::Restrictions::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :first_time_transaction
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_amount
+ # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ sig { returns(T.nilable(String)) }
+ attr_accessor :minimum_amount_currency
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::PromotionCode::CreateParams::Restrictions::CurrencyOptions]), first_time_transaction: T.nilable(T::Boolean), minimum_amount: T.nilable(Integer), minimum_amount_currency: T.nilable(String)).void
+ }
+ def initialize(
+ currency_options: nil,
+ first_time_transaction: nil,
+ minimum_amount: nil,
+ minimum_amount_currency: nil
+ ); end
+ end
+ # Whether the promotion code is currently active.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ #
+ # If left blank, we will generate one automatically.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # The coupon for this promotion code.
+ sig { returns(String) }
+ attr_accessor :coupon
+ # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :max_redemptions
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ sig { returns(T.nilable(::Stripe::PromotionCode::CreateParams::Restrictions)) }
+ attr_accessor :restrictions
+ sig {
+ params(active: T.nilable(T::Boolean), code: T.nilable(String), coupon: String, customer: T.nilable(String), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), max_redemptions: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), restrictions: T.nilable(::Stripe::PromotionCode::CreateParams::Restrictions)).void
+ }
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ customer: nil,
+ expand: nil,
+ expires_at: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ restrictions: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_amount
+ sig { params(minimum_amount: T.nilable(Integer)).void }
+ def initialize(minimum_amount: nil); end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::PromotionCode::UpdateParams::Restrictions::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::PromotionCode::UpdateParams::Restrictions::CurrencyOptions])).void
+ }
+ def initialize(currency_options: nil); end
+ end
+ # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ sig { returns(T.nilable(::Stripe::PromotionCode::UpdateParams::Restrictions)) }
+ attr_accessor :restrictions
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), restrictions: T.nilable(::Stripe::PromotionCode::UpdateParams::Restrictions)).void
+ }
+ def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil); end
+ end
+ # A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
+ sig {
+ params(params: T.any(::Stripe::PromotionCode::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of your promotion codes.
+ sig {
+ params(params: T.any(::Stripe::PromotionCode::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
+ sig {
+ params(promotion_code: String, params: T.any(::Stripe::PromotionCode::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode)
+ }
+ def self.update(promotion_code, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi
new file mode 100644
index 00000000..1109331f
--- /dev/null
+++ b/rbi/stripe/resources/quote.rbi
@@ -0,0 +1,1123 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A Quote is a way to model prices that you'd like to provide to a customer.
+ # Once accepted, it will automatically create an invoice, subscription or subscription schedule.
+ class Quote < APIResource
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Automatically calculate taxes
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ # The status of the most recent automated tax calculation for this quote.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ end
+ class Computed < Stripe::StripeObject
+ class Recurring < Stripe::StripeObject
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ sig { returns(Stripe::Discount) }
+ attr_reader :discount
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ sig { returns(Integer) }
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ sig { returns(Breakdown) }
+ attr_reader :breakdown
+ end
+ # Total before any discounts or taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total after discounts and taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
+ sig { returns(Integer) }
+ attr_reader :interval_count
+ # Attribute for field total_details
+ sig { returns(TotalDetails) }
+ attr_reader :total_details
+ end
+ class Upfront < Stripe::StripeObject
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ sig { returns(Stripe::Discount) }
+ attr_reader :discount
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ sig { returns(Integer) }
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ sig { returns(Breakdown) }
+ attr_reader :breakdown
+ end
+ # Total before any discounts or taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total after discounts and taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :line_items
+ # Attribute for field total_details
+ sig { returns(TotalDetails) }
+ attr_reader :total_details
+ end
+ # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
+ sig { returns(T.nilable(Recurring)) }
+ attr_reader :recurring
+ # Attribute for field upfront
+ sig { returns(Upfront) }
+ attr_reader :upfront
+ end
+ class FromQuote < Stripe::StripeObject
+ # Whether this quote is a revision of a different quote.
+ sig { returns(T::Boolean) }
+ attr_reader :is_revision
+ # The quote that was cloned.
+ sig { returns(T.any(String, Stripe::Quote)) }
+ attr_reader :quote
+ end
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :days_until_due
+ # Attribute for field issuer
+ sig { returns(Issuer) }
+ attr_reader :issuer
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # The time that the quote was accepted. Measured in seconds since Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :accepted_at
+ # The time that the quote was canceled. Measured in seconds since Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # The time that the quote was finalized. Measured in seconds since Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :finalized_at
+ end
+ class SubscriptionData < Stripe::StripeObject
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_period_days
+ end
+ class TotalDetails < Stripe::StripeObject
+ class Breakdown < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # The amount discounted.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
+ # It contains information about when the discount began, when it will end, and what it is applied to.
+ #
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
+ sig { returns(Stripe::Discount) }
+ attr_reader :discount
+ end
+ class Tax < Stripe::StripeObject
+ # Amount of tax applied for this rate.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
+ #
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
+ sig { returns(Stripe::TaxRate) }
+ attr_reader :rate
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(T.nilable(String)) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :taxable_amount
+ end
+ # The aggregated discounts.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # The aggregated tax amounts by rate.
+ sig { returns(T::Array[Tax]) }
+ attr_reader :taxes
+ end
+ # This is the sum of all the discounts.
+ sig { returns(Integer) }
+ attr_reader :amount_discount
+ # This is the sum of all the shipping amounts.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount_shipping
+ # This is the sum of all the tax amounts.
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Attribute for field breakdown
+ sig { returns(Breakdown) }
+ attr_reader :breakdown
+ end
+ class TransferData < Stripe::StripeObject
+ # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ # Total before any discounts or taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_subtotal
+ # Total after discounts and taxes are applied.
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # ID of the Connect Application that created the quote.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # 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. Only applicable if there are no line items with recurring prices on the quote.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :application_fee_amount
+ # 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. Only applicable if there are line items with recurring prices on the quote.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(String) }
+ attr_reader :collection_method
+ # Attribute for field computed
+ sig { returns(Computed) }
+ attr_reader :computed
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # The tax rates applied to this quote.
+ sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) }
+ attr_reader :default_tax_rates
+ # A description that will be displayed on the quote PDF.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The discounts applied to this quote.
+ sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
+ attr_reader :discounts
+ # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # A footer that will be displayed on the quote PDF.
+ sig { returns(T.nilable(String)) }
+ attr_reader :footer
+ # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
+ sig { returns(T.nilable(FromQuote)) }
+ attr_reader :from_quote
+ # A header that will be displayed on the quote PDF.
+ sig { returns(T.nilable(String)) }
+ attr_reader :header
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The invoice that was created from this quote.
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
+ attr_reader :invoice
+ # Attribute for field invoice_settings
+ sig { returns(InvoiceSettings) }
+ attr_reader :invoice_settings
+ # A list of items the customer is being quoted for.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).
+ sig { returns(T.nilable(String)) }
+ attr_reader :number
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # 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.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # The status of the quote.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # The subscription that was created or updated from this quote.
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
+ attr_reader :subscription
+ # Attribute for field subscription_data
+ sig { returns(SubscriptionData) }
+ attr_reader :subscription_data
+ # The subscription schedule that was created or updated from this quote.
+ sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
+ attr_reader :subscription_schedule
+ # ID of the test clock this quote belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # Attribute for field total_details
+ sig { returns(TotalDetails) }
+ attr_reader :total_details
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose quotes will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the quote.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ sig {
+ params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Quote::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class FromQuote < Stripe::RequestParams
+ # Whether this quote is a revision of the previous quote.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_revision
+ # The `id` of the quote that will be cloned.
+ sig { returns(String) }
+ attr_accessor :quote
+ sig { params(is_revision: T.nilable(T::Boolean), quote: String).void }
+ def initialize(is_revision: nil, quote: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer)) }
+ attr_accessor :issuer
+ sig {
+ params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(days_until_due: nil, issuer: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring)) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The discounts applied to this line item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]))))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData)) }
+ attr_accessor :price_data
+ # The quantity of the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]))), price: T.nilable(String), price_data: T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :trial_period_days
+ sig {
+ params(description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ description: nil,
+ effective_date: nil,
+ metadata: nil,
+ trial_period_days: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig {
+ params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
+ }
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :application_fee_amount
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The discounts applied to the quote.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer
+ # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::FromQuote)) }
+ attr_accessor :from_quote
+ # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem])) }
+ attr_accessor :line_items
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # ID of the test clock to attach to the quote.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ # The data with which to automatically create a Transfer for each of the invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Quote::CreateParams::AutomaticTax), collection_method: T.nilable(String), customer: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), from_quote: T.nilable(::Stripe::Quote::CreateParams::FromQuote), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData), test_clock: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::TransferData)))).void
+ }
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ from_quote: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ test_clock: nil,
+ transfer_data: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer)) }
+ attr_accessor :issuer
+ sig {
+ params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(days_until_due: nil, issuer: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring)) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The discounts applied to this line item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]))))
+ }
+ attr_accessor :discounts
+ # The ID of an existing line item on the quote.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData)) }
+ attr_accessor :price_data
+ # The quantity of the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]))), id: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ id: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :trial_period_days
+ sig {
+ params(description: T.nilable(T.nilable(String)), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ description: nil,
+ effective_date: nil,
+ metadata: nil,
+ trial_period_days: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig {
+ params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
+ }
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :application_fee_amount
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The discounts applied to the quote.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer
+ # A header that will be displayed on the quote PDF.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem])) }
+ attr_accessor :line_items
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # The data with which to automatically create a Transfer for each of the invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Quote::UpdateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax), collection_method: T.nilable(String), customer: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::UpdateParams::TransferData)))).void
+ }
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ transfer_data: nil
+ ); end
+ end
+ class ListComputedUpfrontLineItemsParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class AcceptParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FinalizeQuoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ sig { params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer)).void }
+ def initialize(expand: nil, expires_at: nil); end
+ end
+ class PdfParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Accepts the specified quote.
+ sig {
+ params(params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def accept(params = {}, opts = {}); end
+
+ # Accepts the specified quote.
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def self.accept(quote, params = {}, opts = {}); end
+
+ # Cancels the quote.
+ sig {
+ params(params: T.any(::Stripe::Quote::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels the quote.
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def self.cancel(quote, params = {}, opts = {}); end
+
+ # A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
+ sig {
+ params(params: T.any(::Stripe::Quote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Finalizes the quote.
+ sig {
+ params(params: T.any(::Stripe::Quote::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def finalize_quote(params = {}, opts = {}); end
+
+ # Finalizes the quote.
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def self.finalize_quote(quote, params = {}, opts = {}); end
+
+ # Returns a list of your quotes.
+ sig {
+ params(params: T.any(::Stripe::Quote::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
+ sig {
+ params(params: T.any(::Stripe::Quote::ListComputedUpfrontLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_computed_upfront_line_items(params = {}, opts = {}); end
+
+ # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::ListComputedUpfrontLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_computed_upfront_line_items(quote, params = {}, opts = {}); end
+
+ # When retrieving a quote, 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.
+ sig {
+ params(params: T.any(::Stripe::Quote::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_line_items(params = {}, opts = {}); end
+
+ # When retrieving a quote, 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.
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_line_items(quote, params = {}, opts = {}); end
+
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
+ sig {
+ params(params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
+ }
+ def pdf(params = {}, opts = {}, &read_body_chunk_block); end
+
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
+ }
+ def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end
+
+ # A quote models prices and services for a customer.
+ sig {
+ params(quote: String, params: T.any(::Stripe::Quote::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def self.update(quote, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/radar/early_fraud_warning.rbi b/rbi/stripe/resources/radar/early_fraud_warning.rbi
new file mode 100644
index 00000000..58f42fce
--- /dev/null
+++ b/rbi/stripe/resources/radar/early_fraud_warning.rbi
@@ -0,0 +1,98 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Radar
+ # An early fraud warning indicates that the card issuer has notified us that a
+ # charge may be fraudulent.
+ #
+ # Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)
+ class EarlyFraudWarning < APIResource
+ # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.
+ sig { returns(T::Boolean) }
+ attr_reader :actionable
+ # ID of the charge this early fraud warning is for, optionally expanded.
+ sig { returns(T.any(String, Stripe::Charge)) }
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.
+ sig { returns(String) }
+ attr_reader :fraud_type
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the Payment Intent this early fraud warning is for, optionally expanded.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return early fraud warnings for the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return early fraud warnings that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Radar::EarlyFraudWarning::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::Radar::EarlyFraudWarning::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ # Returns a list of early fraud warnings.
+ sig {
+ params(params: T.any(::Stripe::Radar::EarlyFraudWarning::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/radar/value_list.rbi b/rbi/stripe/resources/radar/value_list.rbi
new file mode 100644
index 00000000..bbdc3087
--- /dev/null
+++ b/rbi/stripe/resources/radar/value_list.rbi
@@ -0,0 +1,170 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Radar
+ # Value lists allow you to group values together which can then be referenced in rules.
+ #
+ # Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items)
+ class ValueList < APIResource
+ # The name of the value list for use in rules.
+ sig { returns(String) }
+ attr_reader :alias
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The name or email address of the user who created this value list.
+ sig { returns(String) }
+ attr_reader :created_by
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
+ sig { returns(String) }
+ attr_reader :item_type
+ # List of items contained within this value list.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :list_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The name of the value list.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(alias_: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(String)).void
+ }
+ def initialize(alias_: nil, expand: nil, metadata: nil, name: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # The alias used to reference the value list when writing rules.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :alias
+ # A value contained within a value list - returns all value lists containing this value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :contains
+ # Only return value lists that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Radar::ValueList::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(alias_: T.nilable(String), contains: T.nilable(String), created: T.nilable(T.any(::Stripe::Radar::ValueList::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ alias_: nil,
+ contains: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ sig { returns(String) }
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :item_type
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ sig { returns(String) }
+ attr_accessor :name
+ sig {
+ params(alias_: String, expand: T.nilable(T::Array[String]), item_type: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: String).void
+ }
+ def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil); end
+ end
+ # Creates a new ValueList object, which can then be referenced in rules.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueList::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
+ sig {
+ params(value_list: String, params: T.any(::Stripe::Radar::ValueList::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def self.delete(value_list, params = {}, opts = {}); end
+
+ # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueList::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueList::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.
+ sig {
+ params(value_list: String, params: T.any(::Stripe::Radar::ValueList::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def self.update(value_list, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/radar/value_list_item.rbi b/rbi/stripe/resources/radar/value_list_item.rbi
new file mode 100644
index 00000000..987e7d73
--- /dev/null
+++ b/rbi/stripe/resources/radar/value_list_item.rbi
@@ -0,0 +1,131 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Radar
+ # Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
+ #
+ # Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)
+ class ValueListItem < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The name or email address of the user who added this item to the value list.
+ sig { returns(String) }
+ attr_reader :created_by
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The value of the item.
+ sig { returns(String) }
+ attr_reader :value
+ # The identifier of the value list this item belongs to.
+ sig { returns(String) }
+ attr_reader :value_list
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return items that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Radar::ValueListItem::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Return items belonging to the parent list whose value matches the specified value (using an "is like" match).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :value
+ # Identifier for the parent value list this item belongs to.
+ sig { returns(String) }
+ attr_accessor :value_list
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Radar::ValueListItem::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), value: T.nilable(String), value_list: String).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ value: nil,
+ value_list: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The value of the item (whose type must match the type of the parent value list).
+ sig { returns(String) }
+ attr_accessor :value
+ # The identifier of the value list which the created item will be added to.
+ sig { returns(String) }
+ attr_accessor :value_list
+ sig { params(expand: T.nilable(T::Array[String]), value: String, value_list: String).void }
+ def initialize(expand: nil, value: nil, value_list: nil); end
+ end
+ # Creates a new ValueListItem object, which is added to the specified parent value list.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListItem::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a ValueListItem object, removing it from its parent value list.
+ sig {
+ params(item: String, params: T.any(::Stripe::Radar::ValueListItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem)
+ }
+ def self.delete(item, params = {}, opts = {}); end
+
+ # Deletes a ValueListItem object, removing it from its parent value list.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListItem::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi
new file mode 100644
index 00000000..d5bcc0ec
--- /dev/null
+++ b/rbi/stripe/resources/refund.rbi
@@ -0,0 +1,516 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Refund objects allow you to refund a previously created charge that isn't
+ # refunded yet. Funds are refunded to the credit or debit card that's
+ # initially charged.
+ #
+ # Related guide: [Refunds](https://stripe.com/docs/refunds)
+ class Refund < APIResource
+ class DestinationDetails < Stripe::StripeObject
+ class Affirm < Stripe::StripeObject; end
+ class AfterpayClearpay < Stripe::StripeObject; end
+ class Alipay < Stripe::StripeObject; end
+ class Alma < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBankTransfer < Stripe::StripeObject; end
+ class Blik < Stripe::StripeObject
+ # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_decline_code
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class BrBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class Card < Stripe::StripeObject
+ # Value of the reference number assigned to the refund.
+ sig { returns(String) }
+ attr_reader :reference
+ # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(String) }
+ attr_reader :reference_status
+ # Type of the reference number assigned to the refund.
+ sig { returns(String) }
+ attr_reader :reference_type
+ # The type of refund. This can be `refund`, `reversal`, or `pending`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Cashapp < Stripe::StripeObject; end
+ class CustomerCashBalance < Stripe::StripeObject; end
+ class Eps < Stripe::StripeObject; end
+ class EuBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class GbBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class Giropay < Stripe::StripeObject; end
+ class Grabpay < Stripe::StripeObject; end
+ class JpBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class Klarna < Stripe::StripeObject; end
+ class Multibanco < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class MxBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class NzBankTransfer < Stripe::StripeObject; end
+ class P24 < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class Paynow < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject; end
+ class Pix < Stripe::StripeObject; end
+ class Revolut < Stripe::StripeObject; end
+ class Sofort < Stripe::StripeObject; end
+ class Swish < Stripe::StripeObject
+ # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network_decline_code
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class ThBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class UsBankTransfer < Stripe::StripeObject
+ # The reference assigned to the refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference_status
+ end
+ class WechatPay < Stripe::StripeObject; end
+ class Zip < Stripe::StripeObject; end
+ # Attribute for field affirm
+ sig { returns(Affirm) }
+ attr_reader :affirm
+ # Attribute for field afterpay_clearpay
+ sig { returns(AfterpayClearpay) }
+ attr_reader :afterpay_clearpay
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # Attribute for field alma
+ sig { returns(Alma) }
+ attr_reader :alma
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_bank_transfer
+ sig { returns(AuBankTransfer) }
+ attr_reader :au_bank_transfer
+ # Attribute for field blik
+ sig { returns(Blik) }
+ attr_reader :blik
+ # Attribute for field br_bank_transfer
+ sig { returns(BrBankTransfer) }
+ attr_reader :br_bank_transfer
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field customer_cash_balance
+ sig { returns(CustomerCashBalance) }
+ attr_reader :customer_cash_balance
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # Attribute for field eu_bank_transfer
+ sig { returns(EuBankTransfer) }
+ attr_reader :eu_bank_transfer
+ # Attribute for field gb_bank_transfer
+ sig { returns(GbBankTransfer) }
+ attr_reader :gb_bank_transfer
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Attribute for field grabpay
+ sig { returns(Grabpay) }
+ attr_reader :grabpay
+ # Attribute for field jp_bank_transfer
+ sig { returns(JpBankTransfer) }
+ attr_reader :jp_bank_transfer
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # Attribute for field mx_bank_transfer
+ sig { returns(MxBankTransfer) }
+ attr_reader :mx_bank_transfer
+ # Attribute for field nz_bank_transfer
+ sig { returns(NzBankTransfer) }
+ attr_reader :nz_bank_transfer
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field paynow
+ sig { returns(Paynow) }
+ attr_reader :paynow
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field pix
+ sig { returns(Pix) }
+ attr_reader :pix
+ # Attribute for field revolut
+ sig { returns(Revolut) }
+ attr_reader :revolut
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field swish
+ sig { returns(Swish) }
+ attr_reader :swish
+ # Attribute for field th_bank_transfer
+ sig { returns(ThBankTransfer) }
+ attr_reader :th_bank_transfer
+ # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_transfer
+ sig { returns(UsBankTransfer) }
+ attr_reader :us_bank_transfer
+ # Attribute for field wechat_pay
+ sig { returns(WechatPay) }
+ attr_reader :wechat_pay
+ # Attribute for field zip
+ sig { returns(Zip) }
+ attr_reader :zip
+ end
+ class NextAction < Stripe::StripeObject
+ class DisplayDetails < Stripe::StripeObject
+ class EmailSent < Stripe::StripeObject
+ # The timestamp when the email was sent.
+ sig { returns(Integer) }
+ attr_reader :email_sent_at
+ # The recipient's email address.
+ sig { returns(String) }
+ attr_reader :email_sent_to
+ end
+ # Attribute for field email_sent
+ sig { returns(EmailSent) }
+ attr_reader :email_sent
+ # The expiry timestamp.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ end
+ # Attribute for field display_details
+ sig { returns(DisplayDetails) }
+ attr_reader :display_details
+ # Type of the next action to perform.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class PresentmentDetails < Stripe::StripeObject
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
+ sig { returns(Integer) }
+ attr_reader :presentment_amount
+ # Currency presented to the customer during payment.
+ sig { returns(String) }
+ attr_reader :presentment_currency
+ end
+ # Amount, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Balance transaction that describes the impact on your account balance.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # ID of the charge that's refunded.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :charge
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
+ sig { returns(String) }
+ attr_reader :description
+ # Attribute for field destination_details
+ sig { returns(DestinationDetails) }
+ attr_reader :destination_details
+ # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
+ sig { returns(T.any(String, Stripe::BalanceTransaction)) }
+ attr_reader :failure_balance_transaction
+ # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.
+ sig { returns(String) }
+ attr_reader :failure_reason
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
+ sig { returns(String) }
+ attr_reader :instructions_email
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Attribute for field next_action
+ sig { returns(NextAction) }
+ attr_reader :next_action
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the PaymentIntent that's refunded.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) }
+ attr_reader :payment_intent
+ # Attribute for field presentment_details
+ sig { returns(PresentmentDetails) }
+ attr_reader :presentment_details
+ # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ # This is the transaction number that appears on email receipts sent for this refund.
+ sig { returns(T.nilable(String)) }
+ attr_reader :receipt_number
+ # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.
+ sig { returns(T.nilable(T.any(String, Stripe::Reversal))) }
+ attr_reader :source_transfer_reversal
+ # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.
+ sig { returns(T.nilable(T.any(String, Stripe::Reversal))) }
+ attr_reader :transfer_reversal
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return refunds for the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return refunds that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Refund::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return refunds for the PaymentIntent specified by this ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::Refund::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field amount
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The identifier of the charge to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Customer whose customer balance to refund from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :instructions_email
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Origin of the refund
+ sig { returns(T.nilable(String)) }
+ attr_accessor :origin
+ # The identifier of the PaymentIntent to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_application_fee
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :reverse_transfer
+ sig {
+ params(amount: T.nilable(Integer), charge: T.nilable(String), currency: T.nilable(String), customer: T.nilable(String), expand: T.nilable(T::Array[String]), instructions_email: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), origin: T.nilable(String), payment_intent: T.nilable(String), reason: T.nilable(String), refund_application_fee: T.nilable(T::Boolean), reverse_transfer: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ charge: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ instructions_email: nil,
+ metadata: nil,
+ origin: nil,
+ payment_intent: nil,
+ reason: nil,
+ refund_application_fee: nil,
+ reverse_transfer: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels a refund with a status of requires_action.
+ #
+ # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
+ sig {
+ params(params: T.any(::Stripe::Refund::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels a refund with a status of requires_action.
+ #
+ # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
+ sig {
+ params(refund: String, params: T.any(::Stripe::Refund::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def self.cancel(refund, params = {}, opts = {}); end
+
+ # When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
+ #
+ # Creating a new refund will refund a charge that has previously been created but not yet refunded.
+ # Funds will be refunded to the credit or debit card that was originally charged.
+ #
+ # You can optionally refund only part of a charge.
+ # You can do so multiple times, until the entire charge has been refunded.
+ #
+ # Once entirely refunded, a charge can't be refunded again.
+ # This method will raise an error when called on an already-refunded charge,
+ # or when trying to refund more money than is left on a charge.
+ sig {
+ params(params: T.any(::Stripe::Refund::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.
+ sig {
+ params(params: T.any(::Stripe::Refund::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged.
+ #
+ # This request only accepts metadata as an argument.
+ sig {
+ params(refund: String, params: T.any(::Stripe::Refund::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def self.update(refund, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/reporting/report_run.rbi b/rbi/stripe/resources/reporting/report_run.rbi
new file mode 100644
index 00000000..fa17ecea
--- /dev/null
+++ b/rbi/stripe/resources/reporting/report_run.rbi
@@ -0,0 +1,191 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Reporting
+ # The Report Run object represents an instance of a report type generated with
+ # specific run parameters. Once the object is created, Stripe begins processing the report.
+ # When the report has finished running, it will give you a reference to a file
+ # where you can retrieve your results. For an overview, see
+ # [API Access to Reports](https://stripe.com/docs/reporting/statements/api).
+ #
+ # Note that certain report types can only be run based on your live-mode data (not test-mode
+ # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
+ class ReportRun < APIResource
+ class Parameters < Stripe::StripeObject
+ # The set of output columns requested for inclusion in the report run.
+ sig { returns(T::Array[String]) }
+ attr_reader :columns
+ # Connected account ID by which to filter the report run.
+ sig { returns(String) }
+ attr_reader :connected_account
+ # Currency of objects to be included in the report run.
+ sig { returns(String) }
+ attr_reader :currency
+ # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value.
+ sig { returns(Integer) }
+ attr_reader :interval_end
+ # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value.
+ sig { returns(Integer) }
+ attr_reader :interval_start
+ # Payout ID by which to filter the report run.
+ sig { returns(String) }
+ attr_reader :payout
+ # Category of balance transactions to be included in the report run.
+ sig { returns(String) }
+ attr_reader :reporting_category
+ # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ sig { returns(String) }
+ attr_reader :timezone
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # If something should go wrong during the run, a message about the failure (populated when
+ # `status=failed`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :error
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # `true` if the report is run on live mode data and `false` if it is run on test mode data.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field parameters
+ sig { returns(Parameters) }
+ attr_reader :parameters
+ # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`.
+ sig { returns(String) }
+ attr_reader :report_type
+ # The file object representing the result of the report run (populated when
+ # `status=succeeded`).
+ sig { returns(T.nilable(Stripe::File)) }
+ attr_reader :result
+ # Status of this report run. This will be `pending` when the run is initially created.
+ # When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
+ # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
+ sig { returns(String) }
+ attr_reader :status
+ # Timestamp at which this run successfully finished (populated when
+ # `status=succeeded`). Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :succeeded_at
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return Report Runs that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Reporting::ReportRun::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Reporting::ReportRun::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Parameters < Stripe::RequestParams
+ # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :columns
+ # Connected account ID to filter for in the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :connected_account
+ # Currency of objects to be included in the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Ending timestamp of data to be included in the report run (exclusive).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_end
+ # Starting timestamp of data to be included in the report run.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_start
+ # Payout ID by which to filter the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payout
+ # Category of balance transactions to be included in the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reporting_category
+ # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :timezone
+ sig {
+ params(columns: T.nilable(T::Array[String]), connected_account: T.nilable(String), currency: T.nilable(String), interval_end: T.nilable(Integer), interval_start: T.nilable(Integer), payout: T.nilable(String), reporting_category: T.nilable(String), timezone: T.nilable(String)).void
+ }
+ def initialize(
+ columns: nil,
+ connected_account: nil,
+ currency: nil,
+ interval_end: nil,
+ interval_start: nil,
+ payout: nil,
+ reporting_category: nil,
+ timezone: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
+ sig { returns(T.nilable(::Stripe::Reporting::ReportRun::CreateParams::Parameters)) }
+ attr_accessor :parameters
+ # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.
+ sig { returns(String) }
+ attr_accessor :report_type
+ sig {
+ params(expand: T.nilable(T::Array[String]), parameters: T.nilable(::Stripe::Reporting::ReportRun::CreateParams::Parameters), report_type: String).void
+ }
+ def initialize(expand: nil, parameters: nil, report_type: nil); end
+ end
+ # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
+ sig {
+ params(params: T.any(::Stripe::Reporting::ReportRun::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportRun)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of Report Runs, with the most recent appearing first.
+ sig {
+ params(params: T.any(::Stripe::Reporting::ReportRun::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/reporting/report_type.rbi b/rbi/stripe/resources/reporting/report_type.rbi
new file mode 100644
index 00000000..2f78e889
--- /dev/null
+++ b/rbi/stripe/resources/reporting/report_type.rbi
@@ -0,0 +1,57 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Reporting
+ # The Report Type resource corresponds to a particular type of report, such as
+ # the "Activity summary" or "Itemized payouts" reports. These objects are
+ # identified by an ID belonging to a set of enumerated values. See
+ # [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api)
+ # for those Report Type IDs, along with required and optional parameters.
+ #
+ # Note that certain report types can only be run based on your live-mode data (not test-mode
+ # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).
+ class ReportType < APIResource
+ # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :data_available_end
+ # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :data_available_start
+ # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :default_columns
+ # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Human-readable name of the Report Type
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # When this Report Type was latest updated. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :updated
+ # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
+ sig { returns(Integer) }
+ attr_reader :version
+ class ListParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a full list of Report Types.
+ sig {
+ params(params: T.any(::Stripe::Reporting::ReportType::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/reserve_transaction.rbi b/rbi/stripe/resources/reserve_transaction.rbi
new file mode 100644
index 00000000..4748d8af
--- /dev/null
+++ b/rbi/stripe/resources/reserve_transaction.rbi
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ReserveTransaction < APIResource
+ # Attribute for field amount
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/reversal.rbi b/rbi/stripe/resources/reversal.rbi
new file mode 100644
index 00000000..4e79bbbd
--- /dev/null
+++ b/rbi/stripe/resources/reversal.rbi
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a
+ # connected account, either entirely or partially, and can also specify whether
+ # to refund any related application fees. Transfer reversals add to the
+ # platform's balance and subtract from the destination account's balance.
+ #
+ # Reversing a transfer that was made for a [destination
+ # charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of
+ # the charge. It is possible to reverse a
+ # [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options)
+ # transfer only if the destination account has enough balance to cover the
+ # reversal.
+ #
+ # Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers)
+ class Reversal < APIResource
+ # Amount, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Balance transaction that describes the impact on your account balance.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Linked payment refund for the transfer reversal.
+ sig { returns(T.nilable(T.any(String, Stripe::Refund))) }
+ attr_reader :destination_payment_refund
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # ID of the refund responsible for the transfer reversal.
+ sig { returns(T.nilable(T.any(String, Stripe::Refund))) }
+ attr_reader :source_refund
+ # ID of the transfer that was reversed.
+ sig { returns(T.any(String, Stripe::Transfer)) }
+ attr_reader :transfer
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/review.rbi b/rbi/stripe/resources/review.rbi
new file mode 100644
index 00000000..5e1c1b21
--- /dev/null
+++ b/rbi/stripe/resources/review.rbi
@@ -0,0 +1,154 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Reviews can be used to supplement automated fraud detection with human expertise.
+ #
+ # Learn more about [Radar](https://stripe.com/radar) and reviewing payments
+ # [here](https://stripe.com/docs/radar/reviews).
+ class Review < APIResource
+ class IpAddressLocation < Stripe::StripeObject
+ # The city where the payment originated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter ISO code representing the country where the payment originated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # The geographic latitude where the payment originated.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :latitude
+ # The geographic longitude where the payment originated.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :longitude
+ # The state/county/province/region where the payment originated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :region
+ end
+ class Session < Stripe::StripeObject
+ # The browser used in this browser session (e.g., `Chrome`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :browser
+ # Information about the device used for the browser session (e.g., `Samsung SM-G930T`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :device
+ # The platform for the browser session (e.g., `Macintosh`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :platform
+ # The version for the browser session (e.g., `61.0.3163.100`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :version
+ end
+ # The ZIP or postal code of the card used, if applicable.
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_zip
+ # The charge associated with this review.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :charge
+ # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :closed_reason
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The IP address where the payment originated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
+ sig { returns(T.nilable(IpAddressLocation)) }
+ attr_reader :ip_address_location
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # If `true`, the review needs action.
+ sig { returns(T::Boolean) }
+ attr_reader :open
+ # The reason the review was opened. One of `rule` or `manual`.
+ sig { returns(String) }
+ attr_reader :opened_reason
+ # The PaymentIntent ID associated with this review, if one exists.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, `redacted`, or `canceled`.
+ sig { returns(String) }
+ attr_reader :reason
+ # Information related to the browsing session of the user who initiated the payment.
+ sig { returns(T.nilable(Session)) }
+ attr_reader :session
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return reviews that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Review::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Review::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class ApproveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Approves a Review object, closing it and removing it from the list of reviews.
+ sig {
+ params(params: T.any(::Stripe::Review::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review)
+ }
+ def approve(params = {}, opts = {}); end
+
+ # Approves a Review object, closing it and removing it from the list of reviews.
+ sig {
+ params(review: String, params: T.any(::Stripe::Review::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review)
+ }
+ def self.approve(review, params = {}, opts = {}); end
+
+ # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Review::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi
new file mode 100644
index 00000000..95fffc93
--- /dev/null
+++ b/rbi/stripe/resources/setup_attempt.rbi
@@ -0,0 +1,477 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A SetupAttempt describes one attempted confirmation of a SetupIntent,
+ # whether that confirmation is successful or unsuccessful. You can use
+ # SetupAttempts to inspect details of a specific attempt at setting up a
+ # payment method using a SetupIntent.
+ class SetupAttempt < APIResource
+ class PaymentMethodDetails < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject; end
+ class AmazonPay < Stripe::StripeObject; end
+ class AuBecsDebit < Stripe::StripeObject; end
+ class BacsDebit < Stripe::StripeObject; end
+ class Bancontact < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ # Can be one of `en`, `de`, `fr`, or `nl`
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by Bancontact directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class Boleto < Stripe::StripeObject; end
+ class Card < Stripe::StripeObject
+ class Checks < Stripe::StripeObject
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_postal_code_check
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ end
+ class ThreeDSecure < Stripe::StripeObject
+ # For authenticated transactions: how the customer was authenticated by
+ # the issuing bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :authentication_flow
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
+ # indicating what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :electronic_commerce_indicator
+ # Indicates the outcome of 3D Secure authentication.
+ sig { returns(T.nilable(String)) }
+ attr_reader :result
+ # Additional information about why 3D Secure succeeded or failed based
+ # on the `result`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :result_reason
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
+ # (dsTransId) for this payment.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_id
+ # The version of 3D Secure that was used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :version
+ end
+ class Wallet < Stripe::StripeObject
+ class ApplePay < Stripe::StripeObject; end
+ class GooglePay < Stripe::StripeObject; end
+ # Attribute for field apple_pay
+ sig { returns(ApplePay) }
+ attr_reader :apple_pay
+ # Attribute for field google_pay
+ sig { returns(GooglePay) }
+ attr_reader :google_pay
+ # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Check results by Card networks on Card address and CVC at the time of authorization
+ sig { returns(T.nilable(Checks)) }
+ attr_reader :checks
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+ #
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :iin
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuer
+ # The last four digits of the card.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # Populated if this authorization used 3D Secure authentication.
+ sig { returns(T.nilable(ThreeDSecure)) }
+ attr_reader :three_d_secure
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
+ sig { returns(T.nilable(Wallet)) }
+ attr_reader :wallet
+ end
+ class CardPresent < Stripe::StripeObject
+ class Offline < Stripe::StripeObject
+ # Time at which the payment was collected while offline
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :stored_at
+ # The method used to process this payment method offline. Only deferred is allowed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # The ID of the Card PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_card
+ # Details about payments collected offline.
+ sig { returns(T.nilable(Offline)) }
+ attr_reader :offline
+ end
+ class Cashapp < Stripe::StripeObject; end
+ class Ideal < Stripe::StripeObject
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # The Bank Identifier Code of the customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Owner's verified full name. Values are verified or provided by iDEAL directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class KakaoPay < Stripe::StripeObject; end
+ class Klarna < Stripe::StripeObject; end
+ class KrCard < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject; end
+ class NaverPay < Stripe::StripeObject
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
+ sig { returns(String) }
+ attr_reader :buyer_id
+ end
+ class NzBankAccount < Stripe::StripeObject; end
+ class Paypal < Stripe::StripeObject; end
+ class RevolutPay < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject; end
+ class Sofort < Stripe::StripeObject
+ # Bank code of bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Bank Identifier Code of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :generated_sepa_debit
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :generated_sepa_debit_mandate
+ # Last four characters of the IBAN.
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Preferred language of the Sofort authorization page that the customer is redirected to.
+ # Can be one of `en`, `de`, `fr`, or `nl`
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Owner's verified full name. Values are verified or provided by Sofort directly
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ class UsBankAccount < Stripe::StripeObject; end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field boleto
+ sig { returns(Boleto) }
+ attr_reader :boleto
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # Attribute for field cashapp
+ sig { returns(Cashapp) }
+ attr_reader :cashapp
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field kakao_pay
+ sig { returns(KakaoPay) }
+ attr_reader :kakao_pay
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Attribute for field kr_card
+ sig { returns(KrCard) }
+ attr_reader :kr_card
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field naver_pay
+ sig { returns(NaverPay) }
+ attr_reader :naver_pay
+ # Attribute for field nz_bank_account
+ sig { returns(NzBankAccount) }
+ attr_reader :nz_bank_account
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field revolut_pay
+ sig { returns(RevolutPay) }
+ attr_reader :revolut_pay
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class SetupError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ sig { returns(String) }
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ sig { returns(String) }
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ sig { returns(String) }
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ sig { returns(String) }
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ sig { returns(String) }
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ sig { returns(Stripe::PaymentIntent) }
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ sig { returns(Stripe::PaymentMethod) }
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ sig { returns(String) }
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ sig { returns(String) }
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ sig { returns(Stripe::SetupIntent) }
+ attr_reader :setup_intent
+ # Attribute for field source
+ sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) }
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T::Boolean) }
+ attr_reader :attach_to_self
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :flow_directions
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # ID of the payment method used with this SetupAttempt.
+ sig { returns(T.any(String, Stripe::PaymentMethod)) }
+ attr_reader :payment_method
+ # Attribute for field payment_method_details
+ sig { returns(PaymentMethodDetails) }
+ attr_reader :payment_method_details
+ # The error encountered during this attempt to confirm the SetupIntent, if any.
+ sig { returns(T.nilable(SetupError)) }
+ attr_reader :setup_error
+ # ID of the SetupIntent that this attempt belongs to.
+ sig { returns(T.any(String, Stripe::SetupIntent)) }
+ attr_reader :setup_intent
+ # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
+ sig { returns(String) }
+ attr_reader :status
+ # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.
+ sig { returns(String) }
+ attr_reader :usage
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A filter on the list, based on the object `created` field. The value
+ # can be a string with an integer Unix timestamp or a
+ # dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::SetupAttempt::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return SetupAttempts created by the SetupIntent specified by
+ # this ID.
+ sig { returns(String) }
+ attr_accessor :setup_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::SetupAttempt::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), setup_intent: String, starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ setup_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ # Returns a list of SetupAttempts that associate with a provided SetupIntent.
+ sig {
+ params(params: T.any(::Stripe::SetupAttempt::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi
new file mode 100644
index 00000000..7ab6db71
--- /dev/null
+++ b/rbi/stripe/resources/setup_intent.rbi
@@ -0,0 +1,3860 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ class SetupIntent < APIResource
+ class AutomaticPaymentMethods < Stripe::StripeObject
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ sig { returns(String) }
+ attr_reader :allow_redirects
+ # Automatically calculates compatible payment methods
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :enabled
+ end
+ class LastSetupError < Stripe::StripeObject
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :advice_code
+ # For card errors, the ID of the failed charge.
+ sig { returns(String) }
+ attr_reader :charge
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :code
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
+ sig { returns(String) }
+ attr_reader :decline_code
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
+ sig { returns(String) }
+ attr_reader :doc_url
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
+ sig { returns(String) }
+ attr_reader :message
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
+ sig { returns(String) }
+ attr_reader :network_advice_code
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
+ sig { returns(String) }
+ attr_reader :network_decline_code
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
+ sig { returns(String) }
+ attr_reader :param
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
+ # We recommend that you create exactly one PaymentIntent for each order or
+ # customer session in your system. You can reference the PaymentIntent later to
+ # see the history of payment attempts for a particular session.
+ #
+ # A PaymentIntent transitions through
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
+ # throughout its lifetime as it interfaces with Stripe.js to perform
+ # authentication flows and ultimately creates at most one successful charge.
+ #
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
+ sig { returns(Stripe::PaymentIntent) }
+ attr_reader :payment_intent
+ # PaymentMethod objects represent your customer's payment instruments.
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
+ # Customer objects to store instrument details for future payments.
+ #
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
+ sig { returns(Stripe::PaymentMethod) }
+ attr_reader :payment_method
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
+ sig { returns(String) }
+ attr_reader :payment_method_type
+ # A URL to the request log entry in your dashboard.
+ sig { returns(String) }
+ attr_reader :request_log_url
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
+ #
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
+ # you through the setup process.
+ #
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
+ #
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
+ #
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
+ sig { returns(Stripe::SetupIntent) }
+ attr_reader :setup_intent
+ # Attribute for field source
+ sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) }
+ attr_reader :source
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class NextAction < Stripe::StripeObject
+ class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject
+ class QrCode < Stripe::StripeObject
+ # The date (unix timestamp) when the QR code expires.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # The image_url_png string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_png
+ # The image_url_svg string used to render QR code
+ sig { returns(String) }
+ attr_reader :image_url_svg
+ end
+ # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration.
+ sig { returns(String) }
+ attr_reader :hosted_instructions_url
+ # The url for mobile redirect based auth
+ sig { returns(String) }
+ attr_reader :mobile_auth_url
+ # Attribute for field qr_code
+ sig { returns(QrCode) }
+ attr_reader :qr_code
+ end
+ class RedirectToUrl < Stripe::StripeObject
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
+ sig { returns(T.nilable(String)) }
+ attr_reader :return_url
+ # The URL you must redirect your customer to in order to authenticate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ class VerifyWithMicrodeposits < Stripe::StripeObject
+ # The timestamp when the microdeposits are expected to land.
+ sig { returns(Integer) }
+ attr_reader :arrival_date
+ # The URL for the hosted verification page, which allows customers to verify their bank account.
+ sig { returns(String) }
+ attr_reader :hosted_verification_url
+ # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
+ sig { returns(T.nilable(String)) }
+ attr_reader :microdeposit_type
+ end
+ # Attribute for field cashapp_handle_redirect_or_display_qr_code
+ sig { returns(CashappHandleRedirectOrDisplayQrCode) }
+ attr_reader :cashapp_handle_redirect_or_display_qr_code
+ # Attribute for field redirect_to_url
+ sig { returns(RedirectToUrl) }
+ attr_reader :redirect_to_url
+ # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
+ sig { returns(String) }
+ attr_reader :type
+ # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
+ sig { returns(T::Hash[String, T.untyped]) }
+ attr_reader :use_stripe_sdk
+ # Attribute for field verify_with_microdeposits
+ sig { returns(VerifyWithMicrodeposits) }
+ attr_reader :verify_with_microdeposits
+ end
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
+ # ID of the payment method configuration used.
+ sig { returns(String) }
+ attr_reader :id
+ # ID of the parent payment method configuration used.
+ sig { returns(T.nilable(String)) }
+ attr_reader :parent
+ end
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # A URL for custom mandate text
+ sig { returns(String) }
+ attr_reader :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T::Array[String]) }
+ attr_reader :default_for
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_reader :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_type
+ end
+ # Currency supported by the bank account
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ class AmazonPay < Stripe::StripeObject; end
+ class BacsDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(String) }
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ end
+ class Card < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_reader :amount_type
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_reader :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_reader :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :supported_types
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig { returns(T.nilable(MandateOptions)) }
+ attr_reader :mandate_options
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_reader :request_three_d_secure
+ end
+ class CardPresent < Stripe::StripeObject; end
+ class Link < Stripe::StripeObject
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_reader :persistent_token
+ end
+ class Paypal < Stripe::StripeObject
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_agreement_id
+ end
+ class SepaDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(String) }
+ attr_reader :reference_prefix
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ end
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ sig { returns(T::Array[String]) }
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ sig { returns(Filters) }
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ sig { returns(T::Array[String]) }
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(String) }
+ attr_reader :return_url
+ end
+ class MandateOptions < Stripe::StripeObject
+ # Mandate collection method
+ sig { returns(String) }
+ attr_reader :collection_method
+ end
+ # Attribute for field financial_connections
+ sig { returns(FinancialConnections) }
+ attr_reader :financial_connections
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field amazon_pay
+ sig { returns(AmazonPay) }
+ attr_reader :amazon_pay
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # Attribute for field link
+ sig { returns(Link) }
+ attr_reader :link
+ # Attribute for field paypal
+ sig { returns(Paypal) }
+ attr_reader :paypal
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ # ID of the Connect application that created the SetupIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T::Boolean) }
+ attr_reader :attach_to_self
+ # Settings for dynamic payment methods compatible with this Setup Intent
+ sig { returns(T.nilable(AutomaticPaymentMethods)) }
+ attr_reader :automatic_payment_methods
+ # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :cancellation_reason
+ # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
+ #
+ # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_secret
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :flow_directions
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The error encountered in the previous SetupIntent confirmation.
+ sig { returns(T.nilable(LastSetupError)) }
+ attr_reader :last_setup_error
+ # The most recent SetupAttempt for this SetupIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) }
+ attr_reader :latest_attempt
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # ID of the multi use Mandate generated by the SetupIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :mandate
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
+ sig { returns(T.nilable(NextAction)) }
+ attr_reader :next_action
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account (if any) for which the setup is intended.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :payment_method
+ # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent.
+ sig { returns(T.nilable(PaymentMethodConfigurationDetails)) }
+ attr_reader :payment_method_configuration_details
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(PaymentMethodOptions)) }
+ attr_reader :payment_method_options
+ # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
+ sig { returns(T::Array[String]) }
+ attr_reader :payment_method_types
+ # ID of the single_use Mandate generated by the SetupIntent.
+ sig { returns(T.nilable(T.any(String, Stripe::Mandate))) }
+ attr_reader :single_use_mandate
+ # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
+ sig { returns(String) }
+ attr_reader :status
+ # Indicates how the payment method is intended to be used in the future.
+ #
+ # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
+ sig { returns(String) }
+ attr_reader :usage
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :attach_to_self
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::SetupIntent::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return SetupIntents for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return SetupIntents that associate with the specified payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(attach_to_self: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::SetupIntent::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_method: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ attach_to_self: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_method: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(allow_redirects: T.nilable(String), enabled: T::Boolean).void }
+ def initialize(allow_redirects: nil, enabled: nil); end
+ end
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :user_agent
+ sig { params(ip_address: String, user_agent: String).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig { returns(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance) }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: ::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp)) }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Eps)) }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Giropay)) }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Grabpay)) }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KakaoPay)) }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Konbini)) }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NaverPay)) }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payco)) }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Satispay)) }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, currency: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: T.nilable(String), electronic_commerce_indicator: T.nilable(String), network_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: T.nilable(String), version: T.nilable(String)).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_three_d_secure: T.nilable(String), three_d_secure: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ sig { params(persistent_token: T.nilable(String)).void }
+ def initialize(persistent_token: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_agreement_id
+ sig { params(billing_agreement_id: T.nilable(String)).void }
+ def initialize(billing_agreement_id: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ ); end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card)) }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent))
+ }
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link)) }
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ class SingleUse < Stripe::RequestParams
+ # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ sig { params(amount: Integer, currency: String).void }
+ def initialize(amount: nil, currency: nil); end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :attach_to_self
+ # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::AutomaticPaymentMethods)) }
+ attr_accessor :automatic_payment_methods
+ # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :confirm
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :flow_directions
+ # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::CreateParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Stripe account ID created for this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
+ #
+ # Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
+ sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::SingleUse)) }
+ attr_accessor :single_use
+ # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(attach_to_self: T.nilable(T::Boolean), automatic_payment_methods: T.nilable(::Stripe::SetupIntent::CreateParams::AutomaticPaymentMethods), confirm: T.nilable(T::Boolean), confirmation_token: T.nilable(String), customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), flow_directions: T.nilable(T::Array[String]), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::CreateParams::MandateData))), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), return_url: T.nilable(String), single_use: T.nilable(::Stripe::SetupIntent::CreateParams::SingleUse), usage: T.nilable(String), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ attach_to_self: nil,
+ automatic_payment_methods: nil,
+ confirm: nil,
+ confirmation_token: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ mandate_data: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ return_url: nil,
+ single_use: nil,
+ usage: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp)) }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Eps)) }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Giropay)) }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Grabpay)) }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KakaoPay)) }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Konbini)) }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NaverPay)) }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payco)) }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Satispay)) }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, currency: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: T.nilable(String), electronic_commerce_indicator: T.nilable(String), network_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: T.nilable(String), version: T.nilable(String)).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_three_d_secure: T.nilable(String), three_d_secure: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ sig { params(persistent_token: T.nilable(String)).void }
+ def initialize(persistent_token: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_agreement_id
+ sig { params(billing_agreement_id: T.nilable(String)).void }
+ def initialize(billing_agreement_id: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ ); end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card)) }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent))
+ }
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link)) }
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :attach_to_self
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :flow_directions
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ sig {
+ params(attach_to_self: T.nilable(T::Boolean), customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), flow_directions: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ attach_to_self: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(cancellation_reason: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(cancellation_reason: nil, expand: nil); end
+ end
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig { params(ip_address: T.nilable(String), user_agent: T.nilable(String)).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance))
+ }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance)).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp)) }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Eps)) }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Giropay)) }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Grabpay)) }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Konbini)) }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payco)) }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, currency: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: T.nilable(String), electronic_commerce_indicator: T.nilable(String), network_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: T.nilable(String), version: T.nilable(String)).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_three_d_secure: T.nilable(String), three_d_secure: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ sig { params(persistent_token: T.nilable(String)).void }
+ def initialize(persistent_token: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_agreement_id
+ sig { params(billing_agreement_id: T.nilable(String)).void }
+ def initialize(billing_agreement_id: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ ); end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card)) }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent))
+ }
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link)) }
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field mandate_data
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::ConfirmParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The URL to redirect your customer back to after they authenticate 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(confirmation_token: T.nilable(String), expand: T.nilable(T::Array[String]), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntent::ConfirmParams::MandateData))), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions), return_url: T.nilable(String), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ confirmation_token: nil,
+ expand: nil,
+ mandate_data: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ return_url: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amounts: T.nilable(T::Array[Integer]), descriptor_code: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil); end
+ end
+ # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
+ #
+ # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig {
+ params(params: T.any(::Stripe::SetupIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
+ #
+ # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def self.cancel(intent, params = {}, opts = {}); end
+
+ # Confirm that your customer intends to set up the current or
+ # provided payment method. For example, you would confirm a SetupIntent
+ # when a customer hits the “Save” button on a payment method management
+ # page on your website.
+ #
+ # If the selected payment method does not require any additional
+ # steps from the customer, the SetupIntent will transition to the
+ # succeeded status.
+ #
+ # Otherwise, it will transition to the requires_action status and
+ # suggest additional actions via next_action. If setup fails,
+ # the SetupIntent will transition to the
+ # requires_payment_method status or the canceled status if the
+ # confirmation limit is reached.
+ sig {
+ params(params: T.any(::Stripe::SetupIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def confirm(params = {}, opts = {}); end
+
+ # Confirm that your customer intends to set up the current or
+ # provided payment method. For example, you would confirm a SetupIntent
+ # when a customer hits the “Save” button on a payment method management
+ # page on your website.
+ #
+ # If the selected payment method does not require any additional
+ # steps from the customer, the SetupIntent will transition to the
+ # succeeded status.
+ #
+ # Otherwise, it will transition to the requires_action status and
+ # suggest additional actions via next_action. If setup fails,
+ # the SetupIntent will transition to the
+ # requires_payment_method status or the canceled status if the
+ # confirmation limit is reached.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def self.confirm(intent, params = {}, opts = {}); end
+
+ # Creates a SetupIntent object.
+ #
+ # After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm)
+ # it to collect any required permissions to charge the payment method later.
+ sig {
+ params(params: T.any(::Stripe::SetupIntent::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of SetupIntents.
+ sig {
+ params(params: T.any(::Stripe::SetupIntent::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a SetupIntent object.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntent::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def self.update(intent, params = {}, opts = {}); end
+
+ # Verifies microdeposits on a SetupIntent object.
+ sig {
+ params(params: T.any(::Stripe::SetupIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def verify_microdeposits(params = {}, opts = {}); end
+
+ # Verifies microdeposits on a SetupIntent object.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def self.verify_microdeposits(intent, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/shipping_rate.rbi b/rbi/stripe/resources/shipping_rate.rbi
new file mode 100644
index 00000000..d03a7f06
--- /dev/null
+++ b/rbi/stripe/resources/shipping_rate.rbi
@@ -0,0 +1,305 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Shipping rates describe the price of shipping presented to your customers and
+ # applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).
+ class ShippingRate < APIResource
+ class DeliveryEstimate < Stripe::StripeObject
+ class Maximum < Stripe::StripeObject
+ # A unit of time.
+ sig { returns(String) }
+ attr_reader :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ class Minimum < Stripe::StripeObject
+ # A unit of time.
+ sig { returns(String) }
+ attr_reader :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_reader :value
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig { returns(T.nilable(Maximum)) }
+ attr_reader :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig { returns(T.nilable(Minimum)) }
+ attr_reader :minimum
+ end
+ class FixedAmount < Stripe::StripeObject
+ class CurrencyOptions < Stripe::StripeObject
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig { returns(T::Hash[String, CurrencyOptions]) }
+ attr_reader :currency_options
+ end
+ # Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(T.nilable(DeliveryEstimate)) }
+ attr_reader :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(T.nilable(String)) }
+ attr_reader :display_name
+ # Attribute for field fixed_amount
+ sig { returns(FixedAmount) }
+ attr_reader :fixed_amount
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) }
+ attr_reader :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return shipping rates that are active or inactive.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::ShippingRate::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return shipping rates for the given currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::ShippingRate::ListParams::Created, Integer)), currency: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig { returns(T.nilable(::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Maximum)) }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig { returns(T.nilable(::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Minimum)) }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::ShippingRate::CreateParams::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ShippingRate::CreateParams::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(T.nilable(::Stripe::ShippingRate::CreateParams::DeliveryEstimate)) }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig { returns(T.nilable(::Stripe::ShippingRate::CreateParams::FixedAmount)) }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::ShippingRate::CreateParams::DeliveryEstimate), display_name: String, expand: T.nilable(T::Array[String]), fixed_amount: T.nilable(::Stripe::ShippingRate::CreateParams::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ expand: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: T.nilable(Integer), tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::ShippingRate::UpdateParams::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::ShippingRate::UpdateParams::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(currency_options: nil); end
+ end
+ # Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig { returns(T.nilable(::Stripe::ShippingRate::UpdateParams::FixedAmount)) }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), fixed_amount: T.nilable(::Stripe::ShippingRate::UpdateParams::FixedAmount), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), tax_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ expand: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil
+ ); end
+ end
+ # Creates a new shipping rate object.
+ sig {
+ params(params: T.any(::Stripe::ShippingRate::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of your shipping rates.
+ sig {
+ params(params: T.any(::Stripe::ShippingRate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates an existing shipping rate object.
+ sig {
+ params(shipping_rate_token: String, params: T.any(::Stripe::ShippingRate::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate)
+ }
+ def self.update(shipping_rate_token, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/sigma/scheduled_query_run.rbi b/rbi/stripe/resources/sigma/scheduled_query_run.rbi
new file mode 100644
index 00000000..668a9dd3
--- /dev/null
+++ b/rbi/stripe/resources/sigma/scheduled_query_run.rbi
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Sigma
+ # If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll
+ # receive a `sigma.scheduled_query_run.created` webhook each time the query
+ # runs. The webhook contains a `ScheduledQueryRun` object, which you can use to
+ # retrieve the query results.
+ class ScheduledQueryRun < APIResource
+ class Error < Stripe::StripeObject
+ # Information about the run failure.
+ sig { returns(String) }
+ attr_reader :message
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # When the query was run, Sigma contained a snapshot of your Stripe data at this time.
+ sig { returns(Integer) }
+ attr_reader :data_load_time
+ # Attribute for field error
+ sig { returns(Error) }
+ attr_reader :error
+ # The file object representing the results of the query.
+ sig { returns(T.nilable(Stripe::File)) }
+ attr_reader :file
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Time at which the result expires and is no longer available for download.
+ sig { returns(Integer) }
+ attr_reader :result_available_until
+ # SQL for the query.
+ sig { returns(String) }
+ attr_reader :sql
+ # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.
+ sig { returns(String) }
+ attr_reader :status
+ # Title of the query.
+ sig { returns(String) }
+ attr_reader :title
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Returns a list of scheduled query runs.
+ sig {
+ params(params: T.any(::Stripe::Sigma::ScheduledQueryRun::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/source.rbi b/rbi/stripe/resources/source.rbi
new file mode 100644
index 00000000..cb65a328
--- /dev/null
+++ b/rbi/stripe/resources/source.rbi
@@ -0,0 +1,1496 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # `Source` objects allow you to accept a variety of payment methods. They
+ # represent a customer's payment instrument, and can be used with the Stripe API
+ # just like a `Card` object: once chargeable, they can be charged, or can be
+ # attached to customers.
+ #
+ # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).
+ # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).
+ # This newer API provides access to our latest features and payment method types.
+ #
+ # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
+ class Source < APIResource
+ class AchCreditTransfer < Stripe::StripeObject
+ # Attribute for field account_number
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_number
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field fingerprint
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Attribute for field refund_account_holder_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_name
+ # Attribute for field refund_account_holder_type
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_type
+ # Attribute for field refund_routing_number
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_routing_number
+ # Attribute for field routing_number
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ # Attribute for field swift_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :swift_code
+ end
+ class AchDebit < Stripe::StripeObject
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field fingerprint
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Attribute for field routing_number
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ # Attribute for field type
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class AcssDebit < Stripe::StripeObject
+ # Attribute for field bank_address_city
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_address_city
+ # Attribute for field bank_address_line_1
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_address_line_1
+ # Attribute for field bank_address_line_2
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_address_line_2
+ # Attribute for field bank_address_postal_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_address_postal_code
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field category
+ sig { returns(T.nilable(String)) }
+ attr_reader :category
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field fingerprint
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Attribute for field routing_number
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ class Alipay < Stripe::StripeObject
+ # Attribute for field data_string
+ sig { returns(T.nilable(String)) }
+ attr_reader :data_string
+ # Attribute for field native_url
+ sig { returns(T.nilable(String)) }
+ attr_reader :native_url
+ # Attribute for field statement_descriptor
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class AuBecsDebit < Stripe::StripeObject
+ # Attribute for field bsb_number
+ sig { returns(T.nilable(String)) }
+ attr_reader :bsb_number
+ # Attribute for field fingerprint
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ end
+ class Bancontact < Stripe::StripeObject
+ # Attribute for field bank_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field bic
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Attribute for field iban_last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Attribute for field preferred_language
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Attribute for field statement_descriptor
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class Card < Stripe::StripeObject
+ # Attribute for field address_line1_check
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # Attribute for field address_zip_check
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_zip_check
+ # Attribute for field brand
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field cvc_check
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ # Attribute for field description
+ sig { returns(String) }
+ attr_reader :description
+ # Attribute for field dynamic_last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :dynamic_last4
+ # Attribute for field exp_month
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Attribute for field exp_year
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # Attribute for field fingerprint
+ sig { returns(String) }
+ attr_reader :fingerprint
+ # Attribute for field funding
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Attribute for field iin
+ sig { returns(String) }
+ attr_reader :iin
+ # Attribute for field issuer
+ sig { returns(String) }
+ attr_reader :issuer
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Attribute for field name
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Attribute for field three_d_secure
+ sig { returns(String) }
+ attr_reader :three_d_secure
+ # Attribute for field tokenization_method
+ sig { returns(T.nilable(String)) }
+ attr_reader :tokenization_method
+ end
+ class CardPresent < Stripe::StripeObject
+ # Attribute for field application_cryptogram
+ sig { returns(String) }
+ attr_reader :application_cryptogram
+ # Attribute for field application_preferred_name
+ sig { returns(String) }
+ attr_reader :application_preferred_name
+ # Attribute for field authorization_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :authorization_code
+ # Attribute for field authorization_response_code
+ sig { returns(String) }
+ attr_reader :authorization_response_code
+ # Attribute for field brand
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field cvm_type
+ sig { returns(String) }
+ attr_reader :cvm_type
+ # Attribute for field data_type
+ sig { returns(T.nilable(String)) }
+ attr_reader :data_type
+ # Attribute for field dedicated_file_name
+ sig { returns(String) }
+ attr_reader :dedicated_file_name
+ # Attribute for field description
+ sig { returns(String) }
+ attr_reader :description
+ # Attribute for field emv_auth_data
+ sig { returns(String) }
+ attr_reader :emv_auth_data
+ # Attribute for field evidence_customer_signature
+ sig { returns(T.nilable(String)) }
+ attr_reader :evidence_customer_signature
+ # Attribute for field evidence_transaction_certificate
+ sig { returns(T.nilable(String)) }
+ attr_reader :evidence_transaction_certificate
+ # Attribute for field exp_month
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Attribute for field exp_year
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # Attribute for field fingerprint
+ sig { returns(String) }
+ attr_reader :fingerprint
+ # Attribute for field funding
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Attribute for field iin
+ sig { returns(String) }
+ attr_reader :iin
+ # Attribute for field issuer
+ sig { returns(String) }
+ attr_reader :issuer
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Attribute for field pos_device_id
+ sig { returns(T.nilable(String)) }
+ attr_reader :pos_device_id
+ # Attribute for field pos_entry_mode
+ sig { returns(String) }
+ attr_reader :pos_entry_mode
+ # Attribute for field read_method
+ sig { returns(T.nilable(String)) }
+ attr_reader :read_method
+ # Attribute for field reader
+ sig { returns(T.nilable(String)) }
+ attr_reader :reader
+ # Attribute for field terminal_verification_results
+ sig { returns(String) }
+ attr_reader :terminal_verification_results
+ # Attribute for field transaction_status_information
+ sig { returns(String) }
+ attr_reader :transaction_status_information
+ end
+ class CodeVerification < Stripe::StripeObject
+ # The number of attempts remaining to authenticate the source object with a verification code.
+ sig { returns(Integer) }
+ attr_reader :attempts_remaining
+ # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).
+ sig { returns(String) }
+ attr_reader :status
+ end
+ class Eps < Stripe::StripeObject
+ # Attribute for field reference
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Attribute for field statement_descriptor
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class Giropay < Stripe::StripeObject
+ # Attribute for field bank_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field bic
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Attribute for field statement_descriptor
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class Ideal < Stripe::StripeObject
+ # Attribute for field bank
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank
+ # Attribute for field bic
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Attribute for field iban_last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Attribute for field statement_descriptor
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class Klarna < Stripe::StripeObject
+ # Attribute for field background_image_url
+ sig { returns(String) }
+ attr_reader :background_image_url
+ # Attribute for field client_token
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_token
+ # Attribute for field first_name
+ sig { returns(String) }
+ attr_reader :first_name
+ # Attribute for field last_name
+ sig { returns(String) }
+ attr_reader :last_name
+ # Attribute for field locale
+ sig { returns(String) }
+ attr_reader :locale
+ # Attribute for field logo_url
+ sig { returns(String) }
+ attr_reader :logo_url
+ # Attribute for field page_title
+ sig { returns(String) }
+ attr_reader :page_title
+ # Attribute for field pay_later_asset_urls_descriptive
+ sig { returns(String) }
+ attr_reader :pay_later_asset_urls_descriptive
+ # Attribute for field pay_later_asset_urls_standard
+ sig { returns(String) }
+ attr_reader :pay_later_asset_urls_standard
+ # Attribute for field pay_later_name
+ sig { returns(String) }
+ attr_reader :pay_later_name
+ # Attribute for field pay_later_redirect_url
+ sig { returns(String) }
+ attr_reader :pay_later_redirect_url
+ # Attribute for field pay_now_asset_urls_descriptive
+ sig { returns(String) }
+ attr_reader :pay_now_asset_urls_descriptive
+ # Attribute for field pay_now_asset_urls_standard
+ sig { returns(String) }
+ attr_reader :pay_now_asset_urls_standard
+ # Attribute for field pay_now_name
+ sig { returns(String) }
+ attr_reader :pay_now_name
+ # Attribute for field pay_now_redirect_url
+ sig { returns(String) }
+ attr_reader :pay_now_redirect_url
+ # Attribute for field pay_over_time_asset_urls_descriptive
+ sig { returns(String) }
+ attr_reader :pay_over_time_asset_urls_descriptive
+ # Attribute for field pay_over_time_asset_urls_standard
+ sig { returns(String) }
+ attr_reader :pay_over_time_asset_urls_standard
+ # Attribute for field pay_over_time_name
+ sig { returns(String) }
+ attr_reader :pay_over_time_name
+ # Attribute for field pay_over_time_redirect_url
+ sig { returns(String) }
+ attr_reader :pay_over_time_redirect_url
+ # Attribute for field payment_method_categories
+ sig { returns(String) }
+ attr_reader :payment_method_categories
+ # Attribute for field purchase_country
+ sig { returns(String) }
+ attr_reader :purchase_country
+ # Attribute for field purchase_type
+ sig { returns(String) }
+ attr_reader :purchase_type
+ # Attribute for field redirect_url
+ sig { returns(String) }
+ attr_reader :redirect_url
+ # Attribute for field shipping_delay
+ sig { returns(Integer) }
+ attr_reader :shipping_delay
+ # Attribute for field shipping_first_name
+ sig { returns(String) }
+ attr_reader :shipping_first_name
+ # Attribute for field shipping_last_name
+ sig { returns(String) }
+ attr_reader :shipping_last_name
+ end
+ class Multibanco < Stripe::StripeObject
+ # Attribute for field entity
+ sig { returns(T.nilable(String)) }
+ attr_reader :entity
+ # Attribute for field reference
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Attribute for field refund_account_holder_address_city
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_city
+ # Attribute for field refund_account_holder_address_country
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_country
+ # Attribute for field refund_account_holder_address_line1
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_line1
+ # Attribute for field refund_account_holder_address_line2
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_line2
+ # Attribute for field refund_account_holder_address_postal_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_postal_code
+ # Attribute for field refund_account_holder_address_state
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_state
+ # Attribute for field refund_account_holder_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_name
+ # Attribute for field refund_iban
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_iban
+ end
+ class Owner < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class VerifiedAddress < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Owner's address.
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # Owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Owner's full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Owner's phone number (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(VerifiedAddress)) }
+ attr_reader :verified_address
+ # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_email
+ # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_phone
+ end
+ class P24 < Stripe::StripeObject
+ # Attribute for field reference
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ end
+ class Receiver < Stripe::StripeObject
+ # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address
+ # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.
+ sig { returns(Integer) }
+ attr_reader :amount_charged
+ # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.
+ sig { returns(Integer) }
+ attr_reader :amount_received
+ # The total amount that was returned to the customer. The amount returned is expressed in the source's currency.
+ sig { returns(Integer) }
+ attr_reader :amount_returned
+ # Type of refund attribute method, one of `email`, `manual`, or `none`.
+ sig { returns(String) }
+ attr_reader :refund_attributes_method
+ # Type of refund attribute status, one of `missing`, `requested`, or `available`.
+ sig { returns(String) }
+ attr_reader :refund_attributes_status
+ end
+ class Redirect < Stripe::StripeObject
+ # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_reason
+ # The URL you provide to redirect the customer to after they authenticated their payment.
+ sig { returns(String) }
+ attr_reader :return_url
+ # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).
+ sig { returns(String) }
+ attr_reader :status
+ # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.
+ sig { returns(String) }
+ attr_reader :url
+ end
+ class SepaCreditTransfer < Stripe::StripeObject
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field bic
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Attribute for field iban
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban
+ # Attribute for field refund_account_holder_address_city
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_city
+ # Attribute for field refund_account_holder_address_country
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_country
+ # Attribute for field refund_account_holder_address_line1
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_line1
+ # Attribute for field refund_account_holder_address_line2
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_line2
+ # Attribute for field refund_account_holder_address_postal_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_postal_code
+ # Attribute for field refund_account_holder_address_state
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_address_state
+ # Attribute for field refund_account_holder_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_account_holder_name
+ # Attribute for field refund_iban
+ sig { returns(T.nilable(String)) }
+ attr_reader :refund_iban
+ end
+ class SepaDebit < Stripe::StripeObject
+ # Attribute for field bank_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Attribute for field branch_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :branch_code
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field fingerprint
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Attribute for field mandate_reference
+ sig { returns(T.nilable(String)) }
+ attr_reader :mandate_reference
+ # Attribute for field mandate_url
+ sig { returns(T.nilable(String)) }
+ attr_reader :mandate_url
+ end
+ class Sofort < Stripe::StripeObject
+ # Attribute for field bank_code
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_code
+ # Attribute for field bank_name
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Attribute for field bic
+ sig { returns(T.nilable(String)) }
+ attr_reader :bic
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field iban_last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :iban_last4
+ # Attribute for field preferred_language
+ sig { returns(T.nilable(String)) }
+ attr_reader :preferred_language
+ # Attribute for field statement_descriptor
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ end
+ class SourceOrder < Stripe::StripeObject
+ class Item < Stripe::StripeObject
+ # The amount (price) for this order item.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # This currency of this order item. Required when `amount` is present.
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # Human-readable description for this order item.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).
+ sig { returns(T.nilable(String)) }
+ attr_reader :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ # The type of this order item. Must be `sku`, `tax`, or `shipping`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ class Shipping < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_reader :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_reader :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_reader :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tracking_number
+ end
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The email address of the customer placing the order.
+ sig { returns(String) }
+ attr_reader :email
+ # List of items constituting the order.
+ sig { returns(T.nilable(T::Array[Item])) }
+ attr_reader :items
+ # Attribute for field shipping
+ sig { returns(Shipping) }
+ attr_reader :shipping
+ end
+ class ThreeDSecure < Stripe::StripeObject
+ # Attribute for field address_line1_check
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_line1_check
+ # Attribute for field address_zip_check
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_zip_check
+ # Attribute for field authenticated
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :authenticated
+ # Attribute for field brand
+ sig { returns(T.nilable(String)) }
+ attr_reader :brand
+ # Attribute for field card
+ sig { returns(T.nilable(String)) }
+ attr_reader :card
+ # Attribute for field country
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Attribute for field customer
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer
+ # Attribute for field cvc_check
+ sig { returns(T.nilable(String)) }
+ attr_reader :cvc_check
+ # Attribute for field description
+ sig { returns(String) }
+ attr_reader :description
+ # Attribute for field dynamic_last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :dynamic_last4
+ # Attribute for field exp_month
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_month
+ # Attribute for field exp_year
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :exp_year
+ # Attribute for field fingerprint
+ sig { returns(String) }
+ attr_reader :fingerprint
+ # Attribute for field funding
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding
+ # Attribute for field iin
+ sig { returns(String) }
+ attr_reader :iin
+ # Attribute for field issuer
+ sig { returns(String) }
+ attr_reader :issuer
+ # Attribute for field last4
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # Attribute for field name
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # Attribute for field three_d_secure
+ sig { returns(String) }
+ attr_reader :three_d_secure
+ # Attribute for field tokenization_method
+ sig { returns(T.nilable(String)) }
+ attr_reader :tokenization_method
+ end
+ class Wechat < Stripe::StripeObject
+ # Attribute for field prepay_id
+ sig { returns(String) }
+ attr_reader :prepay_id
+ # Attribute for field qr_code_url
+ sig { returns(T.nilable(String)) }
+ attr_reader :qr_code_url
+ # Attribute for field statement_descriptor
+ sig { returns(String) }
+ attr_reader :statement_descriptor
+ end
+ # Attribute for field ach_credit_transfer
+ sig { returns(AchCreditTransfer) }
+ attr_reader :ach_credit_transfer
+ # Attribute for field ach_debit
+ sig { returns(AchDebit) }
+ attr_reader :ach_debit
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # Attribute for field alipay
+ sig { returns(Alipay) }
+ attr_reader :alipay
+ # 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. The field defaults to “unspecified”.
+ sig { returns(T.nilable(String)) }
+ attr_reader :allow_redisplay
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # Attribute for field au_becs_debit
+ sig { returns(AuBecsDebit) }
+ attr_reader :au_becs_debit
+ # Attribute for field bancontact
+ sig { returns(Bancontact) }
+ attr_reader :bancontact
+ # Attribute for field card
+ sig { returns(Card) }
+ attr_reader :card
+ # Attribute for field card_present
+ sig { returns(CardPresent) }
+ attr_reader :card_present
+ # The client secret of the source. Used for client-side retrieval using a publishable key.
+ sig { returns(String) }
+ attr_reader :client_secret
+ # Attribute for field code_verification
+ sig { returns(CodeVerification) }
+ attr_reader :code_verification
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.
+ sig { returns(T.nilable(String)) }
+ attr_reader :currency
+ # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
+ sig { returns(String) }
+ attr_reader :customer
+ # Attribute for field eps
+ sig { returns(Eps) }
+ attr_reader :eps
+ # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.
+ sig { returns(String) }
+ attr_reader :flow
+ # Attribute for field giropay
+ sig { returns(Giropay) }
+ attr_reader :giropay
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field ideal
+ sig { returns(Ideal) }
+ attr_reader :ideal
+ # Attribute for field klarna
+ sig { returns(Klarna) }
+ attr_reader :klarna
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Attribute for field multibanco
+ sig { returns(Multibanco) }
+ attr_reader :multibanco
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ sig { returns(T.nilable(Owner)) }
+ attr_reader :owner
+ # Attribute for field p24
+ sig { returns(P24) }
+ attr_reader :p24
+ # Attribute for field receiver
+ sig { returns(Receiver) }
+ attr_reader :receiver
+ # Attribute for field redirect
+ sig { returns(Redirect) }
+ attr_reader :redirect
+ # Attribute for field sepa_credit_transfer
+ sig { returns(SepaCreditTransfer) }
+ attr_reader :sepa_credit_transfer
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # Attribute for field sofort
+ sig { returns(Sofort) }
+ attr_reader :sofort
+ # Attribute for field source_order
+ sig { returns(SourceOrder) }
+ attr_reader :source_order
+ # Extra information about a source. This will appear on your customer's statement every time you charge the source.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field three_d_secure
+ sig { returns(ThreeDSecure) }
+ attr_reader :three_d_secure
+ # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.
+ sig { returns(String) }
+ attr_reader :type
+ # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
+ sig { returns(T.nilable(String)) }
+ attr_reader :usage
+ # Attribute for field wechat
+ sig { returns(Wechat) }
+ attr_reader :wechat
+ class UpdateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ sig { returns(String) }
+ attr_accessor :contact_email
+ sig { params(contact_email: String).void }
+ def initialize(contact_email: nil); end
+ end
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::Mandate::Acceptance::Offline)) }
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::Mandate::Acceptance::Online)) }
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ sig { returns(String) }
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), offline: T.nilable(::Stripe::Source::UpdateParams::Mandate::Acceptance::Offline), online: T.nilable(::Stripe::Source::UpdateParams::Mandate::Acceptance::Online), status: String, type: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ ); end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::Mandate::Acceptance)) }
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :notification_method
+ sig {
+ params(acceptance: T.nilable(::Stripe::Source::UpdateParams::Mandate::Acceptance), amount: T.nilable(T.nilable(T.any(String, Integer))), currency: T.nilable(String), interval: T.nilable(String), notification_method: T.nilable(String)).void
+ }
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ ); end
+ end
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Owner's address.
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::Owner::Address)) }
+ attr_accessor :address
+ # Owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Owner's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Owner's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(::Stripe::Source::UpdateParams::Owner::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Attribute for param field type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), parent: T.nilable(String), quantity: T.nilable(Integer), type: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::Source::UpdateParams::SourceOrder::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::Source::UpdateParams::SourceOrder::Shipping::Address, carrier: T.nilable(String), name: T.nilable(String), phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ carrier: nil,
+ name: nil,
+ phone: nil,
+ tracking_number: nil
+ ); end
+ end
+ # List of items constituting the order.
+ sig { returns(T.nilable(T::Array[::Stripe::Source::UpdateParams::SourceOrder::Item])) }
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::SourceOrder::Shipping)) }
+ attr_accessor :shipping
+ sig {
+ params(items: T.nilable(T::Array[::Stripe::Source::UpdateParams::SourceOrder::Item]), shipping: T.nilable(::Stripe::Source::UpdateParams::SourceOrder::Shipping)).void
+ }
+ def initialize(items: nil, shipping: nil); end
+ end
+ # Amount associated with the source.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::Mandate)) }
+ attr_accessor :mandate
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::Owner)) }
+ attr_accessor :owner
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ sig { returns(T.nilable(::Stripe::Source::UpdateParams::SourceOrder)) }
+ attr_accessor :source_order
+ sig {
+ params(amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), mandate: T.nilable(::Stripe::Source::UpdateParams::Mandate), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), owner: T.nilable(::Stripe::Source::UpdateParams::Owner), source_order: T.nilable(::Stripe::Source::UpdateParams::SourceOrder)).void
+ }
+ def initialize(
+ amount: nil,
+ expand: nil,
+ mandate: nil,
+ metadata: nil,
+ owner: nil,
+ source_order: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ sig { returns(String) }
+ attr_accessor :contact_email
+ sig { params(contact_email: String).void }
+ def initialize(contact_email: nil); end
+ end
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Mandate::Acceptance::Offline)) }
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Mandate::Acceptance::Online)) }
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ sig { returns(String) }
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), offline: T.nilable(::Stripe::Source::CreateParams::Mandate::Acceptance::Offline), online: T.nilable(::Stripe::Source::CreateParams::Mandate::Acceptance::Online), status: String, type: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ ); end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Mandate::Acceptance)) }
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :notification_method
+ sig {
+ params(acceptance: T.nilable(::Stripe::Source::CreateParams::Mandate::Acceptance), amount: T.nilable(T.nilable(T.any(String, Integer))), currency: T.nilable(String), interval: T.nilable(String), notification_method: T.nilable(String)).void
+ }
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ ); end
+ end
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Owner's address.
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Owner::Address)) }
+ attr_accessor :address
+ # Owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Owner's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Owner's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(::Stripe::Source::CreateParams::Owner::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Receiver < Stripe::RequestParams
+ # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_attributes_method
+ sig { params(refund_attributes_method: T.nilable(String)).void }
+ def initialize(refund_attributes_method: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
+ sig { returns(String) }
+ attr_accessor :return_url
+ sig { params(return_url: String).void }
+ def initialize(return_url: nil); end
+ end
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Attribute for param field type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), parent: T.nilable(String), quantity: T.nilable(Integer), type: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::Source::CreateParams::SourceOrder::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::Source::CreateParams::SourceOrder::Shipping::Address, carrier: T.nilable(String), name: T.nilable(String), phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ carrier: nil,
+ name: nil,
+ phone: nil,
+ tracking_number: nil
+ ); end
+ end
+ # List of items constituting the order.
+ sig { returns(T.nilable(T::Array[::Stripe::Source::CreateParams::SourceOrder::Item])) }
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::SourceOrder::Shipping)) }
+ attr_accessor :shipping
+ sig {
+ params(items: T.nilable(T::Array[::Stripe::Source::CreateParams::SourceOrder::Item]), shipping: T.nilable(::Stripe::Source::CreateParams::SourceOrder::Shipping)).void
+ }
+ def initialize(items: nil, shipping: nil); end
+ end
+ # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flow
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Mandate)) }
+ attr_accessor :mandate
+ # Attribute for param field metadata
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The source to share.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :original_source
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Owner)) }
+ attr_accessor :owner
+ # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Receiver)) }
+ attr_accessor :receiver
+ # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::Redirect)) }
+ attr_accessor :redirect
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ sig { returns(T.nilable(::Stripe::Source::CreateParams::SourceOrder)) }
+ attr_accessor :source_order
+ # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # An optional token used to create the source. When passed, token properties will override source parameters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :token
+ # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # Attribute for param field usage
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), customer: T.nilable(String), expand: T.nilable(T::Array[String]), flow: T.nilable(String), mandate: T.nilable(::Stripe::Source::CreateParams::Mandate), metadata: T.nilable(T::Hash[String, String]), original_source: T.nilable(String), owner: T.nilable(::Stripe::Source::CreateParams::Owner), receiver: T.nilable(::Stripe::Source::CreateParams::Receiver), redirect: T.nilable(::Stripe::Source::CreateParams::Redirect), source_order: T.nilable(::Stripe::Source::CreateParams::SourceOrder), statement_descriptor: T.nilable(String), token: T.nilable(String), type: T.nilable(String), usage: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ flow: nil,
+ mandate: nil,
+ metadata: nil,
+ original_source: nil,
+ owner: nil,
+ receiver: nil,
+ redirect: nil,
+ source_order: nil,
+ statement_descriptor: nil,
+ token: nil,
+ type: nil,
+ usage: nil
+ ); end
+ end
+ class VerifyParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The values needed to verify the source.
+ sig { returns(T::Array[String]) }
+ attr_accessor :values
+ sig { params(expand: T.nilable(T::Array[String]), values: T::Array[String]).void }
+ def initialize(expand: nil, values: nil); end
+ end
+ # Creates a new source object.
+ sig {
+ params(params: T.any(::Stripe::Source::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ #
+ # This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail.
+ sig {
+ params(source: String, params: T.any(::Stripe::Source::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def self.update(source, params = {}, opts = {}); end
+
+ # Verify a given source.
+ sig {
+ params(params: T.any(::Stripe::Source::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def verify(params = {}, opts = {}); end
+
+ # Verify a given source.
+ sig {
+ params(source: String, params: T.any(::Stripe::Source::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def self.verify(source, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/source_mandate_notification.rbi b/rbi/stripe/resources/source_mandate_notification.rbi
new file mode 100644
index 00000000..e731b0f2
--- /dev/null
+++ b/rbi/stripe/resources/source_mandate_notification.rbi
@@ -0,0 +1,77 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Source mandate notifications should be created when a notification related to
+ # a source mandate must be sent to the payer. They will trigger a webhook or
+ # deliver an email to the customer.
+ class SourceMandateNotification < APIResource
+ class AcssDebit < Stripe::StripeObject
+ # The statement descriptor associate with the debit.
+ sig { returns(String) }
+ attr_reader :statement_descriptor
+ end
+ class BacsDebit < Stripe::StripeObject
+ # Last 4 digits of the account number associated with the debit.
+ sig { returns(String) }
+ attr_reader :last4
+ end
+ class SepaDebit < Stripe::StripeObject
+ # SEPA creditor ID.
+ sig { returns(String) }
+ attr_reader :creditor_identifier
+ # Last 4 digits of the account number associated with the debit.
+ sig { returns(String) }
+ attr_reader :last4
+ # Mandate reference associated with the debit.
+ sig { returns(String) }
+ attr_reader :mandate_reference
+ end
+ # Attribute for field acss_debit
+ sig { returns(AcssDebit) }
+ attr_reader :acss_debit
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # Attribute for field bacs_debit
+ sig { returns(BacsDebit) }
+ attr_reader :bacs_debit
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.
+ sig { returns(String) }
+ attr_reader :reason
+ # Attribute for field sepa_debit
+ sig { returns(SepaDebit) }
+ attr_reader :sepa_debit
+ # `Source` objects allow you to accept a variety of payment methods. They
+ # represent a customer's payment instrument, and can be used with the Stripe API
+ # just like a `Card` object: once chargeable, they can be charged, or can be
+ # attached to customers.
+ #
+ # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).
+ # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).
+ # This newer API provides access to our latest features and payment method types.
+ #
+ # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
+ sig { returns(Stripe::Source) }
+ attr_reader :source
+ # The status of the mandate notification. Valid statuses are `pending` or `submitted`.
+ sig { returns(String) }
+ attr_reader :status
+ # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/source_transaction.rbi b/rbi/stripe/resources/source_transaction.rbi
new file mode 100644
index 00000000..7c4ca012
--- /dev/null
+++ b/rbi/stripe/resources/source_transaction.rbi
@@ -0,0 +1,127 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Some payment methods have no required amount that a customer must send.
+ # Customers can be instructed to send any amount, and it can be made up of
+ # multiple transactions. As such, sources can have multiple associated
+ # transactions.
+ class SourceTransaction < StripeObject
+ class AchCreditTransfer < Stripe::StripeObject
+ # Customer data associated with the transfer.
+ sig { returns(String) }
+ attr_reader :customer_data
+ # Bank account fingerprint associated with the transfer.
+ sig { returns(String) }
+ attr_reader :fingerprint
+ # Last 4 digits of the account number associated with the transfer.
+ sig { returns(String) }
+ attr_reader :last4
+ # Routing number associated with the transfer.
+ sig { returns(String) }
+ attr_reader :routing_number
+ end
+ class ChfCreditTransfer < Stripe::StripeObject
+ # Reference associated with the transfer.
+ sig { returns(String) }
+ attr_reader :reference
+ # Sender's country address.
+ sig { returns(String) }
+ attr_reader :sender_address_country
+ # Sender's line 1 address.
+ sig { returns(String) }
+ attr_reader :sender_address_line1
+ # Sender's bank account IBAN.
+ sig { returns(String) }
+ attr_reader :sender_iban
+ # Sender's name.
+ sig { returns(String) }
+ attr_reader :sender_name
+ end
+ class GbpCreditTransfer < Stripe::StripeObject
+ # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.
+ sig { returns(String) }
+ attr_reader :fingerprint
+ # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported.
+ sig { returns(String) }
+ attr_reader :funding_method
+ # Last 4 digits of sender account number associated with the transfer.
+ sig { returns(String) }
+ attr_reader :last4
+ # Sender entered arbitrary information about the transfer.
+ sig { returns(String) }
+ attr_reader :reference
+ # Sender account number associated with the transfer.
+ sig { returns(String) }
+ attr_reader :sender_account_number
+ # Sender name associated with the transfer.
+ sig { returns(String) }
+ attr_reader :sender_name
+ # Sender sort code associated with the transfer.
+ sig { returns(String) }
+ attr_reader :sender_sort_code
+ end
+ class PaperCheck < Stripe::StripeObject
+ # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.
+ sig { returns(String) }
+ attr_reader :available_at
+ # Comma-separated list of invoice IDs associated with the paper check.
+ sig { returns(String) }
+ attr_reader :invoices
+ end
+ class SepaCreditTransfer < Stripe::StripeObject
+ # Reference associated with the transfer.
+ sig { returns(String) }
+ attr_reader :reference
+ # Sender's bank account IBAN.
+ sig { returns(String) }
+ attr_reader :sender_iban
+ # Sender's name.
+ sig { returns(String) }
+ attr_reader :sender_name
+ end
+ # Attribute for field ach_credit_transfer
+ sig { returns(AchCreditTransfer) }
+ attr_reader :ach_credit_transfer
+ # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Attribute for field chf_credit_transfer
+ sig { returns(ChfCreditTransfer) }
+ attr_reader :chf_credit_transfer
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # Attribute for field gbp_credit_transfer
+ sig { returns(GbpCreditTransfer) }
+ attr_reader :gbp_credit_transfer
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field paper_check
+ sig { returns(PaperCheck) }
+ attr_reader :paper_check
+ # Attribute for field sepa_credit_transfer
+ sig { returns(SepaCreditTransfer) }
+ attr_reader :sepa_credit_transfer
+ # The ID of the source this transaction is attached to.
+ sig { returns(String) }
+ attr_reader :source
+ # The status of the transaction, one of `succeeded`, `pending`, or `failed`.
+ sig { returns(String) }
+ attr_reader :status
+ # The type of source this transaction is attached to.
+ sig { returns(String) }
+ attr_reader :type
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi
new file mode 100644
index 00000000..33428c63
--- /dev/null
+++ b/rbi/stripe/resources/subscription.rbi
@@ -0,0 +1,1964 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Subscriptions allow you to charge a customer on a recurring basis.
+ #
+ # Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
+ class Subscription < APIResource
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on this subscription.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ end
+ class BillingCycleAnchorConfig < Stripe::StripeObject
+ # The day of the month of the billing_cycle_anchor.
+ sig { returns(Integer) }
+ attr_reader :day_of_month
+ # The hour of the day of the billing_cycle_anchor.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :hour
+ # The minute of the hour of the billing_cycle_anchor.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :minute
+ # The month to start full cycle billing periods.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :month
+ # The second of the minute of the billing_cycle_anchor.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :second
+ end
+ class CancellationDetails < Stripe::StripeObject
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(String)) }
+ attr_reader :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(String)) }
+ attr_reader :feedback
+ # Why this subscription was canceled.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reason
+ end
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :account_tax_ids
+ # Attribute for field issuer
+ sig { returns(Issuer) }
+ attr_reader :issuer
+ end
+ class PauseCollection < Stripe::StripeObject
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ sig { returns(String) }
+ attr_reader :behavior
+ # The time after which the subscription will resume collecting payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :resumes_at
+ end
+ class PaymentSettings < Stripe::StripeObject
+ class PaymentMethodOptions < Stripe::StripeObject
+ class AcssDebit < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transaction_type
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ class Bancontact < Stripe::StripeObject
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(String) }
+ attr_reader :preferred_language
+ end
+ class Card < Stripe::StripeObject
+ class MandateOptions < Stripe::StripeObject
+ # Amount to be charged for future payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(T.nilable(String)) }
+ attr_reader :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ end
+ # Attribute for field mandate_options
+ sig { returns(MandateOptions) }
+ attr_reader :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_reader :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_reader :request_three_d_secure
+ end
+ class CustomerBalance < Stripe::StripeObject
+ class BankTransfer < Stripe::StripeObject
+ class EuBankTransfer < Stripe::StripeObject
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_reader :country
+ end
+ # Attribute for field eu_bank_transfer
+ sig { returns(EuBankTransfer) }
+ attr_reader :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :type
+ end
+ # Attribute for field bank_transfer
+ sig { returns(BankTransfer) }
+ attr_reader :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :funding_type
+ end
+ class Konbini < Stripe::StripeObject; end
+ class SepaDebit < Stripe::StripeObject; end
+ class UsBankAccount < Stripe::StripeObject
+ class FinancialConnections < Stripe::StripeObject
+ class Filters < Stripe::StripeObject
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
+ sig { returns(T::Array[String]) }
+ attr_reader :account_subcategories
+ end
+ # Attribute for field filters
+ sig { returns(Filters) }
+ attr_reader :filters
+ # The list of permissions to request. The `payment_method` permission must be included.
+ sig { returns(T::Array[String]) }
+ attr_reader :permissions
+ # Data features requested to be retrieved upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :prefetch
+ end
+ # Attribute for field financial_connections
+ sig { returns(FinancialConnections) }
+ attr_reader :financial_connections
+ # Bank account verification method.
+ sig { returns(String) }
+ attr_reader :verification_method
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(AcssDebit)) }
+ attr_reader :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(Bancontact)) }
+ attr_reader :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(Card)) }
+ attr_reader :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(CustomerBalance)) }
+ attr_reader :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(Konbini)) }
+ attr_reader :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(SepaDebit)) }
+ attr_reader :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
+ sig { returns(T.nilable(UsBankAccount)) }
+ attr_reader :us_bank_account
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ sig { returns(T.nilable(PaymentMethodOptions)) }
+ attr_reader :payment_method_options
+ # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :save_default_payment_method
+ end
+ class PendingInvoiceItemInterval < Stripe::StripeObject
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_reader :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ sig { returns(Integer) }
+ attr_reader :interval_count
+ end
+ class PendingUpdate < Stripe::StripeObject
+ # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :billing_cycle_anchor
+ # The point after which the changes reflected by this update will be discarded and no longer applied.
+ sig { returns(Integer) }
+ attr_reader :expires_at
+ # List of subscription items, each with an attached plan, that will be set if the update is applied.
+ sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) }
+ attr_reader :subscription_items
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :trial_from_plan
+ end
+ class TransferData < Stripe::StripeObject
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ class TrialSettings < Stripe::StripeObject
+ class EndBehavior < Stripe::StripeObject
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_reader :missing_payment_method
+ end
+ # Defines how a subscription behaves when a free trial ends.
+ sig { returns(EndBehavior) }
+ attr_reader :end_behavior
+ end
+ # ID of the Connect Application that created the subscription.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # 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.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
+ sig { returns(Integer) }
+ attr_reader :billing_cycle_anchor
+ # The fixed values used to calculate the `billing_cycle_anchor`.
+ sig { returns(T.nilable(BillingCycleAnchorConfig)) }
+ attr_reader :billing_cycle_anchor_config
+ # A date in the future at which the subscription will automatically get canceled
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :cancel_at
+ # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :cancel_at_period_end
+ # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Details about why this subscription was cancelled
+ sig { returns(T.nilable(CancellationDetails)) }
+ attr_reader :cancellation_details
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
+ sig { returns(String) }
+ attr_reader :collection_method
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the customer who owns the subscription.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig {
+ returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
+ }
+ attr_reader :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
+ attr_reader :default_tax_rates
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
+ sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
+ attr_reader :discounts
+ # If the subscription has ended, the date the subscription ended.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :ended_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field invoice_settings
+ sig { returns(InvoiceSettings) }
+ attr_reader :invoice_settings
+ # List of subscription items, each with an attached price.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :items
+ # The most recent invoice this subscription has generated.
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
+ attr_reader :latest_invoice
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :next_pending_invoice_item_invoice
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ sig { returns(T.nilable(PauseCollection)) }
+ attr_reader :pause_collection
+ # Payment settings passed on to invoices created by the subscription.
+ sig { returns(T.nilable(PaymentSettings)) }
+ attr_reader :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ sig { returns(T.nilable(PendingInvoiceItemInterval)) }
+ attr_reader :pending_invoice_item_interval
+ # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
+ sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) }
+ attr_reader :pending_setup_intent
+ # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
+ sig { returns(T.nilable(PendingUpdate)) }
+ attr_reader :pending_update
+ # The schedule attached to the subscription
+ sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
+ attr_reader :schedule
+ # Date when the subscription was first created. The date might differ from the `created` date due to backdating.
+ sig { returns(Integer) }
+ attr_reader :start_date
+ # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`.
+ #
+ # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
+ #
+ # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
+ #
+ # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
+ #
+ # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
+ #
+ # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
+ sig { returns(String) }
+ attr_reader :status
+ # ID of the test clock this subscription belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ # If the subscription has a trial, the end of that trial.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_end
+ # Settings related to subscription trials.
+ sig { returns(T.nilable(TrialSettings)) }
+ attr_reader :trial_settings
+ # If the subscription has a trial, the beginning of that trial.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_start
+ class CancelParams < Stripe::RequestParams
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :feedback
+ sig {
+ params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(comment: nil, feedback: nil); end
+ end
+ # Details about why this subscription was cancelled
+ sig { returns(T.nilable(::Stripe::Subscription::CancelParams::CancellationDetails)) }
+ attr_accessor :cancellation_details
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :invoice_now
+ # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :prorate
+ sig {
+ params(cancellation_details: T.nilable(::Stripe::Subscription::CancelParams::CancellationDetails), expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
+ }
+ def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData)) }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :feedback
+ sig {
+ params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(comment: nil, feedback: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer)) }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Subscription item to update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::Item::PriceData)) }
+ attr_accessor :price_data
+ # Quantity for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::UpdateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class PauseCollection < Stripe::RequestParams
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ sig { returns(String) }
+ attr_accessor :behavior
+ # The time after which the subscription will resume collecting payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :resumes_at
+ sig { params(behavior: String, resumes_at: T.nilable(Integer)).void }
+ def initialize(behavior: nil, resumes_at: nil); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ sig {
+ params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
+ }
+ def initialize(amount: nil, amount_type: nil, description: nil); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :save_default_payment_method
+ sig {
+ params(payment_method_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ ); end
+ end
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior) }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem])) }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) }
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_at_period_end
+ # Details about why this subscription was cancelled
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::CancellationDetails)) }
+ attr_accessor :cancellation_details
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item])) }
+ attr_accessor :items
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PauseCollection))))
+ }
+ attr_accessor :pause_collection
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval))))
+ }
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial_from_plan
+ # Settings related to subscription trials.
+ sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::TrialSettings)) }
+ attr_accessor :trial_settings
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::Subscription::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), pause_collection: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::Subscription::UpdateParams::TrialSettings)).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancellation_details: nil,
+ collection_method: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ pause_collection: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_settings: nil
+ ); end
+ end
+ class DeleteDiscountParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CurrentPeriodEnd < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CurrentPeriodStart < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Filter subscriptions by their automatic tax settings.
+ sig { returns(T.nilable(::Stripe::Subscription::ListParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # Only return subscriptions that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Subscription::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return subscriptions whose current_period_end falls within the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)))
+ }
+ attr_accessor :current_period_end
+ # Only return subscriptions whose current_period_start falls within the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)))
+ }
+ attr_accessor :current_period_start
+ # The ID of the customer whose subscriptions will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The ID of the plan whose subscriptions will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # Filter for subscriptions that contain this recurring price ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ sig {
+ params(automatic_tax: T.nilable(::Stripe::Subscription::ListParams::AutomaticTax), collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::Subscription::ListParams::Created, Integer)), current_period_end: T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)), current_period_start: T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), plan: T.nilable(String), price: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
+ }
+ def initialize(
+ automatic_tax: nil,
+ collection_method: nil,
+ created: nil,
+ current_period_end: nil,
+ current_period_start: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ plan: nil,
+ price: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData)) }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class BillingCycleAnchorConfig < Stripe::RequestParams
+ # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
+ sig { returns(Integer) }
+ attr_accessor :day_of_month
+ # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :hour
+ # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minute
+ # The month to start full cycle billing periods. Ranges from 1 to 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :month
+ # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :second
+ sig {
+ params(day_of_month: Integer, hour: T.nilable(Integer), minute: T.nilable(Integer), month: T.nilable(Integer), second: T.nilable(Integer)).void
+ }
+ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer)) }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::Subscription::CreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::Item::PriceData)) }
+ attr_accessor :price_data
+ # Quantity for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::CreateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ sig {
+ params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
+ }
+ def initialize(amount: nil, amount_type: nil, description: nil); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ sig {
+ returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :save_default_payment_method
+ sig {
+ params(payment_method_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ ); end
+ end
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig { returns(::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior) }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem])) }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :backdate_start_date
+ # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :billing_cycle_anchor
+ # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) }
+ attr_accessor :billing_cycle_anchor_config
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_at_period_end
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The identifier of the customer to subscribe.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item])) }
+ attr_accessor :items
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # Only applies to subscriptions with `collection_method=charge_automatically`.
+ #
+ # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ #
+ # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
+ #
+ # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))))
+ }
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial_from_plan
+ # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) }
+ attr_accessor :trial_settings
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), cancel_at: T.nilable(T.any(Integer, String)), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ backdate_start_date: nil,
+ billing_cycle_anchor: nil,
+ billing_cycle_anchor_config: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ collection_method: nil,
+ currency: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class ResumeParams < Stripe::RequestParams
+ # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ sig {
+ params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
+ }
+ def initialize(
+ billing_cycle_anchor: nil,
+ expand: nil,
+ proration_behavior: nil,
+ proration_date: nil
+ ); end
+ end
+ # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
+ #
+ # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
+ #
+ # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
+ sig {
+ params(params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
+ #
+ # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
+ #
+ # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def self.cancel(subscription_exposed_id, params = {}, opts = {}); end
+
+ # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
+ #
+ # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
+ # The payment_behavior parameter determines the exact behavior of the initial payment.
+ #
+ # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead.
+ # Schedules provide the flexibility to model more complex billing configurations that change over time.
+ sig {
+ params(params: T.any(::Stripe::Subscription::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Removes the currently applied discount on a subscription.
+ sig {
+ params(params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
+ }
+ def delete_discount(params = {}, opts = {}); end
+
+ # Removes the currently applied discount on a subscription.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
+ }
+ def self.delete_discount(subscription_exposed_id, params = {}, opts = {}); end
+
+ # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
+ sig {
+ params(params: T.any(::Stripe::Subscription::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
+ sig {
+ params(params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def resume(params = {}, opts = {}); end
+
+ # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
+ sig {
+ params(subscription: String, params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def self.resume(subscription, params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Subscription::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search(params = {}, opts = {}); end
+
+ sig {
+ params(params: T.any(::Stripe::Subscription::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
+
+ # Updates an existing subscription to match the specified parameters.
+ # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
+ # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
+ #
+ # By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
+ #
+ # Switching prices does not normally change the billing date or generate an immediate charge unless:
+ #
+ #
+ # The billing interval is changed (for example, from monthly to yearly).
+ # The subscription moves from free to paid.
+ # A trial starts or ends.
+ #
+ #
+ # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
+ #
+ # If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
+ #
+ # If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription.
+ #
+ # Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing](https://stripe.com/docs/rate-limits) instead.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def self.update(subscription_exposed_id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/subscription_item.rbi b/rbi/stripe/resources/subscription_item.rbi
new file mode 100644
index 00000000..37516150
--- /dev/null
+++ b/rbi/stripe/resources/subscription_item.rbi
@@ -0,0 +1,370 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Subscription items allow you to create customer subscriptions with more than
+ # one plan, making it easy to represent complex billing relationships.
+ class SubscriptionItem < APIResource
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # The end time of this subscription item's current billing period.
+ sig { returns(Integer) }
+ attr_reader :current_period_end
+ # The start time of this subscription item's current billing period.
+ sig { returns(Integer) }
+ attr_reader :current_period_start
+ # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
+ sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
+ attr_reader :discounts
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
+ #
+ # Plans define the base price, currency, and billing cycle for recurring purchases of products.
+ # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
+ #
+ # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
+ sig { returns(Stripe::Plan) }
+ attr_reader :plan
+ # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
+ # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
+ #
+ # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
+ #
+ # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
+ sig { returns(Stripe::Price) }
+ attr_reader :price
+ # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ # The `subscription` this `subscription_item` belongs to.
+ sig { returns(String) }
+ attr_reader :subscription
+ # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
+ attr_reader :tax_rates
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+ # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :clear_usage
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ sig {
+ params(clear_usage: T.nilable(T::Boolean), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
+ }
+ def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::SubscriptionItem::UpdateParams::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionItem::UpdateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItem::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # The identifier of the new plan for this subscription item.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::SubscriptionItem::UpdateParams::PriceData)) }
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItem::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), payment_behavior: T.nilable(String), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionItem::UpdateParams::PriceData), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ off_session: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The ID of the subscription whose items will be retrieved.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), subscription: String).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ subscription: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::SubscriptionItem::CreateParams::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionItem::CreateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItem::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # The identifier of the plan to add to the subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::SubscriptionItem::CreateParams::PriceData)) }
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The identifier of the subscription to modify.
+ sig { returns(String) }
+ attr_accessor :subscription
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItem::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), payment_behavior: T.nilable(String), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionItem::CreateParams::PriceData), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), quantity: T.nilable(Integer), subscription: String, tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Adds a new item to an existing subscription. No existing items will be changed or replaced.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionItem::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
+ sig {
+ params(item: String, params: T.any(::Stripe::SubscriptionItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def self.delete(item, params = {}, opts = {}); end
+
+ # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your subscription items for a given subscription.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionItem::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the plan or quantity of an item on a current subscription.
+ sig {
+ params(item: String, params: T.any(::Stripe::SubscriptionItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def self.update(item, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi
new file mode 100644
index 00000000..fac0f142
--- /dev/null
+++ b/rbi/stripe/resources/subscription_schedule.rbi
@@ -0,0 +1,1495 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
+ #
+ # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
+ class SubscriptionSchedule < APIResource
+ class CurrentPhase < Stripe::StripeObject
+ # The end of this phase of the subscription schedule.
+ sig { returns(Integer) }
+ attr_reader :end_date
+ # The start of this phase of the subscription schedule.
+ sig { returns(Integer) }
+ attr_reader :start_date
+ end
+ class DefaultSettings < Stripe::StripeObject
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on invoices created during this phase.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ end
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :days_until_due
+ # Attribute for field issuer
+ sig { returns(Issuer) }
+ attr_reader :issuer
+ end
+ class TransferData < Stripe::StripeObject
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ # 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 during this phase of the schedule.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(String) }
+ attr_reader :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :collection_method
+ # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Attribute for field invoice_settings
+ sig { returns(InvoiceSettings) }
+ attr_reader :invoice_settings
+ # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ end
+ class Phase < Stripe::StripeObject
+ class AddInvoiceItem < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
+ attr_reader :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
+ attr_reader :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
+ attr_reader :promotion_code
+ end
+ # The stackable discounts that will be applied to the item.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # ID of the price used to generate the invoice item.
+ sig { returns(T.any(String, Stripe::Price)) }
+ attr_reader :price
+ # The quantity of the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
+ attr_reader :tax_rates
+ end
+ class AutomaticTax < Stripe::StripeObject
+ class Liability < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # If Stripe disabled automatic tax, this enum describes why.
+ sig { returns(T.nilable(String)) }
+ attr_reader :disabled_reason
+ # Whether Stripe automatically computes tax on invoices created during this phase.
+ sig { returns(T::Boolean) }
+ attr_reader :enabled
+ # 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.
+ sig { returns(T.nilable(Liability)) }
+ attr_reader :liability
+ end
+ class Discount < Stripe::StripeObject
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
+ attr_reader :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
+ attr_reader :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
+ attr_reader :promotion_code
+ end
+ class InvoiceSettings < Stripe::StripeObject
+ class Issuer < Stripe::StripeObject
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # Type of the account referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
+ attr_reader :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(Issuer)) }
+ attr_reader :issuer
+ end
+ class Item < Stripe::StripeObject
+ class Discount < Stripe::StripeObject
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
+ attr_reader :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
+ attr_reader :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
+ attr_reader :promotion_code
+ end
+ # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # ID of the plan to which the customer should be subscribed.
+ sig { returns(T.any(String, Stripe::Plan)) }
+ attr_reader :plan
+ # ID of the price to which the customer should be subscribed.
+ sig { returns(T.any(String, Stripe::Price)) }
+ attr_reader :price
+ # Quantity of the plan to which the customer should be subscribed.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
+ attr_reader :tax_rates
+ end
+ class TransferData < Stripe::StripeObject
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :amount_percent
+ # The account where funds from the payment will be transferred to upon payment success.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :destination
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
+ sig { returns(T::Array[AddInvoiceItem]) }
+ attr_reader :add_invoice_items
+ # 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 during this phase of the schedule.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :application_fee_percent
+ # Attribute for field automatic_tax
+ sig { returns(AutomaticTax) }
+ attr_reader :automatic_tax
+ # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_reader :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :collection_method
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
+ attr_reader :default_payment_method
+ # The default tax rates to apply to the subscription during this phase of the subscription schedule.
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
+ attr_reader :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
+ sig { returns(T::Array[Discount]) }
+ attr_reader :discounts
+ # The end of this phase of the subscription schedule.
+ sig { returns(Integer) }
+ attr_reader :end_date
+ # The invoice settings applicable during this phase.
+ sig { returns(T.nilable(InvoiceSettings)) }
+ attr_reader :invoice_settings
+ # Subscription items to configure the subscription to during this phase of the subscription schedule.
+ sig { returns(T::Array[Item]) }
+ attr_reader :items
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :on_behalf_of
+ # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
+ sig { returns(String) }
+ attr_reader :proration_behavior
+ # The start of this phase of the subscription schedule.
+ sig { returns(Integer) }
+ attr_reader :start_date
+ # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
+ sig { returns(T.nilable(TransferData)) }
+ attr_reader :transfer_data
+ # When the trial ends within the phase.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :trial_end
+ end
+ # ID of the Connect Application that created the schedule.
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
+ attr_reader :application
+ # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :completed_at
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
+ sig { returns(T.nilable(CurrentPhase)) }
+ attr_reader :current_phase
+ # ID of the customer who owns the subscription schedule.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Attribute for field default_settings
+ sig { returns(DefaultSettings) }
+ attr_reader :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(String) }
+ attr_reader :end_behavior
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Configuration for the subscription schedule's phases.
+ sig { returns(T::Array[Phase]) }
+ attr_reader :phases
+ # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :released_at
+ # ID of the subscription once managed by the subscription schedule (if it is released).
+ sig { returns(T.nilable(String)) }
+ attr_reader :released_subscription
+ # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
+ sig { returns(String) }
+ attr_reader :status
+ # ID of the subscription managed by the subscription schedule.
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
+ attr_reader :subscription
+ # ID of the test clock this subscription schedule belongs to.
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
+ attr_reader :test_clock
+ class ListParams < Stripe::RequestParams
+ class CanceledAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CompletedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class ReleasedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return subscription schedules that were created canceled the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)))
+ }
+ attr_accessor :canceled_at
+ # Only return subscription schedules that completed during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)))
+ }
+ attr_accessor :completed_at
+ # Only return subscription schedules that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return subscription schedules for the given customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return subscription schedules that were released during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)))
+ }
+ attr_accessor :released_at
+ # Only return subscription schedules that have not started yet.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :scheduled
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(canceled_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)), completed_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)), created: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), released_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)), scheduled: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ canceled_at: nil,
+ completed_at: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ released_at: nil,
+ scheduled: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))).void
+ }
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ ); end
+ end
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ sig { returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item]) }
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData))
+ }
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_end
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ ); end
+ end
+ # The identifier of the customer to create the subscription schedule for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Object representing the subscription schedule's default settings.
+ sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings)) }
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :from_subscription
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase])) }
+ attr_accessor :phases
+ # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :start_date
+ sig {
+ params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
+ }
+ def initialize(
+ customer: nil,
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ from_subscription: nil,
+ metadata: nil,
+ phases: nil,
+ start_date: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))).void
+ }
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ ); end
+ end
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ sig { returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item]) }
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData))
+ }
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :trial_end
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ ); end
+ end
+ # Object representing the subscription schedule's default settings.
+ sig { returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings)) }
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
+ sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase])) }
+ attr_accessor :phases
+ # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(default_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase]), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ metadata: nil,
+ phases: nil,
+ proration_behavior: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :invoice_now
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :prorate
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, invoice_now: nil, prorate: nil); end
+ end
+ class ReleaseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Keep any cancellation on the subscription that the schedule has set
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :preserve_cancel_date
+ sig {
+ params(expand: T.nilable(T::Array[String]), preserve_cancel_date: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, preserve_cancel_date: nil); end
+ end
+ # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def self.cancel(schedule, params = {}, opts = {}); end
+
+ # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionSchedule::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Retrieves the list of your subscription schedules.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionSchedule::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def release(params = {}, opts = {}); end
+
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def self.release(schedule, params = {}, opts = {}); end
+
+ # Updates an existing subscription schedule.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def self.update(schedule, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi
new file mode 100644
index 00000000..d9098655
--- /dev/null
+++ b/rbi/stripe/resources/tax/calculation.rbi
@@ -0,0 +1,474 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ # A Tax Calculation allows you to calculate the tax to collect from your customer.
+ #
+ # Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)
+ class Calculation < APIResource
+ class CustomerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class TaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ sig { returns(String) }
+ attr_reader :type
+ # The value of the tax ID.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # The customer's postal address (for example, home or business location).
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # The type of customer address provided.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # The customer's tax IDs (for example, EU VAT numbers).
+ sig { returns(T::Array[TaxId]) }
+ attr_reader :tax_ids
+ # The taxability override used for taxation.
+ sig { returns(String) }
+ attr_reader :taxability_override
+ end
+ class ShipFromDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ end
+ class ShippingCost < Stripe::StripeObject
+ class TaxBreakdown < Stripe::StripeObject
+ class Jurisdiction < Stripe::StripeObject
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # A human-readable name for the jurisdiction imposing the tax.
+ sig { returns(String) }
+ attr_reader :display_name
+ # Indicates the level of the jurisdiction imposing the tax.
+ sig { returns(String) }
+ attr_reader :level
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class TaxRateDetails < Stripe::StripeObject
+ # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
+ sig { returns(String) }
+ attr_reader :display_name
+ # The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
+ sig { returns(String) }
+ attr_reader :percentage_decimal
+ # The tax type, such as `vat` or `sales_tax`.
+ sig { returns(String) }
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Attribute for field jurisdiction
+ sig { returns(Jurisdiction) }
+ attr_reader :jurisdiction
+ # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
+ sig { returns(String) }
+ attr_reader :sourcing
+ # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :taxable_amount
+ end
+ # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).
+ sig { returns(String) }
+ attr_reader :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Detailed account of taxes relevant to shipping cost.
+ sig { returns(T::Array[TaxBreakdown]) }
+ attr_reader :tax_breakdown
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.
+ sig { returns(String) }
+ attr_reader :tax_code
+ end
+ class TaxBreakdown < Stripe::StripeObject
+ class TaxRateDetails < Stripe::StripeObject
+ class FlatAmount < Stripe::StripeObject
+ # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Three-letter ISO currency code, in lowercase.
+ sig { returns(String) }
+ attr_reader :currency
+ end
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
+ sig { returns(T.nilable(FlatAmount)) }
+ attr_reader :flat_amount
+ # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`.
+ sig { returns(String) }
+ attr_reader :percentage_decimal
+ # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
+ sig { returns(T.nilable(String)) }
+ attr_reader :rate_type
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # The tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Specifies whether the tax amount is included in the line item amount.
+ sig { returns(T::Boolean) }
+ attr_reader :inclusive
+ # Attribute for field tax_rate_details
+ sig { returns(TaxRateDetails) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :taxable_amount
+ end
+ # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount_total
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer
+ # Attribute for field customer_details
+ sig { returns(CustomerDetails) }
+ attr_reader :customer_details
+ # Timestamp of date at which the tax calculation will expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Unique identifier for the calculation.
+ sig { returns(T.nilable(String)) }
+ attr_reader :id
+ # The list of items the customer is purchasing.
+ sig { returns(T.nilable(Stripe::ListObject)) }
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The details of the ship from location, such as the address.
+ sig { returns(T.nilable(ShipFromDetails)) }
+ attr_reader :ship_from_details
+ # The shipping cost details for the calculation.
+ sig { returns(T.nilable(ShippingCost)) }
+ attr_reader :shipping_cost
+ # The amount of tax to be collected on top of the line item prices.
+ sig { returns(Integer) }
+ attr_reader :tax_amount_exclusive
+ # The amount of tax already included in the line item prices.
+ sig { returns(Integer) }
+ attr_reader :tax_amount_inclusive
+ # Breakdown of individual tax amounts that add up to the total.
+ sig { returns(T::Array[TaxBreakdown]) }
+ attr_reader :tax_breakdown
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation.
+ sig { returns(Integer) }
+ attr_reader :tax_date
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: String, line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class TaxId < Stripe::RequestParams
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(type: String, value: String).void }
+ def initialize(type: nil, value: nil); end
+ end
+ # The customer's postal address (for example, home or business location).
+ sig {
+ returns(T.nilable(::Stripe::Tax::Calculation::CreateParams::CustomerDetails::Address))
+ }
+ attr_accessor :address
+ # The type of customer address provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Tax::Calculation::CreateParams::CustomerDetails::TaxId]))
+ }
+ attr_accessor :tax_ids
+ # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_override
+ sig {
+ params(address: T.nilable(::Stripe::Tax::Calculation::CreateParams::CustomerDetails::Address), address_source: T.nilable(String), ip_address: T.nilable(String), tax_ids: T.nilable(T::Array[::Stripe::Tax::Calculation::CreateParams::CustomerDetails::TaxId]), taxability_override: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ address_source: nil,
+ ip_address: nil,
+ tax_ids: nil,
+ taxability_override: nil
+ ); end
+ end
+ class LineItem < Stripe::RequestParams
+ # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # If provided, the product's `tax_code` will be used as the line item's `tax_code`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(amount: Integer, product: T.nilable(String), quantity: T.nilable(Integer), reference: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ product: nil,
+ quantity: nil,
+ reference: nil,
+ tax_behavior: nil,
+ tax_code: nil
+ ); end
+ end
+ class ShipFromDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: String, line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The address from which the goods are being shipped from.
+ sig { returns(::Stripe::Tax::Calculation::CreateParams::ShipFromDetails::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Tax::Calculation::CreateParams::ShipFromDetails::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(amount: T.nilable(Integer), shipping_rate: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
+ }
+ def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Details about the customer, including address and tax IDs.
+ sig { returns(T.nilable(::Stripe::Tax::Calculation::CreateParams::CustomerDetails)) }
+ attr_accessor :customer_details
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A list of items the customer is purchasing.
+ sig { returns(T::Array[::Stripe::Tax::Calculation::CreateParams::LineItem]) }
+ attr_accessor :line_items
+ # Details about the address from which the goods are being shipped.
+ sig { returns(T.nilable(::Stripe::Tax::Calculation::CreateParams::ShipFromDetails)) }
+ attr_accessor :ship_from_details
+ # Shipping cost details to be used for the calculation.
+ sig { returns(T.nilable(::Stripe::Tax::Calculation::CreateParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :tax_date
+ sig {
+ params(currency: String, customer: T.nilable(String), customer_details: T.nilable(::Stripe::Tax::Calculation::CreateParams::CustomerDetails), expand: T.nilable(T::Array[String]), line_items: T::Array[::Stripe::Tax::Calculation::CreateParams::LineItem], ship_from_details: T.nilable(::Stripe::Tax::Calculation::CreateParams::ShipFromDetails), shipping_cost: T.nilable(::Stripe::Tax::Calculation::CreateParams::ShippingCost), tax_date: T.nilable(Integer)).void
+ }
+ def initialize(
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ expand: nil,
+ line_items: nil,
+ ship_from_details: nil,
+ shipping_cost: nil,
+ tax_date: nil
+ ); end
+ end
+ # Calculates tax based on the input and returns a Tax Calculation object.
+ sig {
+ params(params: T.any(::Stripe::Tax::Calculation::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Calculation)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
+ sig {
+ params(params: T.any(::Stripe::Tax::Calculation::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_line_items(params = {}, opts = {}); end
+
+ # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
+ sig {
+ params(calculation: String, params: T.any(::Stripe::Tax::Calculation::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_line_items(calculation, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax/calculation_line_item.rbi b/rbi/stripe/resources/tax/calculation_line_item.rbi
new file mode 100644
index 00000000..cf01fd2f
--- /dev/null
+++ b/rbi/stripe/resources/tax/calculation_line_item.rbi
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class CalculationLineItem < APIResource
+ class TaxBreakdown < Stripe::StripeObject
+ class Jurisdiction < Stripe::StripeObject
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # A human-readable name for the jurisdiction imposing the tax.
+ sig { returns(String) }
+ attr_reader :display_name
+ # Indicates the level of the jurisdiction imposing the tax.
+ sig { returns(String) }
+ attr_reader :level
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class TaxRateDetails < Stripe::StripeObject
+ # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
+ sig { returns(String) }
+ attr_reader :display_name
+ # The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
+ sig { returns(String) }
+ attr_reader :percentage_decimal
+ # The tax type, such as `vat` or `sales_tax`.
+ sig { returns(String) }
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Attribute for field jurisdiction
+ sig { returns(Jurisdiction) }
+ attr_reader :jurisdiction
+ # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
+ sig { returns(String) }
+ attr_reader :sourcing
+ # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :taxable_amount
+ end
+ # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The ID of an existing [Product](https://stripe.com/docs/api/products/object).
+ sig { returns(T.nilable(String)) }
+ attr_reader :product
+ # The number of units of the item being purchased. For reversals, this is the quantity reversed.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ # A custom identifier for this line item.
+ sig { returns(T.nilable(String)) }
+ attr_reader :reference
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Detailed account of taxes relevant to this line item.
+ sig { returns(T.nilable(T::Array[TaxBreakdown])) }
+ attr_reader :tax_breakdown
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
+ sig { returns(String) }
+ attr_reader :tax_code
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi
new file mode 100644
index 00000000..92097a4e
--- /dev/null
+++ b/rbi/stripe/resources/tax/registration.rbi
@@ -0,0 +1,2485 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ # A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax).
+ #
+ # Stripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering).
+ #
+ # Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api)
+ class Registration < APIResource
+ class CountryOptions < Stripe::StripeObject
+ class Ae < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Al < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Am < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ao < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class At < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Au < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ba < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Bb < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Be < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Bg < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Bh < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Bs < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class By < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ca < Stripe::StripeObject
+ class ProvinceStandard < Stripe::StripeObject
+ # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ sig { returns(String) }
+ attr_reader :province
+ end
+ # Attribute for field province_standard
+ sig { returns(ProvinceStandard) }
+ attr_reader :province_standard
+ # Type of registration in Canada.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Cd < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ch < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Cl < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Co < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Cr < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Cy < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Cz < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class De < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Dk < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ec < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ee < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Eg < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Es < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Fi < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Fr < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Gb < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ge < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Gn < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Gr < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Hr < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Hu < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Id < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ie < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Is < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class It < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Jp < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ke < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Kh < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Kr < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Kz < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Lt < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Lu < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Lv < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ma < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Md < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Me < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Mk < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Mr < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Mt < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Mx < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class My < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ng < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Nl < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class No < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Np < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Nz < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Om < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Pe < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Pl < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Pt < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ro < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Rs < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ru < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Sa < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Se < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Sg < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Si < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Sk < Stripe::StripeObject
+ class Standard < Stripe::StripeObject
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_reader :place_of_supply_scheme
+ end
+ # Attribute for field standard
+ sig { returns(Standard) }
+ attr_reader :standard
+ # Type of registration in an EU country.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Sn < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Sr < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Th < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Tj < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Tr < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Tz < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Ug < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Us < Stripe::StripeObject
+ class LocalAmusementTax < Stripe::StripeObject
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
+ sig { returns(String) }
+ attr_reader :jurisdiction
+ end
+ class LocalLeaseTax < Stripe::StripeObject
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
+ sig { returns(String) }
+ attr_reader :jurisdiction
+ end
+ class StateSalesTax < Stripe::StripeObject
+ class Election < Stripe::StripeObject
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
+ sig { returns(String) }
+ attr_reader :jurisdiction
+ # The type of the election for the state sales tax registration.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Elections for the state sales tax registration.
+ sig { returns(T::Array[Election]) }
+ attr_reader :elections
+ end
+ # Attribute for field local_amusement_tax
+ sig { returns(LocalAmusementTax) }
+ attr_reader :local_amusement_tax
+ # Attribute for field local_lease_tax
+ sig { returns(LocalLeaseTax) }
+ attr_reader :local_lease_tax
+ # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ sig { returns(String) }
+ attr_reader :state
+ # Attribute for field state_sales_tax
+ sig { returns(StateSalesTax) }
+ attr_reader :state_sales_tax
+ # Type of registration in the US.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Uy < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Uz < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Vn < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Za < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Zm < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Zw < Stripe::StripeObject
+ # Type of registration in `country`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Attribute for field ae
+ sig { returns(Ae) }
+ attr_reader :ae
+ # Attribute for field al
+ sig { returns(Al) }
+ attr_reader :al
+ # Attribute for field am
+ sig { returns(Am) }
+ attr_reader :am
+ # Attribute for field ao
+ sig { returns(Ao) }
+ attr_reader :ao
+ # Attribute for field at
+ sig { returns(At) }
+ attr_reader :at
+ # Attribute for field au
+ sig { returns(Au) }
+ attr_reader :au
+ # Attribute for field ba
+ sig { returns(Ba) }
+ attr_reader :ba
+ # Attribute for field bb
+ sig { returns(Bb) }
+ attr_reader :bb
+ # Attribute for field be
+ sig { returns(Be) }
+ attr_reader :be
+ # Attribute for field bg
+ sig { returns(Bg) }
+ attr_reader :bg
+ # Attribute for field bh
+ sig { returns(Bh) }
+ attr_reader :bh
+ # Attribute for field bs
+ sig { returns(Bs) }
+ attr_reader :bs
+ # Attribute for field by
+ sig { returns(By) }
+ attr_reader :by
+ # Attribute for field ca
+ sig { returns(Ca) }
+ attr_reader :ca
+ # Attribute for field cd
+ sig { returns(Cd) }
+ attr_reader :cd
+ # Attribute for field ch
+ sig { returns(Ch) }
+ attr_reader :ch
+ # Attribute for field cl
+ sig { returns(Cl) }
+ attr_reader :cl
+ # Attribute for field co
+ sig { returns(Co) }
+ attr_reader :co
+ # Attribute for field cr
+ sig { returns(Cr) }
+ attr_reader :cr
+ # Attribute for field cy
+ sig { returns(Cy) }
+ attr_reader :cy
+ # Attribute for field cz
+ sig { returns(Cz) }
+ attr_reader :cz
+ # Attribute for field de
+ sig { returns(De) }
+ attr_reader :de
+ # Attribute for field dk
+ sig { returns(Dk) }
+ attr_reader :dk
+ # Attribute for field ec
+ sig { returns(Ec) }
+ attr_reader :ec
+ # Attribute for field ee
+ sig { returns(Ee) }
+ attr_reader :ee
+ # Attribute for field eg
+ sig { returns(Eg) }
+ attr_reader :eg
+ # Attribute for field es
+ sig { returns(Es) }
+ attr_reader :es
+ # Attribute for field fi
+ sig { returns(Fi) }
+ attr_reader :fi
+ # Attribute for field fr
+ sig { returns(Fr) }
+ attr_reader :fr
+ # Attribute for field gb
+ sig { returns(Gb) }
+ attr_reader :gb
+ # Attribute for field ge
+ sig { returns(Ge) }
+ attr_reader :ge
+ # Attribute for field gn
+ sig { returns(Gn) }
+ attr_reader :gn
+ # Attribute for field gr
+ sig { returns(Gr) }
+ attr_reader :gr
+ # Attribute for field hr
+ sig { returns(Hr) }
+ attr_reader :hr
+ # Attribute for field hu
+ sig { returns(Hu) }
+ attr_reader :hu
+ # Attribute for field id
+ sig { returns(Id) }
+ attr_reader :id
+ # Attribute for field ie
+ sig { returns(Ie) }
+ attr_reader :ie
+ # Attribute for field is
+ sig { returns(Is) }
+ attr_reader :is
+ # Attribute for field it
+ sig { returns(It) }
+ attr_reader :it
+ # Attribute for field jp
+ sig { returns(Jp) }
+ attr_reader :jp
+ # Attribute for field ke
+ sig { returns(Ke) }
+ attr_reader :ke
+ # Attribute for field kh
+ sig { returns(Kh) }
+ attr_reader :kh
+ # Attribute for field kr
+ sig { returns(Kr) }
+ attr_reader :kr
+ # Attribute for field kz
+ sig { returns(Kz) }
+ attr_reader :kz
+ # Attribute for field lt
+ sig { returns(Lt) }
+ attr_reader :lt
+ # Attribute for field lu
+ sig { returns(Lu) }
+ attr_reader :lu
+ # Attribute for field lv
+ sig { returns(Lv) }
+ attr_reader :lv
+ # Attribute for field ma
+ sig { returns(Ma) }
+ attr_reader :ma
+ # Attribute for field md
+ sig { returns(Md) }
+ attr_reader :md
+ # Attribute for field me
+ sig { returns(Me) }
+ attr_reader :me
+ # Attribute for field mk
+ sig { returns(Mk) }
+ attr_reader :mk
+ # Attribute for field mr
+ sig { returns(Mr) }
+ attr_reader :mr
+ # Attribute for field mt
+ sig { returns(Mt) }
+ attr_reader :mt
+ # Attribute for field mx
+ sig { returns(Mx) }
+ attr_reader :mx
+ # Attribute for field my
+ sig { returns(My) }
+ attr_reader :my
+ # Attribute for field ng
+ sig { returns(Ng) }
+ attr_reader :ng
+ # Attribute for field nl
+ sig { returns(Nl) }
+ attr_reader :nl
+ # Attribute for field no
+ sig { returns(No) }
+ attr_reader :no
+ # Attribute for field np
+ sig { returns(Np) }
+ attr_reader :np
+ # Attribute for field nz
+ sig { returns(Nz) }
+ attr_reader :nz
+ # Attribute for field om
+ sig { returns(Om) }
+ attr_reader :om
+ # Attribute for field pe
+ sig { returns(Pe) }
+ attr_reader :pe
+ # Attribute for field pl
+ sig { returns(Pl) }
+ attr_reader :pl
+ # Attribute for field pt
+ sig { returns(Pt) }
+ attr_reader :pt
+ # Attribute for field ro
+ sig { returns(Ro) }
+ attr_reader :ro
+ # Attribute for field rs
+ sig { returns(Rs) }
+ attr_reader :rs
+ # Attribute for field ru
+ sig { returns(Ru) }
+ attr_reader :ru
+ # Attribute for field sa
+ sig { returns(Sa) }
+ attr_reader :sa
+ # Attribute for field se
+ sig { returns(Se) }
+ attr_reader :se
+ # Attribute for field sg
+ sig { returns(Sg) }
+ attr_reader :sg
+ # Attribute for field si
+ sig { returns(Si) }
+ attr_reader :si
+ # Attribute for field sk
+ sig { returns(Sk) }
+ attr_reader :sk
+ # Attribute for field sn
+ sig { returns(Sn) }
+ attr_reader :sn
+ # Attribute for field sr
+ sig { returns(Sr) }
+ attr_reader :sr
+ # Attribute for field th
+ sig { returns(Th) }
+ attr_reader :th
+ # Attribute for field tj
+ sig { returns(Tj) }
+ attr_reader :tj
+ # Attribute for field tr
+ sig { returns(Tr) }
+ attr_reader :tr
+ # Attribute for field tz
+ sig { returns(Tz) }
+ attr_reader :tz
+ # Attribute for field ug
+ sig { returns(Ug) }
+ attr_reader :ug
+ # Attribute for field us
+ sig { returns(Us) }
+ attr_reader :us
+ # Attribute for field uy
+ sig { returns(Uy) }
+ attr_reader :uy
+ # Attribute for field uz
+ sig { returns(Uz) }
+ attr_reader :uz
+ # Attribute for field vn
+ sig { returns(Vn) }
+ attr_reader :vn
+ # Attribute for field za
+ sig { returns(Za) }
+ attr_reader :za
+ # Attribute for field zm
+ sig { returns(Zm) }
+ attr_reader :zm
+ # Attribute for field zw
+ sig { returns(Zw) }
+ attr_reader :zw
+ end
+ # Time at which the registration becomes active. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :active_from
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # Attribute for field country_options
+ sig { returns(CountryOptions) }
+ attr_reader :country_options
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expires_at
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`.
+ sig { returns(String) }
+ attr_reader :status
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the Tax Registration.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CountryOptions < Stripe::RequestParams
+ class Ae < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Al < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Am < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ao < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class At < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Au < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ba < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Bb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Be < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Bg < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Bh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Bs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class By < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ca < Stripe::RequestParams
+ class ProvinceStandard < Stripe::RequestParams
+ # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ sig { returns(String) }
+ attr_accessor :province
+ sig { params(province: String).void }
+ def initialize(province: nil); end
+ end
+ # Options for the provincial tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca::ProvinceStandard))
+ }
+ attr_accessor :province_standard
+ # Type of registration to be created in Canada.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(province_standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca::ProvinceStandard), type: String).void
+ }
+ def initialize(province_standard: nil, type: nil); end
+ end
+ class Cd < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ch < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Cl < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Co < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Cr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Cy < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Cz < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class De < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Dk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Ec < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ee < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Eg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Es < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Fi < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Fr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Gb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ge < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Gn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Gr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Hr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Hu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Id < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ie < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Is < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class It < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Jp < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ke < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Kh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Kr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Kz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Lt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Lu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Lv < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Ma < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Md < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Me < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Mk < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Mr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Mt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Mx < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class My < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ng < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Nl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class No < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Np < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Nz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Om < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Pe < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Pl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Pt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Ro < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Rs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ru < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Sa < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Se < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Sg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Si < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Sk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Sn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Sr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Th < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Tj < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Tr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Tz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ug < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Us < Stripe::RequestParams
+ class LocalAmusementTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `64343` (River Grove), and `68081` (Schiller Park).
+ sig { returns(String) }
+ attr_accessor :jurisdiction
+ sig { params(jurisdiction: String).void }
+ def initialize(jurisdiction: nil); end
+ end
+ class LocalLeaseTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
+ sig { returns(String) }
+ attr_accessor :jurisdiction
+ sig { params(jurisdiction: String).void }
+ def initialize(jurisdiction: nil); end
+ end
+ class StateSalesTax < Stripe::RequestParams
+ class Election < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The type of the election for the state sales tax registration.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(jurisdiction: T.nilable(String), type: String).void }
+ def initialize(jurisdiction: nil, type: nil); end
+ end
+ # Elections for the state sales tax registration.
+ sig {
+ returns(T::Array[::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax::Election])
+ }
+ attr_accessor :elections
+ sig {
+ params(elections: T::Array[::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax::Election]).void
+ }
+ def initialize(elections: nil); end
+ end
+ # Options for the local amusement tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalAmusementTax))
+ }
+ attr_accessor :local_amusement_tax
+ # Options for the local lease tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalLeaseTax))
+ }
+ attr_accessor :local_lease_tax
+ # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ sig { returns(String) }
+ attr_accessor :state
+ # Options for the state sales tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax))
+ }
+ attr_accessor :state_sales_tax
+ # Type of registration to be created in the US.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(local_amusement_tax: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalAmusementTax), local_lease_tax: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalLeaseTax), state: String, state_sales_tax: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax), type: String).void
+ }
+ def initialize(
+ local_amusement_tax: nil,
+ local_lease_tax: nil,
+ state: nil,
+ state_sales_tax: nil,
+ type: nil
+ ); end
+ end
+ class Uy < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Uz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Vn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Za < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Zm < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Zw < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ # Options for the registration in AE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae)) }
+ attr_accessor :ae
+ # Options for the registration in AL.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Al)) }
+ attr_accessor :al
+ # Options for the registration in AM.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Am)) }
+ attr_accessor :am
+ # Options for the registration in AO.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ao)) }
+ attr_accessor :ao
+ # Options for the registration in AT.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At)) }
+ attr_accessor :at
+ # Options for the registration in AU.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au)) }
+ attr_accessor :au
+ # Options for the registration in BA.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ba)) }
+ attr_accessor :ba
+ # Options for the registration in BB.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bb)) }
+ attr_accessor :bb
+ # Options for the registration in BE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be)) }
+ attr_accessor :be
+ # Options for the registration in BG.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg)) }
+ attr_accessor :bg
+ # Options for the registration in BH.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh)) }
+ attr_accessor :bh
+ # Options for the registration in BS.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bs)) }
+ attr_accessor :bs
+ # Options for the registration in BY.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::By)) }
+ attr_accessor :by
+ # Options for the registration in CA.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca)) }
+ attr_accessor :ca
+ # Options for the registration in CD.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cd)) }
+ attr_accessor :cd
+ # Options for the registration in CH.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch)) }
+ attr_accessor :ch
+ # Options for the registration in CL.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl)) }
+ attr_accessor :cl
+ # Options for the registration in CO.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co)) }
+ attr_accessor :co
+ # Options for the registration in CR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr)) }
+ attr_accessor :cr
+ # Options for the registration in CY.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy)) }
+ attr_accessor :cy
+ # Options for the registration in CZ.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz)) }
+ attr_accessor :cz
+ # Options for the registration in DE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De)) }
+ attr_accessor :de
+ # Options for the registration in DK.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk)) }
+ attr_accessor :dk
+ # Options for the registration in EC.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec)) }
+ attr_accessor :ec
+ # Options for the registration in EE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee)) }
+ attr_accessor :ee
+ # Options for the registration in EG.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg)) }
+ attr_accessor :eg
+ # Options for the registration in ES.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es)) }
+ attr_accessor :es
+ # Options for the registration in FI.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi)) }
+ attr_accessor :fi
+ # Options for the registration in FR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr)) }
+ attr_accessor :fr
+ # Options for the registration in GB.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb)) }
+ attr_accessor :gb
+ # Options for the registration in GE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge)) }
+ attr_accessor :ge
+ # Options for the registration in GN.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gn)) }
+ attr_accessor :gn
+ # Options for the registration in GR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr)) }
+ attr_accessor :gr
+ # Options for the registration in HR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr)) }
+ attr_accessor :hr
+ # Options for the registration in HU.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu)) }
+ attr_accessor :hu
+ # Options for the registration in ID.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id)) }
+ attr_accessor :id
+ # Options for the registration in IE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie)) }
+ attr_accessor :ie
+ # Options for the registration in IS.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is)) }
+ attr_accessor :is
+ # Options for the registration in IT.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It)) }
+ attr_accessor :it
+ # Options for the registration in JP.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp)) }
+ attr_accessor :jp
+ # Options for the registration in KE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke)) }
+ attr_accessor :ke
+ # Options for the registration in KH.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kh)) }
+ attr_accessor :kh
+ # Options for the registration in KR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr)) }
+ attr_accessor :kr
+ # Options for the registration in KZ.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz)) }
+ attr_accessor :kz
+ # Options for the registration in LT.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt)) }
+ attr_accessor :lt
+ # Options for the registration in LU.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu)) }
+ attr_accessor :lu
+ # Options for the registration in LV.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv)) }
+ attr_accessor :lv
+ # Options for the registration in MA.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma)) }
+ attr_accessor :ma
+ # Options for the registration in MD.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md)) }
+ attr_accessor :md
+ # Options for the registration in ME.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Me)) }
+ attr_accessor :me
+ # Options for the registration in MK.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mk)) }
+ attr_accessor :mk
+ # Options for the registration in MR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mr)) }
+ attr_accessor :mr
+ # Options for the registration in MT.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt)) }
+ attr_accessor :mt
+ # Options for the registration in MX.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx)) }
+ attr_accessor :mx
+ # Options for the registration in MY.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::My)) }
+ attr_accessor :my
+ # Options for the registration in NG.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng)) }
+ attr_accessor :ng
+ # Options for the registration in NL.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl)) }
+ attr_accessor :nl
+ # Options for the registration in NO.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::No)) }
+ attr_accessor :no
+ # Options for the registration in NP.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Np)) }
+ attr_accessor :np
+ # Options for the registration in NZ.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz)) }
+ attr_accessor :nz
+ # Options for the registration in OM.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om)) }
+ attr_accessor :om
+ # Options for the registration in PE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pe)) }
+ attr_accessor :pe
+ # Options for the registration in PL.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl)) }
+ attr_accessor :pl
+ # Options for the registration in PT.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt)) }
+ attr_accessor :pt
+ # Options for the registration in RO.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro)) }
+ attr_accessor :ro
+ # Options for the registration in RS.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs)) }
+ attr_accessor :rs
+ # Options for the registration in RU.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru)) }
+ attr_accessor :ru
+ # Options for the registration in SA.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa)) }
+ attr_accessor :sa
+ # Options for the registration in SE.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se)) }
+ attr_accessor :se
+ # Options for the registration in SG.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg)) }
+ attr_accessor :sg
+ # Options for the registration in SI.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si)) }
+ attr_accessor :si
+ # Options for the registration in SK.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk)) }
+ attr_accessor :sk
+ # Options for the registration in SN.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sn)) }
+ attr_accessor :sn
+ # Options for the registration in SR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sr)) }
+ attr_accessor :sr
+ # Options for the registration in TH.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th)) }
+ attr_accessor :th
+ # Options for the registration in TJ.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tj)) }
+ attr_accessor :tj
+ # Options for the registration in TR.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr)) }
+ attr_accessor :tr
+ # Options for the registration in TZ.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz)) }
+ attr_accessor :tz
+ # Options for the registration in UG.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug)) }
+ attr_accessor :ug
+ # Options for the registration in US.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us)) }
+ attr_accessor :us
+ # Options for the registration in UY.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uy)) }
+ attr_accessor :uy
+ # Options for the registration in UZ.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz)) }
+ attr_accessor :uz
+ # Options for the registration in VN.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn)) }
+ attr_accessor :vn
+ # Options for the registration in ZA.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za)) }
+ attr_accessor :za
+ # Options for the registration in ZM.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zm)) }
+ attr_accessor :zm
+ # Options for the registration in ZW.
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)) }
+ attr_accessor :zw
+ sig {
+ params(ae: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au), ba: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bb), be: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be), bg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh), bs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl), co: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr), cy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es), fi: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie), is: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke), kh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz), lt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pe), pl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz), ug: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)).void
+ }
+ def initialize(
+ ae: nil,
+ al: nil,
+ am: nil,
+ ao: nil,
+ at: nil,
+ au: nil,
+ ba: nil,
+ bb: nil,
+ be: nil,
+ bg: nil,
+ bh: nil,
+ bs: nil,
+ by: nil,
+ ca: nil,
+ cd: nil,
+ ch: nil,
+ cl: nil,
+ co: nil,
+ cr: nil,
+ cy: nil,
+ cz: nil,
+ de: nil,
+ dk: nil,
+ ec: nil,
+ ee: nil,
+ eg: nil,
+ es: nil,
+ fi: nil,
+ fr: nil,
+ gb: nil,
+ ge: nil,
+ gn: nil,
+ gr: nil,
+ hr: nil,
+ hu: nil,
+ id: nil,
+ ie: nil,
+ is: nil,
+ it: nil,
+ jp: nil,
+ ke: nil,
+ kh: nil,
+ kr: nil,
+ kz: nil,
+ lt: nil,
+ lu: nil,
+ lv: nil,
+ ma: nil,
+ md: nil,
+ me: nil,
+ mk: nil,
+ mr: nil,
+ mt: nil,
+ mx: nil,
+ my: nil,
+ ng: nil,
+ nl: nil,
+ no: nil,
+ np: nil,
+ nz: nil,
+ om: nil,
+ pe: nil,
+ pl: nil,
+ pt: nil,
+ ro: nil,
+ rs: nil,
+ ru: nil,
+ sa: nil,
+ se: nil,
+ sg: nil,
+ si: nil,
+ sk: nil,
+ sn: nil,
+ sr: nil,
+ th: nil,
+ tj: nil,
+ tr: nil,
+ tz: nil,
+ ug: nil,
+ us: nil,
+ uy: nil,
+ uz: nil,
+ vn: nil,
+ za: nil,
+ zm: nil,
+ zw: nil
+ ); end
+ end
+ # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :active_from
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Specific options for a registration in the specified `country`.
+ sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions) }
+ attr_accessor :country_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ sig {
+ params(active_from: T.any(String, Integer), country: String, country_options: ::Stripe::Tax::Registration::CreateParams::CountryOptions, expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer)).void
+ }
+ def initialize(
+ active_from: nil,
+ country: nil,
+ country_options: nil,
+ expand: nil,
+ expires_at: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :active_from
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :expires_at
+ sig {
+ params(active_from: T.nilable(T.any(String, Integer)), expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, T.any(String, Integer))))).void
+ }
+ def initialize(active_from: nil, expand: nil, expires_at: nil); end
+ end
+ # Creates a new Tax Registration object.
+ sig {
+ params(params: T.any(::Stripe::Tax::Registration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of Tax Registration objects.
+ sig {
+ params(params: T.any(::Stripe::Tax::Registration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates an existing Tax Registration object.
+ #
+ # A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.
+ sig {
+ params(id: String, params: T.any(::Stripe::Tax::Registration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration)
+ }
+ def self.update(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax/settings.rbi b/rbi/stripe/resources/tax/settings.rbi
new file mode 100644
index 00000000..a4dbc0cb
--- /dev/null
+++ b/rbi/stripe/resources/tax/settings.rbi
@@ -0,0 +1,141 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ # You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.
+ #
+ # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
+ class Settings < SingletonAPIResource
+ class Defaults < Stripe::StripeObject
+ # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_behavior
+ # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_code
+ end
+ class HeadOffice < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ end
+ class StatusDetails < Stripe::StripeObject
+ class Active < Stripe::StripeObject; end
+ class Pending < Stripe::StripeObject
+ # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :missing_fields
+ end
+ # Attribute for field active
+ sig { returns(Active) }
+ attr_reader :active
+ # Attribute for field pending
+ sig { returns(Pending) }
+ attr_reader :pending
+ end
+ # Attribute for field defaults
+ sig { returns(Defaults) }
+ attr_reader :defaults
+ # The place where your business is located.
+ sig { returns(T.nilable(HeadOffice)) }
+ attr_reader :head_office
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The status of the Tax `Settings`.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_details
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ class UpdateParams < Stripe::RequestParams
+ class Defaults < Stripe::RequestParams
+ # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig { params(tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void }
+ def initialize(tax_behavior: nil, tax_code: nil); end
+ end
+ class HeadOffice < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The location of the business for tax purposes.
+ sig { returns(::Stripe::Tax::Settings::UpdateParams::HeadOffice::Address) }
+ attr_accessor :address
+ sig { params(address: ::Stripe::Tax::Settings::UpdateParams::HeadOffice::Address).void }
+ def initialize(address: nil); end
+ end
+ # Default configuration to be used on Stripe Tax calculations.
+ sig { returns(T.nilable(::Stripe::Tax::Settings::UpdateParams::Defaults)) }
+ attr_accessor :defaults
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The place where your business is located.
+ sig { returns(T.nilable(::Stripe::Tax::Settings::UpdateParams::HeadOffice)) }
+ attr_accessor :head_office
+ sig {
+ params(defaults: T.nilable(::Stripe::Tax::Settings::UpdateParams::Defaults), expand: T.nilable(T::Array[String]), head_office: T.nilable(::Stripe::Tax::Settings::UpdateParams::HeadOffice)).void
+ }
+ def initialize(defaults: nil, expand: nil, head_office: nil); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax/transaction.rbi b/rbi/stripe/resources/tax/transaction.rbi
new file mode 100644
index 00000000..f7c00b76
--- /dev/null
+++ b/rbi/stripe/resources/tax/transaction.rbi
@@ -0,0 +1,351 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ # A Tax Transaction records the tax collected from or refunded to your customer.
+ #
+ # Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)
+ class Transaction < APIResource
+ class CustomerDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class TaxId < Stripe::StripeObject
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
+ sig { returns(String) }
+ attr_reader :type
+ # The value of the tax ID.
+ sig { returns(String) }
+ attr_reader :value
+ end
+ # The customer's postal address (for example, home or business location).
+ sig { returns(T.nilable(Address)) }
+ attr_reader :address
+ # The type of customer address provided.
+ sig { returns(T.nilable(String)) }
+ attr_reader :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # The customer's tax IDs (for example, EU VAT numbers).
+ sig { returns(T::Array[TaxId]) }
+ attr_reader :tax_ids
+ # The taxability override used for taxation.
+ sig { returns(String) }
+ attr_reader :taxability_override
+ end
+ class Reversal < Stripe::StripeObject
+ # The `id` of the reversed `Transaction` object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :original_transaction
+ end
+ class ShipFromDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ end
+ class ShippingCost < Stripe::StripeObject
+ class TaxBreakdown < Stripe::StripeObject
+ class Jurisdiction < Stripe::StripeObject
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # A human-readable name for the jurisdiction imposing the tax.
+ sig { returns(String) }
+ attr_reader :display_name
+ # Indicates the level of the jurisdiction imposing the tax.
+ sig { returns(String) }
+ attr_reader :level
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ class TaxRateDetails < Stripe::StripeObject
+ # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
+ sig { returns(String) }
+ attr_reader :display_name
+ # The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
+ sig { returns(String) }
+ attr_reader :percentage_decimal
+ # The tax type, such as `vat` or `sales_tax`.
+ sig { returns(String) }
+ attr_reader :tax_type
+ end
+ # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Attribute for field jurisdiction
+ sig { returns(Jurisdiction) }
+ attr_reader :jurisdiction
+ # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
+ sig { returns(String) }
+ attr_reader :sourcing
+ # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
+ sig { returns(T.nilable(TaxRateDetails)) }
+ attr_reader :tax_rate_details
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
+ sig { returns(String) }
+ attr_reader :taxability_reason
+ # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :taxable_amount
+ end
+ # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object).
+ sig { returns(String) }
+ attr_reader :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.)
+ sig { returns(T::Array[TaxBreakdown]) }
+ attr_reader :tax_breakdown
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping.
+ sig { returns(String) }
+ attr_reader :tax_code
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer
+ # Attribute for field customer_details
+ sig { returns(CustomerDetails) }
+ attr_reader :customer_details
+ # Unique identifier for the transaction.
+ sig { returns(String) }
+ attr_reader :id
+ # The tax collected or refunded, by line item.
+ sig { returns(T.nilable(Stripe::ListObject)) }
+ attr_reader :line_items
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The Unix timestamp representing when the tax liability is assumed or reduced.
+ sig { returns(Integer) }
+ attr_reader :posted_at
+ # A custom unique identifier, such as 'myOrder_123'.
+ sig { returns(String) }
+ attr_reader :reference
+ # If `type=reversal`, contains information about what was reversed.
+ sig { returns(T.nilable(Reversal)) }
+ attr_reader :reversal
+ # The details of the ship from location, such as the address.
+ sig { returns(T.nilable(ShipFromDetails)) }
+ attr_reader :ship_from_details
+ # The shipping cost details for the transaction.
+ sig { returns(T.nilable(ShippingCost)) }
+ attr_reader :shipping_cost
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation.
+ sig { returns(Integer) }
+ attr_reader :tax_date
+ # If `reversal`, this transaction reverses an earlier transaction.
+ sig { returns(String) }
+ attr_reader :type
+ class ListLineItemsParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateFromCalculationParams < Stripe::RequestParams
+ # Tax Calculation ID to be used as input when creating the transaction.
+ sig { returns(String) }
+ attr_accessor :calculation
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :posted_at
+ # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.
+ sig { returns(String) }
+ attr_accessor :reference
+ sig {
+ params(calculation: String, expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), posted_at: T.nilable(Integer), reference: String).void
+ }
+ def initialize(
+ calculation: nil,
+ expand: nil,
+ metadata: nil,
+ posted_at: nil,
+ reference: nil
+ ); end
+ end
+ class CreateReversalParams < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount_tax
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The `id` of the line item to reverse in the original transaction.
+ sig { returns(String) }
+ attr_accessor :original_line_item
+ # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.
+ sig { returns(String) }
+ attr_accessor :reference
+ sig {
+ params(amount: Integer, amount_tax: Integer, metadata: T.nilable(T::Hash[String, String]), original_line_item: String, quantity: T.nilable(Integer), reference: String).void
+ }
+ def initialize(
+ amount: nil,
+ amount_tax: nil,
+ metadata: nil,
+ original_line_item: nil,
+ quantity: nil,
+ reference: nil
+ ); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount_tax
+ sig { params(amount: Integer, amount_tax: Integer).void }
+ def initialize(amount: nil, amount_tax: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # The line item amounts to reverse.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Tax::Transaction::CreateReversalParams::LineItem]))
+ }
+ attr_accessor :line_items
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
+ sig { returns(String) }
+ attr_accessor :mode
+ # The ID of the Transaction to partially or fully reverse.
+ sig { returns(String) }
+ attr_accessor :original_transaction
+ # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports).
+ sig { returns(String) }
+ attr_accessor :reference
+ # The shipping cost to reverse.
+ sig { returns(T.nilable(::Stripe::Tax::Transaction::CreateReversalParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ sig {
+ params(expand: T.nilable(T::Array[String]), flat_amount: T.nilable(Integer), line_items: T.nilable(T::Array[::Stripe::Tax::Transaction::CreateReversalParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), mode: String, original_transaction: String, reference: String, shipping_cost: T.nilable(::Stripe::Tax::Transaction::CreateReversalParams::ShippingCost)).void
+ }
+ def initialize(
+ expand: nil,
+ flat_amount: nil,
+ line_items: nil,
+ metadata: nil,
+ mode: nil,
+ original_transaction: nil,
+ reference: nil,
+ shipping_cost: nil
+ ); end
+ end
+ # Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
+ sig {
+ params(params: T.any(::Stripe::Tax::Transaction::CreateFromCalculationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction)
+ }
+ def self.create_from_calculation(params = {}, opts = {}); end
+
+ # Partially or fully reverses a previously created Transaction.
+ sig {
+ params(params: T.any(::Stripe::Tax::Transaction::CreateReversalParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction)
+ }
+ def self.create_reversal(params = {}, opts = {}); end
+
+ # Retrieves the line items of a committed standalone transaction as a collection.
+ sig {
+ params(params: T.any(::Stripe::Tax::Transaction::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list_line_items(params = {}, opts = {}); end
+
+ # Retrieves the line items of a committed standalone transaction as a collection.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::Tax::Transaction::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list_line_items(transaction, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax/transaction_line_item.rbi b/rbi/stripe/resources/tax/transaction_line_item.rbi
new file mode 100644
index 00000000..0f35af49
--- /dev/null
+++ b/rbi/stripe/resources/tax/transaction_line_item.rbi
@@ -0,0 +1,54 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class TransactionLineItem < APIResource
+ class Reversal < Stripe::StripeObject
+ # The `id` of the line item to reverse in the original transaction.
+ sig { returns(String) }
+ attr_reader :original_line_item
+ end
+ # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount_tax
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The ID of an existing [Product](https://stripe.com/docs/api/products/object).
+ sig { returns(T.nilable(String)) }
+ attr_reader :product
+ # The number of units of the item being purchased. For reversals, this is the quantity reversed.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ # A custom identifier for this line item in the transaction.
+ sig { returns(String) }
+ attr_reader :reference
+ # If `type=reversal`, contains information about what was reversed.
+ sig { returns(T.nilable(Reversal)) }
+ attr_reader :reversal
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
+ sig { returns(String) }
+ attr_reader :tax_behavior
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
+ sig { returns(String) }
+ attr_reader :tax_code
+ # If `reversal`, this line item reverses an earlier transaction.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax_code.rbi b/rbi/stripe/resources/tax_code.rbi
new file mode 100644
index 00000000..29002ccc
--- /dev/null
+++ b/rbi/stripe/resources/tax_code.rbi
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
+ class TaxCode < APIResource
+ # A detailed description of which types of products the tax code represents.
+ sig { returns(String) }
+ attr_reader :description
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # A short name for the tax code.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
+ sig {
+ params(params: T.any(::Stripe::TaxCode::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax_deducted_at_source.rbi b/rbi/stripe/resources/tax_deducted_at_source.rbi
new file mode 100644
index 00000000..798d67b2
--- /dev/null
+++ b/rbi/stripe/resources/tax_deducted_at_source.rbi
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TaxDeductedAtSource < APIResource
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.
+ sig { returns(Integer) }
+ attr_reader :period_end
+ # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period.
+ sig { returns(Integer) }
+ attr_reader :period_start
+ # The TAN that was supplied to Stripe when TDS was assessed
+ sig { returns(String) }
+ attr_reader :tax_deduction_account_number
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax_id.rbi b/rbi/stripe/resources/tax_id.rbi
new file mode 100644
index 00000000..53f0fe96
--- /dev/null
+++ b/rbi/stripe/resources/tax_id.rbi
@@ -0,0 +1,167 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account.
+ # Customer and account tax IDs get displayed on related invoices and credit notes.
+ #
+ # Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids)
+ class TaxId < APIResource
+ class Owner < Stripe::StripeObject
+ # The account being referenced when `type` is `account`.
+ sig { returns(T.any(String, Stripe::Account)) }
+ attr_reader :account
+ # The Connect Application being referenced when `type` is `application`.
+ sig { returns(T.any(String, Stripe::Application)) }
+ attr_reader :application
+ # The customer being referenced when `type` is `customer`.
+ sig { returns(T.any(String, Stripe::Customer)) }
+ attr_reader :customer
+ # Type of owner referenced.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class Verification < Stripe::StripeObject
+ # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.
+ sig { returns(String) }
+ attr_reader :status
+ # Verified address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_address
+ # Verified name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :verified_name
+ end
+ # Two-letter ISO code representing the country of the tax ID.
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # ID of the customer.
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
+ attr_reader :customer
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The account or customer the tax ID belongs to.
+ sig { returns(T.nilable(Owner)) }
+ attr_reader :owner
+ # 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`
+ sig { returns(String) }
+ attr_reader :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_reader :value
+ # Tax ID verification information.
+ sig { returns(T.nilable(Verification)) }
+ attr_reader :verification
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Type of owner referenced.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), customer: T.nilable(String), type: String).void }
+ def initialize(account: nil, customer: nil, type: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ sig { returns(T.nilable(::Stripe::TaxId::ListParams::Owner)) }
+ attr_accessor :owner
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), owner: T.nilable(::Stripe::TaxId::ListParams::Owner), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ owner: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Type of owner referenced.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), customer: T.nilable(String), type: String).void }
+ def initialize(account: nil, customer: nil, type: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ sig { returns(T.nilable(::Stripe::TaxId::CreateParams::Owner)) }
+ attr_accessor :owner
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig {
+ params(expand: T.nilable(T::Array[String]), owner: T.nilable(::Stripe::TaxId::CreateParams::Owner), type: String, value: String).void
+ }
+ def initialize(expand: nil, owner: nil, type: nil, value: nil); end
+ end
+ # Creates a new account or customer tax_id object.
+ sig {
+ params(params: T.any(::Stripe::TaxId::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes an existing account or customer tax_id object.
+ sig {
+ params(id: String, params: T.any(::Stripe::TaxId::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def self.delete(id, params = {}, opts = {}); end
+
+ # Deletes an existing account or customer tax_id object.
+ sig {
+ params(params: T.any(::Stripe::TaxId::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of tax IDs.
+ sig {
+ params(params: T.any(::Stripe::TaxId::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi
new file mode 100644
index 00000000..f02e4561
--- /dev/null
+++ b/rbi/stripe/resources/tax_rate.rbi
@@ -0,0 +1,239 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # 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.
+ #
+ # Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
+ class TaxRate < APIResource
+ class FlatAmount < Stripe::StripeObject
+ # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Three-letter ISO currency code, in lowercase.
+ sig { returns(String) }
+ attr_reader :currency
+ end
+ # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ sig { returns(T::Boolean) }
+ attr_reader :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
+ sig { returns(String) }
+ attr_reader :display_name
+ # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,
+ # this percentage reflects the rate actually used to calculate tax based on the product's taxability
+ # and whether the user is registered to collect taxes in the corresponding jurisdiction.
+ sig { returns(T.nilable(Float)) }
+ attr_reader :effective_percentage
+ # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
+ sig { returns(T.nilable(FlatAmount)) }
+ attr_reader :flat_amount
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_reader :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_reader :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.
+ sig { returns(T.nilable(String)) }
+ attr_reader :jurisdiction_level
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
+ sig { returns(Float) }
+ attr_reader :percentage
+ # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
+ sig { returns(T.nilable(String)) }
+ attr_reader :rate_type
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :tax_type
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Optional flag to filter by tax rates that are either active or inactive (archived).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Optional range for filtering created date.
+ sig { returns(T.nilable(T.any(::Stripe::TaxRate::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :inclusive
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::TaxRate::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), inclusive: T.nilable(T::Boolean), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ inclusive: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # This represents the tax rate percent out of 100.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(active: T.nilable(T::Boolean), country: T.nilable(String), description: T.nilable(String), display_name: String, expand: T.nilable(T::Array[String]), inclusive: T::Boolean, jurisdiction: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(active: T.nilable(T::Boolean), country: T.nilable(String), description: T.nilable(String), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), jurisdiction: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # Creates a new tax rate.
+ sig {
+ params(params: T.any(::Stripe::TaxRate::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
+ sig {
+ params(params: T.any(::Stripe::TaxRate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates an existing tax rate.
+ sig {
+ params(tax_rate: String, params: T.any(::Stripe::TaxRate::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate)
+ }
+ def self.update(tax_rate, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi
new file mode 100644
index 00000000..48d7e725
--- /dev/null
+++ b/rbi/stripe/resources/terminal/configuration.rbi
@@ -0,0 +1,1388 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ # A Configurations object represents how features should be configured for terminal readers.
+ class Configuration < APIResource
+ class BbposWiseposE < Stripe::StripeObject
+ # A File ID representing an image to display on the reader
+ sig { returns(T.any(String, Stripe::File)) }
+ attr_reader :splashscreen
+ end
+ class Offline < Stripe::StripeObject
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :enabled
+ end
+ class RebootWindow < Stripe::StripeObject
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ sig { returns(Integer) }
+ attr_reader :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ sig { returns(Integer) }
+ attr_reader :start_hour
+ end
+ class StripeS700 < Stripe::StripeObject
+ # A File ID representing an image to display on the reader
+ sig { returns(T.any(String, Stripe::File)) }
+ attr_reader :splashscreen
+ end
+ class Tipping < Stripe::StripeObject
+ class Aud < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Cad < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Chf < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Czk < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Dkk < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Eur < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Gbp < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Hkd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Jpy < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Myr < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Nok < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Nzd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Pln < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Sek < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Sgd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ class Usd < Stripe::StripeObject
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_reader :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(Integer) }
+ attr_reader :smart_tip_threshold
+ end
+ # Attribute for field aud
+ sig { returns(Aud) }
+ attr_reader :aud
+ # Attribute for field cad
+ sig { returns(Cad) }
+ attr_reader :cad
+ # Attribute for field chf
+ sig { returns(Chf) }
+ attr_reader :chf
+ # Attribute for field czk
+ sig { returns(Czk) }
+ attr_reader :czk
+ # Attribute for field dkk
+ sig { returns(Dkk) }
+ attr_reader :dkk
+ # Attribute for field eur
+ sig { returns(Eur) }
+ attr_reader :eur
+ # Attribute for field gbp
+ sig { returns(Gbp) }
+ attr_reader :gbp
+ # Attribute for field hkd
+ sig { returns(Hkd) }
+ attr_reader :hkd
+ # Attribute for field jpy
+ sig { returns(Jpy) }
+ attr_reader :jpy
+ # Attribute for field myr
+ sig { returns(Myr) }
+ attr_reader :myr
+ # Attribute for field nok
+ sig { returns(Nok) }
+ attr_reader :nok
+ # Attribute for field nzd
+ sig { returns(Nzd) }
+ attr_reader :nzd
+ # Attribute for field pln
+ sig { returns(Pln) }
+ attr_reader :pln
+ # Attribute for field sek
+ sig { returns(Sek) }
+ attr_reader :sek
+ # Attribute for field sgd
+ sig { returns(Sgd) }
+ attr_reader :sgd
+ # Attribute for field usd
+ sig { returns(Usd) }
+ attr_reader :usd
+ end
+ class VerifoneP400 < Stripe::StripeObject
+ # A File ID representing an image to display on the reader
+ sig { returns(T.any(String, Stripe::File)) }
+ attr_reader :splashscreen
+ end
+ class Wifi < Stripe::StripeObject
+ class EnterpriseEapPeap < Stripe::StripeObject
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(String) }
+ attr_reader :ca_certificate_file
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_reader :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_reader :ssid
+ # Username for connecting to the WiFi network
+ sig { returns(String) }
+ attr_reader :username
+ end
+ class EnterpriseEapTls < Stripe::StripeObject
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(String) }
+ attr_reader :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ sig { returns(String) }
+ attr_reader :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ sig { returns(String) }
+ attr_reader :private_key_file
+ # Password for the private key file
+ sig { returns(String) }
+ attr_reader :private_key_file_password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_reader :ssid
+ end
+ class PersonalPsk < Stripe::StripeObject
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_reader :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_reader :ssid
+ end
+ # Attribute for field enterprise_eap_peap
+ sig { returns(EnterpriseEapPeap) }
+ attr_reader :enterprise_eap_peap
+ # Attribute for field enterprise_eap_tls
+ sig { returns(EnterpriseEapTls) }
+ attr_reader :enterprise_eap_tls
+ # Attribute for field personal_psk
+ sig { returns(PersonalPsk) }
+ attr_reader :personal_psk
+ # Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Attribute for field bbpos_wisepos_e
+ sig { returns(BbposWiseposE) }
+ attr_reader :bbpos_wisepos_e
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Whether this Configuration is the default for your account
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :is_account_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String indicating the name of the Configuration object, set by the user
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Attribute for field offline
+ sig { returns(Offline) }
+ attr_reader :offline
+ # Attribute for field reboot_window
+ sig { returns(RebootWindow) }
+ attr_reader :reboot_window
+ # Attribute for field stripe_s700
+ sig { returns(StripeS700) }
+ attr_reader :stripe_s700
+ # Attribute for field tipping
+ sig { returns(Tipping) }
+ attr_reader :tipping
+ # Attribute for field verifone_p400
+ sig { returns(VerifoneP400) }
+ attr_reader :verifone_p400
+ # Attribute for field wifi
+ sig { returns(Wifi) }
+ attr_reader :wifi
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ sig { returns(Integer) }
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ sig { returns(Integer) }
+ attr_accessor :start_hour
+ sig { params(end_hour: Integer, start_hour: Integer).void }
+ def initialize(end_hour: nil, start_hour: nil); end
+ end
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ # Tipping configuration for AUD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Aud)) }
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Cad)) }
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Chf)) }
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Czk)) }
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Dkk)) }
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Eur)) }
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Gbp)) }
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Hkd)) }
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Jpy)) }
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Myr)) }
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nok)) }
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nzd)) }
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Pln)) }
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sek)) }
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sgd)) }
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Usd)) }
+ attr_accessor :usd
+ sig {
+ params(aud: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Aud), cad: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Cad), chf: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Chf), czk: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Czk), dkk: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Dkk), eur: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Eur), gbp: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Gbp), hkd: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Hkd), jpy: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Jpy), myr: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Myr), nok: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nok), nzd: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nzd), pln: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Pln), sek: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sek), sgd: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sgd), usd: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Usd)).void
+ }
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ ); end
+ end
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :username
+ sig {
+ params(ca_certificate_file: T.nilable(String), password: String, ssid: String, username: String).void
+ }
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil); end
+ end
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ sig { returns(String) }
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ sig { returns(String) }
+ attr_accessor :private_key_file
+ # Password for the private key file
+ sig { returns(T.nilable(String)) }
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig {
+ params(ca_certificate_file: T.nilable(String), client_certificate_file: String, private_key_file: String, private_key_file_password: T.nilable(String), ssid: String).void
+ }
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ ); end
+ end
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig { params(password: String, ssid: String).void }
+ def initialize(password: nil, ssid: nil); end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Wifi::EnterpriseEapPeap))
+ }
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Wifi::EnterpriseEapTls))
+ }
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Wifi::PersonalPsk))
+ }
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(enterprise_eap_peap: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Wifi::EnterpriseEapPeap), enterprise_eap_tls: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Wifi::EnterpriseEapTls), personal_psk: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Wifi::PersonalPsk), type: String).void
+ }
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ ); end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::BbposWiseposE))))
+ }
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Name of the configuration
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::Offline))))
+ }
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::RebootWindow))))
+ }
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::StripeS700))))
+ }
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::Tipping))))
+ }
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::VerifoneP400))))
+ }
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::Wifi))))
+ }
+ attr_accessor :wifi
+ sig {
+ params(bbpos_wisepos_e: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::BbposWiseposE))), expand: T.nilable(T::Array[String]), name: T.nilable(String), offline: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::Offline))), reboot_window: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::RebootWindow))), stripe_s700: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::StripeS700))), tipping: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::Tipping))), verifone_p400: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::VerifoneP400))), wifi: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::UpdateParams::Wifi)))).void
+ }
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # if present, only return the account default or non-default configurations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_account_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), is_account_default: T.nilable(T::Boolean), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ is_account_default: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ sig { returns(Integer) }
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ sig { returns(Integer) }
+ attr_accessor :start_hour
+ sig { params(end_hour: Integer, start_hour: Integer).void }
+ def initialize(end_hour: nil, start_hour: nil); end
+ end
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ # Tipping configuration for AUD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Aud)) }
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Cad)) }
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Chf)) }
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Czk)) }
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Dkk)) }
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Eur)) }
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Gbp)) }
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Hkd)) }
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Jpy)) }
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Myr)) }
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Nok)) }
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Nzd)) }
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Pln)) }
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Sek)) }
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Sgd)) }
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Usd)) }
+ attr_accessor :usd
+ sig {
+ params(aud: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Aud), cad: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Cad), chf: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Chf), czk: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Czk), dkk: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Dkk), eur: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Eur), gbp: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Gbp), hkd: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Hkd), jpy: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Jpy), myr: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Myr), nok: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Nok), nzd: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Nzd), pln: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Pln), sek: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Sek), sgd: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Sgd), usd: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping::Usd)).void
+ }
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ ); end
+ end
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :username
+ sig {
+ params(ca_certificate_file: T.nilable(String), password: String, ssid: String, username: String).void
+ }
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil); end
+ end
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ sig { returns(String) }
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ sig { returns(String) }
+ attr_accessor :private_key_file
+ # Password for the private key file
+ sig { returns(T.nilable(String)) }
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig {
+ params(ca_certificate_file: T.nilable(String), client_certificate_file: String, private_key_file: String, private_key_file_password: T.nilable(String), ssid: String).void
+ }
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ ); end
+ end
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig { params(password: String, ssid: String).void }
+ def initialize(password: nil, ssid: nil); end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Wifi::EnterpriseEapPeap))
+ }
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Wifi::EnterpriseEapTls))
+ }
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Wifi::PersonalPsk))
+ }
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(enterprise_eap_peap: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Wifi::EnterpriseEapPeap), enterprise_eap_tls: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Wifi::EnterpriseEapTls), personal_psk: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Wifi::PersonalPsk), type: String).void
+ }
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ ); end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::BbposWiseposE)) }
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Name of the configuration
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::CreateParams::Offline))))
+ }
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::RebootWindow)) }
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::StripeS700)) }
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::CreateParams::Tipping))))
+ }
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::VerifoneP400)) }
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::CreateParams::Wifi))))
+ }
+ attr_accessor :wifi
+ sig {
+ params(bbpos_wisepos_e: T.nilable(::Stripe::Terminal::Configuration::CreateParams::BbposWiseposE), expand: T.nilable(T::Array[String]), name: T.nilable(String), offline: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::CreateParams::Offline))), reboot_window: T.nilable(::Stripe::Terminal::Configuration::CreateParams::RebootWindow), stripe_s700: T.nilable(::Stripe::Terminal::Configuration::CreateParams::StripeS700), tipping: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::CreateParams::Tipping))), verifone_p400: T.nilable(::Stripe::Terminal::Configuration::CreateParams::VerifoneP400), wifi: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::Configuration::CreateParams::Wifi)))).void
+ }
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ ); end
+ end
+ # Creates a new Configuration object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Configuration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a Configuration object.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::Terminal::Configuration::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def self.delete(configuration, params = {}, opts = {}); end
+
+ # Deletes a Configuration object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Configuration::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of Configuration objects.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Configuration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a new Configuration object.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::Terminal::Configuration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def self.update(configuration, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/terminal/connection_token.rbi b/rbi/stripe/resources/terminal/connection_token.rbi
new file mode 100644
index 00000000..5790ba6e
--- /dev/null
+++ b/rbi/stripe/resources/terminal/connection_token.rbi
@@ -0,0 +1,37 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ # A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
+ #
+ # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
+ class ConnectionToken < APIResource
+ # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ sig { returns(String) }
+ attr_reader :location
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Your application should pass this token to the Stripe Terminal SDK.
+ sig { returns(String) }
+ attr_reader :secret
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :location
+ sig { params(expand: T.nilable(T::Array[String]), location: T.nilable(String)).void }
+ def initialize(expand: nil, location: nil); end
+ end
+ # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
+ sig {
+ params(params: T.any(::Stripe::Terminal::ConnectionToken::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::ConnectionToken)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi
new file mode 100644
index 00000000..215df774
--- /dev/null
+++ b/rbi/stripe/resources/terminal/location.rbi
@@ -0,0 +1,224 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ # A Location represents a grouping of readers.
+ #
+ # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
+ class Location < APIResource
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ sig { returns(String) }
+ attr_reader :configuration_overrides
+ # The display name of the location.
+ sig { returns(String) }
+ attr_reader :display_name
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location.
+ sig { returns(T.nilable(::Stripe::Terminal::Location::UpdateParams::Address)) }
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :configuration_overrides
+ # A name for the location.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(address: T.nilable(::Stripe::Terminal::Location::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: String, line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The full address of the location.
+ sig { returns(::Stripe::Terminal::Location::CreateParams::Address) }
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :configuration_overrides
+ # A name for the location. Maximum length is 1000 characters.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(address: ::Stripe::Terminal::Location::CreateParams::Address, configuration_overrides: T.nilable(String), display_name: String, expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ ); end
+ end
+ # Creates a new Location object.
+ # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Location::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a Location object.
+ sig {
+ params(location: String, params: T.any(::Stripe::Terminal::Location::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def self.delete(location, params = {}, opts = {}); end
+
+ # Deletes a Location object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Location::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of Location objects.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Location::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(location: String, params: T.any(::Stripe::Terminal::Location::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def self.update(location, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi
new file mode 100644
index 00000000..1eac6a8d
--- /dev/null
+++ b/rbi/stripe/resources/terminal/reader.rbi
@@ -0,0 +1,587 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ # A Reader represents a physical device for accepting payment details.
+ #
+ # Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader)
+ class Reader < APIResource
+ class Action < Stripe::StripeObject
+ class ProcessPaymentIntent < Stripe::StripeObject
+ class ProcessConfig < Stripe::StripeObject
+ class Tipping < Stripe::StripeObject
+ # 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).
+ sig { returns(Integer) }
+ attr_reader :amount_eligible
+ end
+ # Enable customer initiated cancellation when processing this payment.
+ sig { returns(T::Boolean) }
+ attr_reader :enable_customer_cancellation
+ # Override showing a tipping selection screen on this transaction.
+ sig { returns(T::Boolean) }
+ attr_reader :skip_tipping
+ # Represents a per-transaction tipping configuration
+ sig { returns(Tipping) }
+ attr_reader :tipping
+ end
+ # Most recent PaymentIntent processed by the reader.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ # Represents a per-transaction override of a reader configuration
+ sig { returns(ProcessConfig) }
+ attr_reader :process_config
+ end
+ class ProcessSetupIntent < Stripe::StripeObject
+ class ProcessConfig < Stripe::StripeObject
+ # Enable customer initiated cancellation when processing this SetupIntent.
+ sig { returns(T::Boolean) }
+ attr_reader :enable_customer_cancellation
+ end
+ # 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.
+ sig { returns(String) }
+ attr_reader :generated_card
+ # Represents a per-setup override of a reader configuration
+ sig { returns(ProcessConfig) }
+ attr_reader :process_config
+ # Most recent SetupIntent processed by the reader.
+ sig { returns(T.any(String, Stripe::SetupIntent)) }
+ attr_reader :setup_intent
+ end
+ class RefundPayment < Stripe::StripeObject
+ class RefundPaymentConfig < Stripe::StripeObject
+ # Enable customer initiated cancellation when refunding this payment.
+ sig { returns(T::Boolean) }
+ attr_reader :enable_customer_cancellation
+ end
+ # The amount being refunded.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Charge that is being refunded.
+ sig { returns(T.any(String, Stripe::Charge)) }
+ attr_reader :charge
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # Payment intent that is being refunded.
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
+ attr_reader :payment_intent
+ # The reason for the refund.
+ sig { returns(String) }
+ attr_reader :reason
+ # Unique identifier for the refund object.
+ sig { returns(T.any(String, Stripe::Refund)) }
+ attr_reader :refund
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ sig { returns(T::Boolean) }
+ attr_reader :refund_application_fee
+ # Represents a per-transaction override of a reader configuration
+ sig { returns(RefundPaymentConfig) }
+ attr_reader :refund_payment_config
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
+ sig { returns(T::Boolean) }
+ attr_reader :reverse_transfer
+ end
+ class SetReaderDisplay < Stripe::StripeObject
+ class Cart < Stripe::StripeObject
+ class LineItem < Stripe::StripeObject
+ # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Description of the line item.
+ sig { returns(String) }
+ attr_reader :description
+ # The quantity of the line item.
+ sig { returns(Integer) }
+ attr_reader :quantity
+ end
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # List of line items in the cart.
+ sig { returns(T::Array[LineItem]) }
+ attr_reader :line_items
+ # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :tax
+ # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_reader :total
+ end
+ # Cart object to be displayed by the reader.
+ sig { returns(T.nilable(Cart)) }
+ attr_reader :cart
+ # Type of information to be displayed by the reader.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Failure code, only set if status is `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_code
+ # Detailed failure message, only set if status is `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_message
+ # Represents a reader action to process a payment intent
+ sig { returns(ProcessPaymentIntent) }
+ attr_reader :process_payment_intent
+ # Represents a reader action to process a setup intent
+ sig { returns(ProcessSetupIntent) }
+ attr_reader :process_setup_intent
+ # Represents a reader action to refund a payment
+ sig { returns(RefundPayment) }
+ attr_reader :refund_payment
+ # Represents a reader action to set the reader display
+ sig { returns(SetReaderDisplay) }
+ attr_reader :set_reader_display
+ # Status of the action performed by the reader.
+ sig { returns(String) }
+ attr_reader :status
+ # Type of action performed by the reader.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The most recent action performed by the reader.
+ sig { returns(T.nilable(Action)) }
+ attr_reader :action
+ # The current software version of the reader.
+ sig { returns(T.nilable(String)) }
+ attr_reader :device_sw_version
+ # 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`.
+ sig { returns(String) }
+ attr_reader :device_type
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # The local IP address of the reader.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # Custom label given to the reader for easier identification.
+ sig { returns(String) }
+ attr_reader :label
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The location identifier of the reader.
+ sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) }
+ attr_reader :location
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Serial number of the reader.
+ sig { returns(String) }
+ attr_reader :serial_number
+ # The networking status of the reader. We do not recommend using this field in flows that may block taking payments.
+ sig { returns(T.nilable(String)) }
+ attr_reader :status
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The new label of the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :label
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), label: T.nilable(T.nilable(String)), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, label: nil, metadata: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # Filters readers by device type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :device_type
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A location ID to filter the response list to only readers at the specific location
+ sig { returns(T.nilable(String)) }
+ attr_accessor :location
+ # Filters readers by serial number
+ sig { returns(T.nilable(String)) }
+ attr_accessor :serial_number
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # A status filter to filter readers to only offline or online readers
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(device_type: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), location: T.nilable(String), serial_number: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ device_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ location: nil,
+ serial_number: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :label
+ # The location to assign the reader to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :location
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # A code generated by the reader used for registering to an account.
+ sig { returns(String) }
+ attr_accessor :registration_code
+ sig {
+ params(expand: T.nilable(T::Array[String]), label: T.nilable(String), location: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), registration_code: String).void
+ }
+ def initialize(
+ expand: nil,
+ label: nil,
+ location: nil,
+ metadata: nil,
+ registration_code: nil
+ ); end
+ end
+ class CancelActionParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ProcessPaymentIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ class Tipping < Stripe::RequestParams
+ # 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).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_eligible
+ sig { params(amount_eligible: T.nilable(Integer)).void }
+ def initialize(amount_eligible: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # Enables cancel button on transaction screens.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enable_customer_cancellation
+ # Override showing a tipping selection screen on this transaction.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :skip_tipping
+ # Tipping configuration for this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig::Tipping))
+ }
+ attr_accessor :tipping
+ sig {
+ params(allow_redisplay: T.nilable(String), enable_customer_cancellation: T.nilable(T::Boolean), skip_tipping: T.nilable(T::Boolean), tipping: T.nilable(::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig::Tipping)).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ enable_customer_cancellation: nil,
+ skip_tipping: nil,
+ tipping: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # PaymentIntent ID
+ sig { returns(String) }
+ attr_accessor :payment_intent
+ # Configuration overrides
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig))
+ }
+ attr_accessor :process_config
+ sig {
+ params(expand: T.nilable(T::Array[String]), payment_intent: String, process_config: T.nilable(::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig)).void
+ }
+ def initialize(expand: nil, payment_intent: nil, process_config: nil); end
+ end
+ class ProcessSetupIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enable_customer_cancellation
+ sig { params(enable_customer_cancellation: T.nilable(T::Boolean)).void }
+ def initialize(enable_customer_cancellation: nil); end
+ end
+ # 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.
+ sig { returns(String) }
+ attr_accessor :allow_redisplay
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Configuration overrides
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Reader::ProcessSetupIntentParams::ProcessConfig))
+ }
+ attr_accessor :process_config
+ # SetupIntent ID
+ sig { returns(String) }
+ attr_accessor :setup_intent
+ sig {
+ params(allow_redisplay: String, expand: T.nilable(T::Array[String]), process_config: T.nilable(::Stripe::Terminal::Reader::ProcessSetupIntentParams::ProcessConfig), setup_intent: String).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ expand: nil,
+ process_config: nil,
+ setup_intent: nil
+ ); end
+ end
+ class RefundPaymentParams < Stripe::RequestParams
+ class RefundPaymentConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enable_customer_cancellation
+ sig { params(enable_customer_cancellation: T.nilable(T::Boolean)).void }
+ def initialize(enable_customer_cancellation: nil); end
+ end
+ # A positive integer in __cents__ representing how much of this charge to refund.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of the Charge to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # ID of the PaymentIntent to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_application_fee
+ # Configuration overrides
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Reader::RefundPaymentParams::RefundPaymentConfig))
+ }
+ attr_accessor :refund_payment_config
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :reverse_transfer
+ sig {
+ params(amount: T.nilable(Integer), charge: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), payment_intent: T.nilable(String), refund_application_fee: T.nilable(T::Boolean), refund_payment_config: T.nilable(::Stripe::Terminal::Reader::RefundPaymentParams::RefundPaymentConfig), reverse_transfer: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ charge: nil,
+ expand: nil,
+ metadata: nil,
+ payment_intent: nil,
+ refund_application_fee: nil,
+ refund_payment_config: nil,
+ reverse_transfer: nil
+ ); end
+ end
+ class SetReaderDisplayParams < Stripe::RequestParams
+ class Cart < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The price of the item in cents.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The description or name of the item.
+ sig { returns(String) }
+ attr_accessor :description
+ # The quantity of the line item being purchased.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig { params(amount: Integer, description: String, quantity: Integer).void }
+ def initialize(amount: nil, description: nil, quantity: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Array of line items that were purchased.
+ sig {
+ returns(T::Array[::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart::LineItem])
+ }
+ attr_accessor :line_items
+ # The amount of tax in cents.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :tax
+ # Total balance of cart due in cents.
+ sig { returns(Integer) }
+ attr_accessor :total
+ sig {
+ params(currency: String, line_items: T::Array[::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart::LineItem], tax: T.nilable(Integer), total: Integer).void
+ }
+ def initialize(currency: nil, line_items: nil, tax: nil, total: nil); end
+ end
+ # Cart
+ sig { returns(T.nilable(::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart)) }
+ attr_accessor :cart
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Type
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cart: T.nilable(::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart), expand: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(cart: nil, expand: nil, type: nil); end
+ end
+ class PresentPaymentMethodParams < Stripe::RequestParams
+ class CardPresent < Stripe::RequestParams
+ # The card number, as a string without any separators.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ sig { params(number: T.nilable(String)).void }
+ def initialize(number: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+ # Card Number
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ sig { params(number: T.nilable(String)).void }
+ def initialize(number: nil); end
+ end
+ # Simulated on-reader tip amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_tip
+ # Simulated data for the card_present payment method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Reader::PresentPaymentMethodParams::CardPresent))
+ }
+ attr_accessor :card_present
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Simulated data for the interac_present payment method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::Reader::PresentPaymentMethodParams::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # Simulated payment type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(amount_tip: T.nilable(Integer), card_present: T.nilable(::Stripe::Terminal::Reader::PresentPaymentMethodParams::CardPresent), expand: T.nilable(T::Array[String]), interac_present: T.nilable(::Stripe::Terminal::Reader::PresentPaymentMethodParams::InteracPresent), type: T.nilable(String)).void
+ }
+ def initialize(
+ amount_tip: nil,
+ card_present: nil,
+ expand: nil,
+ interac_present: nil,
+ type: nil
+ ); end
+ end
+ # Cancels the current reader action.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def cancel_action(params = {}, opts = {}); end
+
+ # Cancels the current reader action.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.cancel_action(reader, params = {}, opts = {}); end
+
+ # Creates a new Reader object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a Reader object.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.delete(reader, params = {}, opts = {}); end
+
+ # Deletes a Reader object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of Reader objects.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Initiates a payment flow on a Reader.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::ProcessPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def process_payment_intent(params = {}, opts = {}); end
+
+ # Initiates a payment flow on a Reader.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::ProcessPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.process_payment_intent(reader, params = {}, opts = {}); end
+
+ # Initiates a setup intent flow on a Reader.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::ProcessSetupIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def process_setup_intent(params = {}, opts = {}); end
+
+ # Initiates a setup intent flow on a Reader.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::ProcessSetupIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.process_setup_intent(reader, params = {}, opts = {}); end
+
+ # Initiates a refund on a Reader
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::RefundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def refund_payment(params = {}, opts = {}); end
+
+ # Initiates a refund on a Reader
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::RefundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.refund_payment(reader, params = {}, opts = {}); end
+
+ # Sets reader display to show cart details.
+ sig {
+ params(params: T.any(::Stripe::Terminal::Reader::SetReaderDisplayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def set_reader_display(params = {}, opts = {}); end
+
+ # Sets reader display to show cart details.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::SetReaderDisplayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.set_reader_display(reader, params = {}, opts = {}); end
+
+ # Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def self.update(reader, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/test_helpers/test_clock.rbi b/rbi/stripe/resources/test_helpers/test_clock.rbi
new file mode 100644
index 00000000..e0955d74
--- /dev/null
+++ b/rbi/stripe/resources/test_helpers/test_clock.rbi
@@ -0,0 +1,134 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ # A test clock enables deterministic control over objects in testmode. With a test clock, you can create
+ # objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,
+ # you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
+ class TestClock < APIResource
+ class StatusDetails < Stripe::StripeObject
+ class Advancing < Stripe::StripeObject
+ # The `frozen_time` that the Test Clock is advancing towards.
+ sig { returns(Integer) }
+ attr_reader :target_frozen_time
+ end
+ # Attribute for field advancing
+ sig { returns(Advancing) }
+ attr_reader :advancing
+ end
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Time at which this clock is scheduled to auto delete.
+ sig { returns(Integer) }
+ attr_reader :deletes_after
+ # Time at which all objects belonging to this clock are frozen.
+ sig { returns(Integer) }
+ attr_reader :frozen_time
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The custom name supplied at creation.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The status of the Test Clock.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_details
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The initial frozen time for this test clock.
+ sig { returns(Integer) }
+ attr_accessor :frozen_time
+ # The name for this test clock.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(expand: T.nilable(T::Array[String]), frozen_time: Integer, name: T.nilable(String)).void
+ }
+ def initialize(expand: nil, frozen_time: nil, name: nil); end
+ end
+ class AdvanceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.
+ sig { returns(Integer) }
+ attr_accessor :frozen_time
+ sig { params(expand: T.nilable(T::Array[String]), frozen_time: Integer).void }
+ def initialize(expand: nil, frozen_time: nil); end
+ end
+ # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::TestClock::AdvanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def advance(params = {}, opts = {}); end
+
+ # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
+ sig {
+ params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClock::AdvanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def self.advance(test_clock, params = {}, opts = {}); end
+
+ # Creates a new test clock that can be attached to new customers and quotes.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::TestClock::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Deletes a test clock.
+ sig {
+ params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClock::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def self.delete(test_clock, params = {}, opts = {}); end
+
+ # Deletes a test clock.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::TestClock::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your test clocks.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::TestClock::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi
new file mode 100644
index 00000000..61c662c3
--- /dev/null
+++ b/rbi/stripe/resources/token.rbi
@@ -0,0 +1,1217 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # Tokenization is the process Stripe uses to collect sensitive card or bank
+ # account details, or personally identifiable information (PII), directly from
+ # your customers in a secure manner. A token representing this information is
+ # returned to your server to use. Use our
+ # [recommended payments integrations](https://stripe.com/docs/payments) to perform this process
+ # on the client-side. This guarantees that no sensitive card data touches your server,
+ # and allows your integration to operate in a PCI-compliant way.
+ #
+ # If you can't use client-side tokenization, you can also create tokens using
+ # the API with either your publishable or secret API key. If
+ # your integration uses this method, you're responsible for any PCI compliance
+ # that it might require, and you must keep your secret API key safe. Unlike with
+ # client-side tokenization, your customer's information isn't sent directly to
+ # Stripe, so we can't determine how it's handled or stored.
+ #
+ # You can't store or use tokens more than once. To store card or bank account
+ # information for later use, create [Customer](https://stripe.com/docs/api#customers)
+ # objects or [External accounts](https://stripe.com/api#external_accounts).
+ # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
+ # performs best with integrations that use client-side tokenization.
+ class Token < APIResource
+ # These bank accounts are payment methods on `Customer` objects.
+ #
+ # On the other hand [External Accounts](/api#external_accounts) are transfer
+ # destinations on `Account` objects for connected accounts.
+ # They can be bank accounts or debit cards as well, and are documented in the links above.
+ #
+ # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers)
+ sig { returns(Stripe::BankAccount) }
+ attr_reader :bank_account
+ # You can store multiple cards on a customer in order to charge the customer
+ # later. You can also store multiple debit cards on a recipient in order to
+ # transfer to those cards later.
+ #
+ # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
+ sig { returns(Stripe::Card) }
+ attr_reader :card
+ # IP address of the client that generates the token.
+ sig { returns(T.nilable(String)) }
+ attr_reader :client_ip
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Type of the token: `account`, `bank_account`, `card`, or `pii`.
+ sig { returns(String) }
+ attr_reader :type
+ # Determines if you have already used this token (you can only use tokens once).
+ sig { returns(T::Boolean) }
+ attr_reader :used
+ class CreateParams < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document verifying the business.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Token::CreateParams::Account::Company::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # The company's primary address.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::Address)) }
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::AddressKanji)) }
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::DirectorshipDeclaration))
+ }
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::OwnershipDeclaration))
+ }
+ attr_accessor :ownership_declaration
+ # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :ownership_declaration_shown_and_signed
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Company::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::Token::CreateParams::Account::Company::Address), address_kana: T.nilable(::Stripe::Token::CreateParams::Account::Company::AddressKana), address_kanji: T.nilable(::Stripe::Token::CreateParams::Account::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Token::CreateParams::Account::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Token::CreateParams::Account::Company::OwnershipDeclaration), ownership_declaration_shown_and_signed: T.nilable(T::Boolean), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Token::CreateParams::Account::Company::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_declaration_shown_and_signed: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ ); end
+ end
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), title: T.nilable(String)).void
+ }
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::Token::CreateParams::Account::Individual::Verification::AdditionalDocument), document: T.nilable(::Stripe::Token::CreateParams::Account::Individual::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # The individual's primary address.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::Address)) }
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::AddressKana))
+ }
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::AddressKanji))
+ }
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Token::CreateParams::Account::Individual::Dob))))
+ }
+ attr_accessor :dob
+ # The individual's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The individual's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The individual's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::RegisteredAddress))
+ }
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::Relationship))
+ }
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::Token::CreateParams::Account::Individual::Address), address_kana: T.nilable(::Stripe::Token::CreateParams::Account::Individual::AddressKana), address_kanji: T.nilable(::Stripe::Token::CreateParams::Account::Individual::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::Token::CreateParams::Account::Individual::Dob))), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::Token::CreateParams::Account::Individual::RegisteredAddress), relationship: T.nilable(::Stripe::Token::CreateParams::Account::Individual::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::Token::CreateParams::Account::Individual::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ # The business type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :business_type
+ # Information about the company or business.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Company)) }
+ attr_accessor :company
+ # Information about the person represented by the account.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual)) }
+ attr_accessor :individual
+ # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(business_type: T.nilable(String), company: T.nilable(::Stripe::Token::CreateParams::Account::Company), individual: T.nilable(::Stripe::Token::CreateParams::Account::Individual), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ business_type: nil,
+ company: nil,
+ individual: nil,
+ tos_shown_and_accepted: nil
+ ); end
+ end
+ class BankAccount < Stripe::RequestParams
+ # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, account_type: T.nilable(String), country: String, currency: T.nilable(String), payment_method: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ country: nil,
+ currency: nil,
+ payment_method: nil,
+ routing_number: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred
+ sig { params(preferred: T.nilable(String)).void }
+ def initialize(preferred: nil); end
+ end
+ # City / District / Suburb / Town / Village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Billing address country, if provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Address line 1 (Street address / PO Box / Company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Address line 2 (Apartment / Suite / Unit / Building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # State / County / Province / Region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Card security code. Highly recommended to always include this value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ sig { returns(String) }
+ attr_accessor :exp_month
+ # Two- or four-digit number representing the card's expiration year.
+ sig { returns(String) }
+ attr_accessor :exp_year
+ # Cardholder's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Contains information about card networks used to process the payment.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Card::Networks)) }
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ sig { returns(String) }
+ attr_accessor :number
+ sig {
+ params(address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: String, exp_year: String, name: T.nilable(String), networks: T.nilable(::Stripe::Token::CreateParams::Card::Networks), number: String).void
+ }
+ def initialize(
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ networks: nil,
+ number: nil
+ ); end
+ end
+ class CvcUpdate < Stripe::RequestParams
+ # The CVC value, in string form.
+ sig { returns(String) }
+ attr_accessor :cvc
+ sig { params(cvc: String).void }
+ def initialize(cvc: nil); end
+ end
+ class Person < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances::Account))
+ }
+ attr_accessor :account
+ sig {
+ params(account: T.nilable(::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances::Account)).void
+ }
+ def initialize(account: nil); end
+ end
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Person::Documents::CompanyAuthorization))
+ }
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Documents::Passport)) }
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Documents::Visa)) }
+ attr_accessor :visa
+ sig {
+ params(company_authorization: T.nilable(::Stripe::Token::CreateParams::Person::Documents::CompanyAuthorization), passport: T.nilable(::Stripe::Token::CreateParams::Person::Documents::Passport), visa: T.nilable(::Stripe::Token::CreateParams::Person::Documents::Visa)).void
+ }
+ def initialize(company_authorization: nil, passport: nil, visa: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), representative: T.nilable(T::Boolean), title: T.nilable(String)).void
+ }
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::Token::CreateParams::Person::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Verification::Document)) }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::Token::CreateParams::Person::Verification::AdditionalDocument), document: T.nilable(::Stripe::Token::CreateParams::Person::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances)) }
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Address)) }
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Token::CreateParams::Person::Dob))))
+ }
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Documents)) }
+ attr_accessor :documents
+ # The person's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The person's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nationality
+ # The person's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The person's registered address.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::RegisteredAddress)) }
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(additional_tos_acceptances: T.nilable(::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances), address: T.nilable(::Stripe::Token::CreateParams::Person::Address), address_kana: T.nilable(::Stripe::Token::CreateParams::Person::AddressKana), address_kanji: T.nilable(::Stripe::Token::CreateParams::Person::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::Token::CreateParams::Person::Dob))), documents: T.nilable(::Stripe::Token::CreateParams::Person::Documents), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nationality: T.nilable(String), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::Token::CreateParams::Person::RegisteredAddress), relationship: T.nilable(::Stripe::Token::CreateParams::Person::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::Token::CreateParams::Person::Verification)).void
+ }
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class Pii < Stripe::RequestParams
+ # The `id_number` for the PII, in string form.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ sig { params(id_number: T.nilable(String)).void }
+ def initialize(id_number: nil); end
+ end
+ # Information for the account this token represents.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Account)) }
+ attr_accessor :account
+ # The bank account this token will represent.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::BankAccount)) }
+ attr_accessor :bank_account
+ # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
+ sig { returns(T.nilable(T.any(::Stripe::Token::CreateParams::Card, String))) }
+ attr_accessor :card
+ # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The updated CVC value this token represents.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::CvcUpdate)) }
+ attr_accessor :cvc_update
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information for the person this token represents.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Person)) }
+ attr_accessor :person
+ # The PII this token represents.
+ sig { returns(T.nilable(::Stripe::Token::CreateParams::Pii)) }
+ attr_accessor :pii
+ sig {
+ params(account: T.nilable(::Stripe::Token::CreateParams::Account), bank_account: T.nilable(::Stripe::Token::CreateParams::BankAccount), card: T.nilable(T.any(::Stripe::Token::CreateParams::Card, String)), customer: T.nilable(String), cvc_update: T.nilable(::Stripe::Token::CreateParams::CvcUpdate), expand: T.nilable(T::Array[String]), person: T.nilable(::Stripe::Token::CreateParams::Person), pii: T.nilable(::Stripe::Token::CreateParams::Pii)).void
+ }
+ def initialize(
+ account: nil,
+ bank_account: nil,
+ card: nil,
+ customer: nil,
+ cvc_update: nil,
+ expand: nil,
+ person: nil,
+ pii: nil
+ ); end
+ end
+ # Creates a single-use token that represents a bank account's details.
+ # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
+ sig {
+ params(params: T.any(::Stripe::Token::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Token)
+ }
+ def self.create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/topup.rbi b/rbi/stripe/resources/topup.rbi
new file mode 100644
index 00000000..0cbff72f
--- /dev/null
+++ b/rbi/stripe/resources/topup.rbi
@@ -0,0 +1,222 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # To top up your Stripe balance, you create a top-up object. You can retrieve
+ # individual top-ups, as well as list all top-ups. Top-ups are identified by a
+ # unique, random ID.
+ #
+ # Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups)
+ class Topup < APIResource
+ # Amount transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :expected_availability_date
+ # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_code
+ # Message to user further explaining reason for top-up failure if available.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_message
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The source field is deprecated. It might not always be present in the API response.
+ sig { returns(T.nilable(Stripe::Source)) }
+ attr_reader :source
+ # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
+ sig { returns(T.nilable(String)) }
+ attr_reader :statement_descriptor
+ # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.
+ sig { returns(String) }
+ attr_reader :status
+ # A string that identifies this top-up as part of a group.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transfer_group
+ class ListParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A positive integer representing how much to transfer.
+ sig { returns(T.nilable(T.any(::Stripe::Topup::ListParams::Amount, Integer))) }
+ attr_accessor :amount
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::Topup::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(amount: T.nilable(T.any(::Stripe::Topup::ListParams::Amount, Integer)), created: T.nilable(T.any(::Stripe::Topup::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer representing how much to transfer.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A string that identifies this top-up as part of a group.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), source: T.nilable(String), statement_descriptor: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ source: nil,
+ statement_descriptor: nil,
+ transfer_group: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(description: nil, expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels a top-up. Only pending top-ups can be canceled.
+ sig {
+ params(params: T.any(::Stripe::Topup::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels a top-up. Only pending top-ups can be canceled.
+ sig {
+ params(topup: String, params: T.any(::Stripe::Topup::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def self.cancel(topup, params = {}, opts = {}); end
+
+ # Top up the balance of an account
+ sig {
+ params(params: T.any(::Stripe::Topup::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of top-ups.
+ sig {
+ params(params: T.any(::Stripe::Topup::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the metadata of a top-up. Other top-up details are not editable by design.
+ sig {
+ params(topup: String, params: T.any(::Stripe::Topup::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def self.update(topup, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/transfer.rbi b/rbi/stripe/resources/transfer.rbi
new file mode 100644
index 00000000..492f3b52
--- /dev/null
+++ b/rbi/stripe/resources/transfer.rbi
@@ -0,0 +1,199 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # A `Transfer` object is created when you move funds between Stripe accounts as
+ # part of Connect.
+ #
+ # Before April 6, 2017, transfers also represented movement of funds from a
+ # Stripe account to a card or bank account. This behavior has since been split
+ # out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more
+ # information, read about the
+ # [transfer/payout split](https://stripe.com/docs/transfer-payout-split).
+ #
+ # Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers)
+ class Transfer < APIResource
+ # Amount in cents (or local equivalent) to be transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
+ sig { returns(Integer) }
+ attr_reader :amount_reversed
+ # Balance transaction that describes the impact of this transfer on your account balance.
+ sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) }
+ attr_reader :balance_transaction
+ # Time that this record of the transfer was first created.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # ID of the Stripe account the transfer was sent to.
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
+ attr_reader :destination
+ # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
+ sig { returns(T.any(String, Stripe::Charge)) }
+ attr_reader :destination_payment
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # A list of reversals that have been applied to the transfer.
+ sig { returns(Stripe::ListObject) }
+ attr_reader :reversals
+ # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
+ sig { returns(T::Boolean) }
+ attr_reader :reversed
+ # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance.
+ sig { returns(T.nilable(T.any(String, Stripe::Charge))) }
+ attr_reader :source_transaction
+ # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.
+ sig { returns(String) }
+ attr_reader :source_type
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_reader :transfer_group
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return transfers that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::Transfer::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return transfers for the destination specified by this account ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return transfers with the specified transfer group.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Transfer::ListParams::Created, Integer)), destination: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transfer_group: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents (or local equivalent) representing how much to transfer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of a connected Stripe account. See the Connect documentation for details.
+ sig { returns(String) }
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source_transaction
+ # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source_type
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), currency: String, description: T.nilable(String), destination: String, expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), source_transaction: T.nilable(String), source_type: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ source_transaction: nil,
+ source_type: nil,
+ transfer_group: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(description: nil, expand: nil, metadata: nil); end
+ end
+ # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
+ sig {
+ params(params: T.any(::Stripe::Transfer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
+ sig {
+ params(params: T.any(::Stripe::Transfer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ #
+ # This request accepts only metadata as an argument.
+ sig {
+ params(transfer: String, params: T.any(::Stripe::Transfer::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer)
+ }
+ def self.update(transfer, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/credit_reversal.rbi b/rbi/stripe/resources/treasury/credit_reversal.rbi
new file mode 100644
index 00000000..1c282943
--- /dev/null
+++ b/rbi/stripe/resources/treasury/credit_reversal.rbi
@@ -0,0 +1,119 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ class CreditReversal < APIResource
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when the CreditReversal changed status to `posted`
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :posted_at
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The FinancialAccount to reverse funds from.
+ sig { returns(String) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The rails used to reverse the funds.
+ sig { returns(String) }
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The ReceivedCredit being reversed.
+ sig { returns(String) }
+ attr_reader :received_credit
+ # Status of the CreditReversal
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # The Transaction associated with this object.
+ sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return CreditReversals for the ReceivedCredit ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :received_credit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return CreditReversals for a given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), received_credit: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_credit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The ReceivedCredit to reverse.
+ sig { returns(String) }
+ attr_accessor :received_credit
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), received_credit: String).void
+ }
+ def initialize(expand: nil, metadata: nil, received_credit: nil); end
+ end
+ # Reverses a ReceivedCredit and creates a CreditReversal object.
+ sig {
+ params(params: T.any(::Stripe::Treasury::CreditReversal::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::CreditReversal)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of CreditReversals.
+ sig {
+ params(params: T.any(::Stripe::Treasury::CreditReversal::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/debit_reversal.rbi b/rbi/stripe/resources/treasury/debit_reversal.rbi
new file mode 100644
index 00000000..df154d6a
--- /dev/null
+++ b/rbi/stripe/resources/treasury/debit_reversal.rbi
@@ -0,0 +1,131 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
+ class DebitReversal < APIResource
+ class LinkedFlows < Stripe::StripeObject
+ # Set if there is an Issuing dispute associated with the DebitReversal.
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuing_dispute
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when the DebitReversal changed status to `completed`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :completed_at
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # The FinancialAccount to reverse funds from.
+ sig { returns(T.nilable(String)) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Other flows linked to a DebitReversal.
+ sig { returns(T.nilable(LinkedFlows)) }
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # The rails used to reverse the funds.
+ sig { returns(String) }
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The ReceivedDebit being reversed.
+ sig { returns(String) }
+ attr_reader :received_debit
+ # Status of the DebitReversal
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # The Transaction associated with this object.
+ sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return DebitReversals for the ReceivedDebit ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :received_debit
+ # Only return DebitReversals for a given resolution.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :resolution
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return DebitReversals for a given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), received_debit: T.nilable(String), resolution: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_debit: nil,
+ resolution: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The ReceivedDebit to reverse.
+ sig { returns(String) }
+ attr_accessor :received_debit
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), received_debit: String).void
+ }
+ def initialize(expand: nil, metadata: nil, received_debit: nil); end
+ end
+ # Reverses a ReceivedDebit and creates a DebitReversal object.
+ sig {
+ params(params: T.any(::Stripe::Treasury::DebitReversal::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::DebitReversal)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of DebitReversals.
+ sig {
+ params(params: T.any(::Stripe::Treasury::DebitReversal::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi
new file mode 100644
index 00000000..d1721854
--- /dev/null
+++ b/rbi/stripe/resources/treasury/financial_account.rbi
@@ -0,0 +1,865 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.
+ # FinancialAccounts serve as the source and destination of Treasury's money movement APIs.
+ class FinancialAccount < APIResource
+ class Balance < Stripe::StripeObject
+ # Funds the user can spend right now.
+ sig { returns(T::Hash[String, Integer]) }
+ attr_reader :cash
+ # Funds not spendable yet, but will become available at a later time.
+ sig { returns(T::Hash[String, Integer]) }
+ attr_reader :inbound_pending
+ # Funds in the account, but not spendable because they are being held for pending outbound flows.
+ sig { returns(T::Hash[String, Integer]) }
+ attr_reader :outbound_pending
+ end
+ class FinancialAddress < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ # The name of the person or business that owns the bank account.
+ sig { returns(String) }
+ attr_reader :account_holder_name
+ # The account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_number
+ # The last four characters of the account number.
+ sig { returns(String) }
+ attr_reader :account_number_last4
+ # Name of the bank.
+ sig { returns(String) }
+ attr_reader :bank_name
+ # Routing number for the account.
+ sig { returns(String) }
+ attr_reader :routing_number
+ end
+ # ABA Records contain U.S. bank account details per the ABA format.
+ sig { returns(Aba) }
+ attr_reader :aba
+ # The list of networks that the address supports
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_networks
+ # The type of financial address
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class PlatformRestrictions < Stripe::StripeObject
+ # Restricts all inbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :inbound_flows
+ # Restricts all outbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_reader :outbound_flows
+ end
+ class StatusDetails < Stripe::StripeObject
+ class Closed < Stripe::StripeObject
+ # The array that contains reasons for a FinancialAccount closure.
+ sig { returns(T::Array[String]) }
+ attr_reader :reasons
+ end
+ # Details related to the closure of this FinancialAccount
+ sig { returns(T.nilable(Closed)) }
+ attr_reader :closed
+ end
+ # The array of paths to active Features in the Features hash.
+ sig { returns(T::Array[String]) }
+ attr_reader :active_features
+ # Balance information for the FinancialAccount
+ sig { returns(Balance) }
+ attr_reader :balance
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_reader :country
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
+ # Stripe or the platform can control Features via the requested field.
+ sig { returns(Stripe::Treasury::FinancialAccountFeatures) }
+ attr_reader :features
+ # The set of credentials that resolve to a FinancialAccount.
+ sig { returns(T::Array[FinancialAddress]) }
+ attr_reader :financial_addresses
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field is_default
+ sig { returns(T::Boolean) }
+ attr_reader :is_default
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # The nickname for the FinancialAccount.
+ sig { returns(T.nilable(String)) }
+ attr_reader :nickname
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The array of paths to pending Features in the Features hash.
+ sig { returns(T::Array[String]) }
+ attr_reader :pending_features
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ sig { returns(T.nilable(PlatformRestrictions)) }
+ attr_reader :platform_restrictions
+ # The array of paths to restricted Features in the Features hash.
+ sig { returns(T::Array[String]) }
+ attr_reader :restricted_features
+ # Status of this FinancialAccount.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_details
+ sig { returns(StatusDetails) }
+ attr_reader :status_details
+ # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
+ sig { returns(T::Array[String]) }
+ attr_reader :supported_currencies
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return FinancialAccounts that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # An object ID cursor for use in pagination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit ranging from 1 to 100 (defaults to 10).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # An object ID cursor for use in pagination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses::Aba))
+ }
+ attr_accessor :aba
+ sig {
+ params(aba: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses::Aba)).void
+ }
+ def initialize(aba: nil); end
+ end
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers::Ach)).void
+ }
+ def initialize(ach: nil); end
+ end
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::DepositInsurance))
+ }
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses))
+ }
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers))
+ }
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::IntraStripeFlows))
+ }
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments))
+ }
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers))
+ }
+ attr_accessor :outbound_transfers
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::CardIssuing), deposit_insurance: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::DepositInsurance), financial_addresses: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses), inbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers), intra_stripe_flows: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::IntraStripeFlows), outbound_payments: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments), outbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ ); end
+ end
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :outbound_flows
+ sig { params(inbound_flows: T.nilable(String), outbound_flows: T.nilable(String)).void }
+ def initialize(inbound_flows: nil, outbound_flows: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
+ sig { returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features)) }
+ attr_accessor :features
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::PlatformRestrictions))
+ }
+ attr_accessor :platform_restrictions
+ # The currencies the FinancialAccount can hold a balance in.
+ sig { returns(T::Array[String]) }
+ attr_accessor :supported_currencies
+ sig {
+ params(expand: T.nilable(T::Array[String]), features: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::Features), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(T.nilable(String)), platform_restrictions: T.nilable(::Stripe::Treasury::FinancialAccount::CreateParams::PlatformRestrictions), supported_currencies: T::Array[String]).void
+ }
+ def initialize(
+ expand: nil,
+ features: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil,
+ supported_currencies: nil
+ ); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses::Aba))
+ }
+ attr_accessor :aba
+ sig {
+ params(aba: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses::Aba)).void
+ }
+ def initialize(aba: nil); end
+ end
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers::Ach)).void
+ }
+ def initialize(ach: nil); end
+ end
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::DepositInsurance))
+ }
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses))
+ }
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers))
+ }
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::IntraStripeFlows))
+ }
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments))
+ }
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers))
+ }
+ attr_accessor :outbound_transfers
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::CardIssuing), deposit_insurance: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::DepositInsurance), financial_addresses: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses), inbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers), intra_stripe_flows: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::IntraStripeFlows), outbound_payments: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments), outbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ ); end
+ end
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(financial_account: T.nilable(String), payment_method: T.nilable(String), type: String).void
+ }
+ def initialize(financial_account: nil, payment_method: nil, type: nil); end
+ end
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :outbound_flows
+ sig { params(inbound_flows: T.nilable(String), outbound_flows: T.nilable(String)).void }
+ def initialize(inbound_flows: nil, outbound_flows: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
+ sig { returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features)) }
+ attr_accessor :features
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::ForwardingSettings))
+ }
+ attr_accessor :forwarding_settings
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::PlatformRestrictions))
+ }
+ attr_accessor :platform_restrictions
+ sig {
+ params(expand: T.nilable(T::Array[String]), features: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::Features), forwarding_settings: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::ForwardingSettings), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(T.nilable(String)), platform_restrictions: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateParams::PlatformRestrictions)).void
+ }
+ def initialize(
+ expand: nil,
+ features: nil,
+ forwarding_settings: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil
+ ); end
+ end
+ class RetrieveFeaturesParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateFeaturesParams < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses::Aba))
+ }
+ attr_accessor :aba
+ sig {
+ params(aba: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses::Aba)).void
+ }
+ def initialize(aba: nil); end
+ end
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers::Ach)).void
+ }
+ def initialize(ach: nil); end
+ end
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::DepositInsurance))
+ }
+ attr_accessor :deposit_insurance
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses))
+ }
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers))
+ }
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::IntraStripeFlows))
+ }
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments))
+ }
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers))
+ }
+ attr_accessor :outbound_transfers
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::CardIssuing), deposit_insurance: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::DepositInsurance), expand: T.nilable(T::Array[String]), financial_addresses: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses), inbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers), intra_stripe_flows: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::IntraStripeFlows), outbound_payments: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments), outbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ expand: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ ); end
+ end
+ class CloseParams < Stripe::RequestParams
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(financial_account: T.nilable(String), payment_method: T.nilable(String), type: String).void
+ }
+ def initialize(financial_account: nil, payment_method: nil, type: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccount::CloseParams::ForwardingSettings))
+ }
+ attr_accessor :forwarding_settings
+ sig {
+ params(expand: T.nilable(T::Array[String]), forwarding_settings: T.nilable(::Stripe::Treasury::FinancialAccount::CloseParams::ForwardingSettings)).void
+ }
+ def initialize(expand: nil, forwarding_settings: nil); end
+ end
+ # Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccount::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def close(params = {}, opts = {}); end
+
+ # Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccount::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def self.close(financial_account, params = {}, opts = {}); end
+
+ # Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccount::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of FinancialAccounts.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccount::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Retrieves Features information associated with the FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccount::RetrieveFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures)
+ }
+ def retrieve_features(params = {}, opts = {}); end
+
+ # Retrieves Features information associated with the FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccount::RetrieveFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures)
+ }
+ def self.retrieve_features(financial_account, params = {}, opts = {}); end
+
+ # Updates the details of a FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccount::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def self.update(financial_account, params = {}, opts = {}); end
+
+ # Updates the Features associated with a FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures)
+ }
+ def update_features(params = {}, opts = {}); end
+
+ # Updates the Features associated with a FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures)
+ }
+ def self.update_features(financial_account, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/financial_account_features.rbi b/rbi/stripe/resources/treasury/financial_account_features.rbi
new file mode 100644
index 00000000..d39b53a0
--- /dev/null
+++ b/rbi/stripe/resources/treasury/financial_account_features.rbi
@@ -0,0 +1,260 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
+ # Stripe or the platform can control Features via the requested field.
+ class FinancialAccountFeatures < APIResource
+ class CardIssuing < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ class DepositInsurance < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ class FinancialAddresses < Stripe::StripeObject
+ class Aba < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling the ABA address feature
+ sig { returns(Aba) }
+ attr_reader :aba
+ end
+ class InboundTransfers < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling an inbound ACH specific feature
+ sig { returns(Ach) }
+ attr_reader :ach
+ end
+ class IntraStripeFlows < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ class OutboundPayments < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ class UsDomesticWire < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling an outbound ACH specific feature
+ sig { returns(Ach) }
+ attr_reader :ach
+ # Toggle settings for enabling/disabling a feature
+ sig { returns(UsDomesticWire) }
+ attr_reader :us_domestic_wire
+ end
+ class OutboundTransfers < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ class UsDomesticWire < Stripe::StripeObject
+ class StatusDetail < Stripe::StripeObject
+ # Represents the reason why the status is `pending` or `restricted`.
+ sig { returns(String) }
+ attr_reader :code
+ # Represents what the user should do, if anything, to activate the Feature.
+ sig { returns(T.nilable(String)) }
+ attr_reader :resolution
+ # The `platform_restrictions` that are restricting this Feature.
+ sig { returns(String) }
+ attr_reader :restriction
+ end
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_reader :requested
+ # Whether the Feature is operational.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional details; includes at least one entry when the status is not `active`.
+ sig { returns(T::Array[StatusDetail]) }
+ attr_reader :status_details
+ end
+ # Toggle settings for enabling/disabling an outbound ACH specific feature
+ sig { returns(Ach) }
+ attr_reader :ach
+ # Toggle settings for enabling/disabling a feature
+ sig { returns(UsDomesticWire) }
+ attr_reader :us_domestic_wire
+ end
+ # Toggle settings for enabling/disabling a feature
+ sig { returns(CardIssuing) }
+ attr_reader :card_issuing
+ # Toggle settings for enabling/disabling a feature
+ sig { returns(DepositInsurance) }
+ attr_reader :deposit_insurance
+ # Settings related to Financial Addresses features on a Financial Account
+ sig { returns(FinancialAddresses) }
+ attr_reader :financial_addresses
+ # InboundTransfers contains inbound transfers features for a FinancialAccount.
+ sig { returns(InboundTransfers) }
+ attr_reader :inbound_transfers
+ # Toggle settings for enabling/disabling a feature
+ sig { returns(IntraStripeFlows) }
+ attr_reader :intra_stripe_flows
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Settings related to Outbound Payments features on a Financial Account
+ sig { returns(OutboundPayments) }
+ attr_reader :outbound_payments
+ # OutboundTransfers contains outbound transfers features for a FinancialAccount.
+ sig { returns(OutboundTransfers) }
+ attr_reader :outbound_transfers
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/inbound_transfer.rbi b/rbi/stripe/resources/treasury/inbound_transfer.rbi
new file mode 100644
index 00000000..ff89df38
--- /dev/null
+++ b/rbi/stripe/resources/treasury/inbound_transfer.rbi
@@ -0,0 +1,295 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
+ #
+ # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
+ class InboundTransfer < APIResource
+ class FailureDetails < Stripe::StripeObject
+ # Reason for the failure.
+ sig { returns(String) }
+ attr_reader :code
+ end
+ class LinkedFlows < Stripe::StripeObject
+ # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.
+ sig { returns(T.nilable(String)) }
+ attr_reader :received_debit
+ end
+ class OriginPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ end
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(T.any(String, Stripe::Mandate)) }
+ attr_reader :mandate
+ # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_reader :network
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # The type of the payment method used in the InboundTransfer.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when an InboundTransfer changed status to `canceled`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Timestamp describing when an InboundTransfer changed status to `failed`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :failed_at
+ # Timestamp describing when an InboundTransfer changed status to `succeeded`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :succeeded_at
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Returns `true` if the InboundTransfer is able to be canceled.
+ sig { returns(T::Boolean) }
+ attr_reader :cancelable
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # Details about this InboundTransfer's failure. Only set when status is `failed`.
+ sig { returns(T.nilable(FailureDetails)) }
+ attr_reader :failure_details
+ # The FinancialAccount that received the funds.
+ sig { returns(String) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field linked_flows
+ sig { returns(LinkedFlows) }
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The origin payment method to be debited for an InboundTransfer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :origin_payment_method
+ # Details about the PaymentMethod for an InboundTransfer.
+ sig { returns(T.nilable(OriginPaymentMethodDetails)) }
+ attr_reader :origin_payment_method_details
+ # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_reader :returned
+ # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.
+ sig { returns(String) }
+ attr_reader :statement_descriptor
+ # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # The Transaction associated with this object.
+ sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The origin payment method to be debited for the InboundTransfer.
+ sig { returns(String) }
+ attr_accessor :origin_payment_method
+ # The complete description that appears on your customers' statements. Maximum 10 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, metadata: T.nilable(T::Hash[String, String]), origin_payment_method: String, statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ origin_payment_method: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FailParams < Stripe::RequestParams
+ class FailureDetails < Stripe::RequestParams
+ # Reason for the failure.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ sig { params(code: T.nilable(String)).void }
+ def initialize(code: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about a failed InboundTransfer.
+ sig { returns(T.nilable(::Stripe::Treasury::InboundTransfer::FailParams::FailureDetails)) }
+ attr_accessor :failure_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), failure_details: T.nilable(::Stripe::Treasury::InboundTransfer::FailParams::FailureDetails)).void
+ }
+ def initialize(expand: nil, failure_details: nil); end
+ end
+ class ReturnInboundTransferParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class SucceedParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels an InboundTransfer.
+ sig {
+ params(params: T.any(::Stripe::Treasury::InboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancels an InboundTransfer.
+ sig {
+ params(inbound_transfer: String, params: T.any(::Stripe::Treasury::InboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def self.cancel(inbound_transfer, params = {}, opts = {}); end
+
+ # Creates an InboundTransfer.
+ sig {
+ params(params: T.any(::Stripe::Treasury::InboundTransfer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of InboundTransfers sent from the specified FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::InboundTransfer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/outbound_payment.rbi b/rbi/stripe/resources/treasury/outbound_payment.rbi
new file mode 100644
index 00000000..8504da5c
--- /dev/null
+++ b/rbi/stripe/resources/treasury/outbound_payment.rbi
@@ -0,0 +1,592 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ class OutboundPayment < APIResource
+ class DestinationPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ end
+ class FinancialAccount < Stripe::StripeObject
+ # Token of the FinancialAccount.
+ sig { returns(String) }
+ attr_reader :id
+ # The rails used to send funds.
+ sig { returns(String) }
+ attr_reader :network
+ end
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(T.any(String, Stripe::Mandate)) }
+ attr_reader :mandate
+ # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_reader :network
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ sig { returns(FinancialAccount) }
+ attr_reader :financial_account
+ # The type of the payment method used in the OutboundPayment.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class EndUserDetails < Stripe::StripeObject
+ # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.
+ sig { returns(T.nilable(String)) }
+ attr_reader :ip_address
+ # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ sig { returns(T::Boolean) }
+ attr_reader :present
+ end
+ class ReturnedDetails < Stripe::StripeObject
+ # Reason for the return.
+ sig { returns(String) }
+ attr_reader :code
+ # The Transaction associated with this object.
+ sig { returns(T.any(String, Stripe::Treasury::Transaction)) }
+ attr_reader :transaction
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when an OutboundPayment changed status to `canceled`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Timestamp describing when an OutboundPayment changed status to `failed`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :failed_at
+ # Timestamp describing when an OutboundPayment changed status to `posted`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :posted_at
+ # Timestamp describing when an OutboundPayment changed status to `returned`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :returned_at
+ end
+ class TrackingDetails < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ # ACH trace ID of the OutboundPayment for payments sent over the `ach` network.
+ sig { returns(String) }
+ attr_reader :trace_id
+ end
+ class UsDomesticWire < Stripe::StripeObject
+ # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :chips
+ # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :imad
+ # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :omad
+ end
+ # Attribute for field ach
+ sig { returns(Ach) }
+ attr_reader :ach
+ # The US bank account network used to send funds.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_domestic_wire
+ sig { returns(UsDomesticWire) }
+ attr_reader :us_domestic_wire
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Returns `true` if the object can be canceled, and `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :cancelable
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.
+ sig { returns(T.nilable(String)) }
+ attr_reader :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.
+ sig { returns(T.nilable(String)) }
+ attr_reader :destination_payment_method
+ # Details about the PaymentMethod for an OutboundPayment.
+ sig { returns(T.nilable(DestinationPaymentMethodDetails)) }
+ attr_reader :destination_payment_method_details
+ # Details about the end user.
+ sig { returns(T.nilable(EndUserDetails)) }
+ attr_reader :end_user_details
+ # The date when funds are expected to arrive in the destination account.
+ sig { returns(Integer) }
+ attr_reader :expected_arrival_date
+ # The FinancialAccount that funds were pulled from.
+ sig { returns(String) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Details about a returned OutboundPayment. Only set when the status is `returned`.
+ sig { returns(T.nilable(ReturnedDetails)) }
+ attr_reader :returned_details
+ # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
+ sig { returns(String) }
+ attr_reader :statement_descriptor
+ # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # Details about network-specific tracking information if available.
+ sig { returns(T.nilable(TrackingDetails)) }
+ attr_reader :tracking_details
+ # The Transaction associated with this object.
+ sig { returns(T.any(String, Stripe::Treasury::Transaction)) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return OutboundPayments that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::OutboundPayment::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return OutboundPayments sent to this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::OutboundPayment::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Required hash if type is set to `us_bank_account`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(billing_details: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails), financial_account: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), type: String, us_bank_account: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::UsBankAccount)).void
+ }
+ def initialize(
+ billing_details: nil,
+ financial_account: nil,
+ metadata: nil,
+ type: nil,
+ us_bank_account: nil
+ ); end
+ end
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ sig { params(network: T.nilable(String)).void }
+ def initialize(network: nil); end
+ end
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(us_bank_account: nil); end
+ end
+ class EndUserDetails < Stripe::RequestParams
+ # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :present
+ sig { params(ip_address: T.nilable(String), present: T::Boolean).void }
+ def initialize(ip_address: nil, present: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData))
+ }
+ attr_accessor :destination_payment_method_data
+ # Payment method-specific configuration for this OutboundPayment.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions))
+ }
+ attr_accessor :destination_payment_method_options
+ # End user details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::EndUserDetails))
+ }
+ attr_accessor :end_user_details
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment".
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, customer: T.nilable(String), description: T.nilable(String), destination_payment_method: T.nilable(String), destination_payment_method_data: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData), destination_payment_method_options: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions), end_user_details: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::EndUserDetails), expand: T.nilable(T::Array[String]), financial_account: String, metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ end_user_details: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ sig { returns(String) }
+ attr_accessor :trace_id
+ sig { params(trace_id: String).void }
+ def initialize(trace_id: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :omad
+ sig {
+ params(chips: T.nilable(String), imad: T.nilable(String), omad: T.nilable(String)).void
+ }
+ def initialize(chips: nil, imad: nil, omad: nil); end
+ end
+ # ACH network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::Ach))
+ }
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ sig { returns(String) }
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::Ach), type: String, us_domestic_wire: T.nilable(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ sig { returns(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails) }
+ attr_accessor :tracking_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), tracking_details: ::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails).void
+ }
+ def initialize(expand: nil, tracking_details: nil); end
+ end
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReturnOutboundPaymentParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # The return code to be set on the OutboundPayment object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ sig { params(code: T.nilable(String)).void }
+ def initialize(code: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Optional hash to set the return code.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPayment::ReturnOutboundPaymentParams::ReturnedDetails))
+ }
+ attr_accessor :returned_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), returned_details: T.nilable(::Stripe::Treasury::OutboundPayment::ReturnOutboundPaymentParams::ReturnedDetails)).void
+ }
+ def initialize(expand: nil, returned_details: nil); end
+ end
+ # Cancel an OutboundPayment.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundPayment::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # Cancel an OutboundPayment.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::OutboundPayment::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def self.cancel(id, params = {}, opts = {}); end
+
+ # Creates an OutboundPayment.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundPayment::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of OutboundPayments sent from the specified FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundPayment::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/outbound_transfer.rbi b/rbi/stripe/resources/treasury/outbound_transfer.rbi
new file mode 100644
index 00000000..2f76df0e
--- /dev/null
+++ b/rbi/stripe/resources/treasury/outbound_transfer.rbi
@@ -0,0 +1,431 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ class OutboundTransfer < APIResource
+ class DestinationPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ end
+ class FinancialAccount < Stripe::StripeObject
+ # Token of the FinancialAccount.
+ sig { returns(String) }
+ attr_reader :id
+ # The rails used to send funds.
+ sig { returns(String) }
+ attr_reader :network
+ end
+ class UsBankAccount < Stripe::StripeObject
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_holder_type
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_reader :account_type
+ # Name of the bank associated with the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
+ sig { returns(T.nilable(String)) }
+ attr_reader :fingerprint
+ # Last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # ID of the mandate used to make this payment.
+ sig { returns(T.any(String, Stripe::Mandate)) }
+ attr_reader :mandate
+ # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_reader :network
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ sig { returns(FinancialAccount) }
+ attr_reader :financial_account
+ # The type of the payment method used in the OutboundTransfer.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class ReturnedDetails < Stripe::StripeObject
+ # Reason for the return.
+ sig { returns(String) }
+ attr_reader :code
+ # The Transaction associated with this object.
+ sig { returns(T.any(String, Stripe::Treasury::Transaction)) }
+ attr_reader :transaction
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when an OutboundTransfer changed status to `canceled`
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :canceled_at
+ # Timestamp describing when an OutboundTransfer changed status to `failed`
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :failed_at
+ # Timestamp describing when an OutboundTransfer changed status to `posted`
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :posted_at
+ # Timestamp describing when an OutboundTransfer changed status to `returned`
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :returned_at
+ end
+ class TrackingDetails < Stripe::StripeObject
+ class Ach < Stripe::StripeObject
+ # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network.
+ sig { returns(String) }
+ attr_reader :trace_id
+ end
+ class UsDomesticWire < Stripe::StripeObject
+ # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :chips
+ # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :imad
+ # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_reader :omad
+ end
+ # Attribute for field ach
+ sig { returns(Ach) }
+ attr_reader :ach
+ # The US bank account network used to send funds.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_domestic_wire
+ sig { returns(UsDomesticWire) }
+ attr_reader :us_domestic_wire
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Returns `true` if the object can be canceled, and `false` otherwise.
+ sig { returns(T::Boolean) }
+ attr_reader :cancelable
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The PaymentMethod used as the payment instrument for an OutboundTransfer.
+ sig { returns(T.nilable(String)) }
+ attr_reader :destination_payment_method
+ # Attribute for field destination_payment_method_details
+ sig { returns(DestinationPaymentMethodDetails) }
+ attr_reader :destination_payment_method_details
+ # The date when funds are expected to arrive in the destination account.
+ sig { returns(Integer) }
+ attr_reader :expected_arrival_date
+ # The FinancialAccount that funds were pulled from.
+ sig { returns(String) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Details about a returned OutboundTransfer. Only set when the status is `returned`.
+ sig { returns(T.nilable(ReturnedDetails)) }
+ attr_reader :returned_details
+ # Information about the OutboundTransfer to be sent to the recipient account.
+ sig { returns(String) }
+ attr_reader :statement_descriptor
+ # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ # Details about network-specific tracking information if available.
+ sig { returns(T.nilable(TrackingDetails)) }
+ attr_reader :tracking_details
+ # The Transaction associated with this object.
+ sig { returns(T.any(String, Stripe::Treasury::Transaction)) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # The type of the destination.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(financial_account: T.nilable(String), type: String).void }
+ def initialize(financial_account: nil, type: nil); end
+ end
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ sig { params(network: T.nilable(String)).void }
+ def initialize(network: nil); end
+ end
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(us_bank_account: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundTransfer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodData))
+ }
+ attr_accessor :destination_payment_method_data
+ # Hash describing payment method configuration details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions))
+ }
+ attr_accessor :destination_payment_method_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer".
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), destination_payment_method: T.nilable(String), destination_payment_method_data: T.nilable(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodData), destination_payment_method_options: T.nilable(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions), expand: T.nilable(T::Array[String]), financial_account: String, metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ sig { returns(String) }
+ attr_accessor :trace_id
+ sig { params(trace_id: String).void }
+ def initialize(trace_id: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :omad
+ sig {
+ params(chips: T.nilable(String), imad: T.nilable(String), omad: T.nilable(String)).void
+ }
+ def initialize(chips: nil, imad: nil, omad: nil); end
+ end
+ # ACH network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::Ach))
+ }
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ sig { returns(String) }
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::Ach), type: String, us_domestic_wire: T.nilable(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ sig { returns(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails) }
+ attr_accessor :tracking_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), tracking_details: ::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails).void
+ }
+ def initialize(expand: nil, tracking_details: nil); end
+ end
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReturnOutboundTransferParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # Reason for the return.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ sig { params(code: T.nilable(String)).void }
+ def initialize(code: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about a returned OutboundTransfer.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransfer::ReturnOutboundTransferParams::ReturnedDetails))
+ }
+ attr_accessor :returned_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), returned_details: T.nilable(::Stripe::Treasury::OutboundTransfer::ReturnOutboundTransferParams::ReturnedDetails)).void
+ }
+ def initialize(expand: nil, returned_details: nil); end
+ end
+ # An OutboundTransfer can be canceled if the funds have not yet been paid out.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def cancel(params = {}, opts = {}); end
+
+ # An OutboundTransfer can be canceled if the funds have not yet been paid out.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::Treasury::OutboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def self.cancel(outbound_transfer, params = {}, opts = {}); end
+
+ # Creates an OutboundTransfer.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundTransfer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # Returns a list of OutboundTransfers sent from the specified FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundTransfer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/received_credit.rbi b/rbi/stripe/resources/treasury/received_credit.rbi
new file mode 100644
index 00000000..6250baeb
--- /dev/null
+++ b/rbi/stripe/resources/treasury/received_credit.rbi
@@ -0,0 +1,302 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
+ class ReceivedCredit < APIResource
+ class InitiatingPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ end
+ class FinancialAccount < Stripe::StripeObject
+ # The FinancialAccount ID.
+ sig { returns(String) }
+ attr_reader :id
+ # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
+ sig { returns(String) }
+ attr_reader :network
+ end
+ class UsBankAccount < Stripe::StripeObject
+ # Bank name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # The last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # The routing number for the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ # Set when `type` is `balance`.
+ sig { returns(String) }
+ attr_reader :balance
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ sig { returns(FinancialAccount) }
+ attr_reader :financial_account
+ # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.
+ sig { returns(String) }
+ attr_reader :issuing_card
+ # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class LinkedFlows < Stripe::StripeObject
+ class SourceFlowDetails < Stripe::StripeObject
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ sig { returns(Stripe::Treasury::CreditReversal) }
+ attr_reader :credit_reversal
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ sig { returns(Stripe::Treasury::OutboundPayment) }
+ attr_reader :outbound_payment
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ sig { returns(Stripe::Treasury::OutboundTransfer) }
+ attr_reader :outbound_transfer
+ # A `Payout` object is created when you receive funds from Stripe, or when you
+ # initiate a payout to either a bank account or debit card of a [connected
+ # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
+ # and list all payouts. Payouts are made on [varying
+ # schedules](/docs/connect/manage-payout-schedule), depending on your country and
+ # industry.
+ #
+ # Related guide: [Receiving payouts](https://stripe.com/docs/payouts)
+ sig { returns(Stripe::Payout) }
+ attr_reader :payout
+ # The type of the source flow that originated the ReceivedCredit.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # The CreditReversal created as a result of this ReceivedCredit being reversed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :credit_reversal
+ # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuing_authorization
+ # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuing_transaction
+ # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.
+ sig { returns(T.nilable(String)) }
+ attr_reader :source_flow
+ # The expandable object of the source flow.
+ sig { returns(T.nilable(SourceFlowDetails)) }
+ attr_reader :source_flow_details
+ # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).
+ sig { returns(T.nilable(String)) }
+ attr_reader :source_flow_type
+ end
+ class ReversalDetails < Stripe::StripeObject
+ # Time before which a ReceivedCredit can be reversed.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :deadline
+ # Set if a ReceivedCredit cannot be reversed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :restricted_reason
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(String) }
+ attr_reader :description
+ # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_code
+ # The FinancialAccount that received the funds.
+ sig { returns(T.nilable(String)) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field initiating_payment_method_details
+ sig { returns(InitiatingPaymentMethodDetails) }
+ attr_reader :initiating_payment_method_details
+ # Attribute for field linked_flows
+ sig { returns(LinkedFlows) }
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The rails used to send the funds.
+ sig { returns(String) }
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Details describing when a ReceivedCredit may be reversed.
+ sig { returns(T.nilable(ReversalDetails)) }
+ attr_reader :reversal_details
+ # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.
+ sig { returns(String) }
+ attr_reader :status
+ # The Transaction associated with this object.
+ sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ class LinkedFlows < Stripe::RequestParams
+ # The source flow type.
+ sig { returns(String) }
+ attr_accessor :source_flow_type
+ sig { params(source_flow_type: String).void }
+ def initialize(source_flow_type: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount that received the funds.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return ReceivedCredits described by the flow.
+ sig { returns(T.nilable(::Stripe::Treasury::ReceivedCredit::ListParams::LinkedFlows)) }
+ attr_accessor :linked_flows
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return ReceivedCredits that have the given status: `succeeded` or `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), linked_flows: T.nilable(::Stripe::Treasury::ReceivedCredit::ListParams::LinkedFlows), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ linked_flows: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # The bank account's routing number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(account_holder_name: nil, account_number: nil, routing_number: nil); end
+ end
+ # The source type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(type: String, us_bank_account: T.nilable(::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount)).void
+ }
+ def initialize(type: nil, us_bank_account: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails))
+ }
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_accessor :network
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, initiating_payment_method_details: T.nilable(::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails), network: String).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ ); end
+ end
+ # Returns a list of ReceivedCredits.
+ sig {
+ params(params: T.any(::Stripe::Treasury::ReceivedCredit::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/received_debit.rbi b/rbi/stripe/resources/treasury/received_debit.rbi
new file mode 100644
index 00000000..a39f18e5
--- /dev/null
+++ b/rbi/stripe/resources/treasury/received_debit.rbi
@@ -0,0 +1,256 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
+ class ReceivedDebit < APIResource
+ class InitiatingPaymentMethodDetails < Stripe::StripeObject
+ class BillingDetails < Stripe::StripeObject
+ class Address < Stripe::StripeObject
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_reader :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_reader :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_reader :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_reader :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_reader :state
+ end
+ # Attribute for field address
+ sig { returns(Address) }
+ attr_reader :address
+ # Email address.
+ sig { returns(T.nilable(String)) }
+ attr_reader :email
+ # Full name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :name
+ end
+ class FinancialAccount < Stripe::StripeObject
+ # The FinancialAccount ID.
+ sig { returns(String) }
+ attr_reader :id
+ # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
+ sig { returns(String) }
+ attr_reader :network
+ end
+ class UsBankAccount < Stripe::StripeObject
+ # Bank name.
+ sig { returns(T.nilable(String)) }
+ attr_reader :bank_name
+ # The last four digits of the bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_reader :last4
+ # The routing number for the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_reader :routing_number
+ end
+ # Set when `type` is `balance`.
+ sig { returns(String) }
+ attr_reader :balance
+ # Attribute for field billing_details
+ sig { returns(BillingDetails) }
+ attr_reader :billing_details
+ # Attribute for field financial_account
+ sig { returns(FinancialAccount) }
+ attr_reader :financial_account
+ # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.
+ sig { returns(String) }
+ attr_reader :issuing_card
+ # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
+ sig { returns(String) }
+ attr_reader :type
+ # Attribute for field us_bank_account
+ sig { returns(UsBankAccount) }
+ attr_reader :us_bank_account
+ end
+ class LinkedFlows < Stripe::StripeObject
+ # The DebitReversal created as a result of this ReceivedDebit being reversed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :debit_reversal
+ # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.
+ sig { returns(T.nilable(String)) }
+ attr_reader :inbound_transfer
+ # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuing_authorization
+ # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :issuing_transaction
+ # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :payout
+ end
+ class ReversalDetails < Stripe::StripeObject
+ # Time before which a ReceivedDebit can be reversed.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :deadline
+ # Set if a ReceivedDebit can't be reversed.
+ sig { returns(T.nilable(String)) }
+ attr_reader :restricted_reason
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(String) }
+ attr_reader :description
+ # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
+ sig { returns(T.nilable(String)) }
+ attr_reader :failure_code
+ # The FinancialAccount that funds were pulled from.
+ sig { returns(T.nilable(String)) }
+ attr_reader :financial_account
+ # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
+ sig { returns(T.nilable(String)) }
+ attr_reader :hosted_regulatory_receipt_url
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Attribute for field initiating_payment_method_details
+ sig { returns(InitiatingPaymentMethodDetails) }
+ attr_reader :initiating_payment_method_details
+ # Attribute for field linked_flows
+ sig { returns(LinkedFlows) }
+ attr_reader :linked_flows
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # The network used for the ReceivedDebit.
+ sig { returns(String) }
+ attr_reader :network
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Details describing when a ReceivedDebit might be reversed.
+ sig { returns(T.nilable(ReversalDetails)) }
+ attr_reader :reversal_details
+ # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.
+ sig { returns(String) }
+ attr_reader :status
+ # The Transaction associated with this object.
+ sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) }
+ attr_reader :transaction
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount that funds were pulled from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return ReceivedDebits that have the given status: `succeeded` or `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # The bank account's routing number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(account_holder_name: nil, account_number: nil, routing_number: nil); end
+ end
+ # The source type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(type: String, us_bank_account: T.nilable(::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount)).void
+ }
+ def initialize(type: nil, us_bank_account: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails))
+ }
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_accessor :network
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, initiating_payment_method_details: T.nilable(::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails), network: String).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ ); end
+ end
+ # Returns a list of ReceivedDebits.
+ sig {
+ params(params: T.any(::Stripe::Treasury::ReceivedDebit::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/transaction.rbi b/rbi/stripe/resources/treasury/transaction.rbi
new file mode 100644
index 00000000..0ad11daf
--- /dev/null
+++ b/rbi/stripe/resources/treasury/transaction.rbi
@@ -0,0 +1,215 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.
+ class Transaction < APIResource
+ class BalanceImpact < Stripe::StripeObject
+ # The change made to funds the user can spend right now.
+ sig { returns(Integer) }
+ attr_reader :cash
+ # The change made to funds that are not spendable yet, but will become available at a later time.
+ sig { returns(Integer) }
+ attr_reader :inbound_pending
+ # The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
+ sig { returns(Integer) }
+ attr_reader :outbound_pending
+ end
+ class FlowDetails < Stripe::StripeObject
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ sig { returns(Stripe::Treasury::CreditReversal) }
+ attr_reader :credit_reversal
+ # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
+ sig { returns(Stripe::Treasury::DebitReversal) }
+ attr_reader :debit_reversal
+ # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
+ #
+ # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
+ sig { returns(Stripe::Treasury::InboundTransfer) }
+ attr_reader :inbound_transfer
+ # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
+ # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
+ # purchase to be completed successfully.
+ #
+ # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
+ sig { returns(Stripe::Issuing::Authorization) }
+ attr_reader :issuing_authorization
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ sig { returns(Stripe::Treasury::OutboundPayment) }
+ attr_reader :outbound_payment
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ sig { returns(Stripe::Treasury::OutboundTransfer) }
+ attr_reader :outbound_transfer
+ # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
+ sig { returns(Stripe::Treasury::ReceivedCredit) }
+ attr_reader :received_credit
+ # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
+ sig { returns(Stripe::Treasury::ReceivedDebit) }
+ attr_reader :received_debit
+ # Type of the flow that created the Transaction. Set to the same value as `flow_type`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ class StatusTransitions < Stripe::StripeObject
+ # Timestamp describing when the Transaction changed status to `posted`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :posted_at
+ # Timestamp describing when the Transaction changed status to `void`.
+ sig { returns(T.nilable(Integer)) }
+ attr_reader :void_at
+ end
+ # Amount (in cents) transferred.
+ sig { returns(Integer) }
+ attr_reader :amount
+ # Change to a FinancialAccount's balance
+ sig { returns(BalanceImpact) }
+ attr_reader :balance_impact
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(String) }
+ attr_reader :description
+ # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
+ sig { returns(T.nilable(Stripe::ListObject)) }
+ attr_reader :entries
+ # The FinancialAccount associated with this object.
+ sig { returns(String) }
+ attr_reader :financial_account
+ # ID of the flow that created the Transaction.
+ sig { returns(T.nilable(String)) }
+ attr_reader :flow
+ # Details of the flow that created the Transaction.
+ sig { returns(T.nilable(FlowDetails)) }
+ attr_reader :flow_details
+ # Type of the flow that created the Transaction.
+ sig { returns(String) }
+ attr_reader :flow_type
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # Status of the Transaction.
+ sig { returns(String) }
+ attr_reader :status
+ # Attribute for field status_transitions
+ sig { returns(StatusTransitions) }
+ attr_reader :status_transitions
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class StatusTransitions < Stripe::RequestParams
+ class PostedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Returns Transactions with `posted_at` within the specified range.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::Transaction::ListParams::StatusTransitions::PostedAt, Integer)))
+ }
+ attr_accessor :posted_at
+ sig {
+ params(posted_at: T.nilable(T.any(::Stripe::Treasury::Transaction::ListParams::StatusTransitions::PostedAt, Integer))).void
+ }
+ def initialize(posted_at: nil); end
+ end
+ # Only return Transactions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::Transaction::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :order_by
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return Transactions that have the given status: `open`, `posted`, or `void`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
+ sig { returns(T.nilable(::Stripe::Treasury::Transaction::ListParams::StatusTransitions)) }
+ attr_accessor :status_transitions
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::Transaction::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), order_by: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), status_transitions: T.nilable(::Stripe::Treasury::Transaction::ListParams::StatusTransitions)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ status: nil,
+ status_transitions: nil
+ ); end
+ end
+ # Retrieves a list of Transaction objects.
+ sig {
+ params(params: T.any(::Stripe::Treasury::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/treasury/transaction_entry.rbi b/rbi/stripe/resources/treasury/transaction_entry.rbi
new file mode 100644
index 00000000..1f86bfdd
--- /dev/null
+++ b/rbi/stripe/resources/treasury/transaction_entry.rbi
@@ -0,0 +1,192 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).
+ class TransactionEntry < APIResource
+ class BalanceImpact < Stripe::StripeObject
+ # The change made to funds the user can spend right now.
+ sig { returns(Integer) }
+ attr_reader :cash
+ # The change made to funds that are not spendable yet, but will become available at a later time.
+ sig { returns(Integer) }
+ attr_reader :inbound_pending
+ # The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
+ sig { returns(Integer) }
+ attr_reader :outbound_pending
+ end
+ class FlowDetails < Stripe::StripeObject
+ # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
+ sig { returns(Stripe::Treasury::CreditReversal) }
+ attr_reader :credit_reversal
+ # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
+ sig { returns(Stripe::Treasury::DebitReversal) }
+ attr_reader :debit_reversal
+ # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
+ #
+ # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
+ sig { returns(Stripe::Treasury::InboundTransfer) }
+ attr_reader :inbound_transfer
+ # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
+ # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
+ # purchase to be completed successfully.
+ #
+ # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
+ sig { returns(Stripe::Issuing::Authorization) }
+ attr_reader :issuing_authorization
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
+ #
+ # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
+ sig { returns(Stripe::Treasury::OutboundPayment) }
+ attr_reader :outbound_payment
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
+ #
+ # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
+ #
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
+ sig { returns(Stripe::Treasury::OutboundTransfer) }
+ attr_reader :outbound_transfer
+ # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
+ sig { returns(Stripe::Treasury::ReceivedCredit) }
+ attr_reader :received_credit
+ # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
+ sig { returns(Stripe::Treasury::ReceivedDebit) }
+ attr_reader :received_debit
+ # Type of the flow that created the Transaction. Set to the same value as `flow_type`.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ # Change to a FinancialAccount's balance
+ sig { returns(BalanceImpact) }
+ attr_reader :balance_impact
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # 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).
+ sig { returns(String) }
+ attr_reader :currency
+ # When the TransactionEntry will impact the FinancialAccount's balance.
+ sig { returns(Integer) }
+ attr_reader :effective_at
+ # The FinancialAccount associated with this object.
+ sig { returns(String) }
+ attr_reader :financial_account
+ # Token of the flow associated with the TransactionEntry.
+ sig { returns(T.nilable(String)) }
+ attr_reader :flow
+ # Details of the flow associated with the TransactionEntry.
+ sig { returns(T.nilable(FlowDetails)) }
+ attr_reader :flow_details
+ # Type of the flow associated with the TransactionEntry.
+ sig { returns(String) }
+ attr_reader :flow_type
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The Transaction associated with this object.
+ sig { returns(T.any(String, Stripe::Treasury::Transaction)) }
+ attr_reader :transaction
+ # The specific money movement that generated the TransactionEntry.
+ sig { returns(String) }
+ attr_reader :type
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class EffectiveAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return TransactionEntries that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::TransactionEntry::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Attribute for param field effective_at
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::TransactionEntry::ListParams::EffectiveAt, Integer)))
+ }
+ attr_accessor :effective_at
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :order_by
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return TransactionEntries associated with this Transaction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::TransactionEntry::ListParams::Created, Integer)), effective_at: T.nilable(T.any(::Stripe::Treasury::TransactionEntry::ListParams::EffectiveAt, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), order_by: T.nilable(String), starting_after: T.nilable(String), transaction: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ effective_at: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ transaction: nil
+ ); end
+ end
+ # Retrieves a list of TransactionEntry objects.
+ sig {
+ params(params: T.any(::Stripe::Treasury::TransactionEntry::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/v2/amount.rbi b/rbi/stripe/resources/v2/amount.rbi
new file mode 100644
index 00000000..0219eb9d
--- /dev/null
+++ b/rbi/stripe/resources/v2/amount.rbi
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+# typed: true
+
+module Stripe
+ module V2
+ class Amount
+ sig { returns(Integer) }
+ attr_reader :value
+
+ sig { returns(String) }
+ attr_reader :currency
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/v2/billing/meter_event.rbi b/rbi/stripe/resources/v2/billing/meter_event.rbi
new file mode 100644
index 00000000..b887a416
--- /dev/null
+++ b/rbi/stripe/resources/v2/billing/meter_event.rbi
@@ -0,0 +1,37 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ # Fix me empty_doc_string.
+ class MeterEvent < APIResource
+ # The creation time of this meter event.
+ sig { returns(String) }
+ attr_reader :created
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_reader :event_name
+ # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period.
+ sig { returns(String) }
+ attr_reader :identifier
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ sig { returns(String) }
+ attr_reader :object
+ # The payload of the event. This must contain the fields corresponding to a meter’s
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
+ # `value_settings.event_payload_key` (default is `value`). Read more about the payload.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :payload
+ # The time of the event. Must be within the past 35 calendar days or up to
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
+ sig { returns(String) }
+ attr_reader :timestamp
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi
new file mode 100644
index 00000000..27b5a2e6
--- /dev/null
+++ b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ class MeterEventAdjustment < APIResource
+ class Cancel < Stripe::StripeObject
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ sig { returns(String) }
+ attr_reader :identifier
+ end
+ # Specifies which event to cancel.
+ sig { returns(Cancel) }
+ attr_reader :cancel
+ # The time the adjustment was created.
+ sig { returns(String) }
+ attr_reader :created
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_reader :event_name
+ # The unique id of this meter event adjustment.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ sig { returns(String) }
+ attr_reader :object
+ # Open Enum. The meter event adjustment’s status.
+ sig { returns(String) }
+ attr_reader :status
+ # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/v2/billing/meter_event_session.rbi b/rbi/stripe/resources/v2/billing/meter_event_session.rbi
new file mode 100644
index 00000000..9e3c7ee9
--- /dev/null
+++ b/rbi/stripe/resources/v2/billing/meter_event_session.rbi
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ class MeterEventSession < APIResource
+ # The authentication token for this session. Use this token when calling the
+ # high-throughput meter event API.
+ sig { returns(String) }
+ attr_reader :authentication_token
+ # The creation time of this session.
+ sig { returns(String) }
+ attr_reader :created
+ # The time at which this session will expire.
+ sig { returns(String) }
+ attr_reader :expires_at
+ # The unique id of this auth session.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ sig { returns(String) }
+ attr_reader :object
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi
new file mode 100644
index 00000000..e5f39a72
--- /dev/null
+++ b/rbi/stripe/resources/v2/event.rbi
@@ -0,0 +1,48 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ # Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate [thin events](https://docs.stripe.com/event-destinations#benefits-of-thin-events) which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. [Retrieve the event object](https://docs.stripe.com/event-destinations#fetch-data) for additional data about the event. Use the related object ID in the event payload to [fetch the API resource](https://docs.stripe.com/event-destinations#retrieve-the-object-associated-with-thin-events) of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload.
+ class Event < APIResource
+ class Reason < Stripe::StripeObject
+ class Request < Stripe::StripeObject
+ # ID of the API request that caused the event.
+ sig { returns(String) }
+ attr_reader :id
+ # The idempotency key transmitted during the request.
+ sig { returns(String) }
+ attr_reader :idempotency_key
+ end
+ # Event reason type.
+ sig { returns(String) }
+ attr_reader :type
+ # Information on the API request that instigated the event.
+ sig { returns(T.nilable(Request)) }
+ attr_reader :request
+ end
+ # Authentication context needed to fetch the event or related object.
+ sig { returns(T.nilable(String)) }
+ attr_reader :context
+ # Time at which the object was created.
+ sig { returns(String) }
+ attr_reader :created
+ # Unique identifier for the event.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ sig { returns(String) }
+ attr_reader :object
+ # Reason for the event.
+ sig { returns(T.nilable(Reason)) }
+ attr_reader :reason
+ # The type of the event.
+ sig { returns(String) }
+ attr_reader :type
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi
new file mode 100644
index 00000000..6f4657fa
--- /dev/null
+++ b/rbi/stripe/resources/v2/event_destination.rbi
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ # Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events).
+ class EventDestination < APIResource
+ class StatusDetails < Stripe::StripeObject
+ class Disabled < Stripe::StripeObject
+ # Reason event destination has been disabled.
+ sig { returns(String) }
+ attr_reader :reason
+ end
+ # Details about why the event destination has been disabled.
+ sig { returns(T.nilable(Disabled)) }
+ attr_reader :disabled
+ end
+ class AmazonEventbridge < Stripe::StripeObject
+ # The AWS account ID.
+ sig { returns(String) }
+ attr_reader :aws_account_id
+ # The ARN of the AWS event source.
+ sig { returns(String) }
+ attr_reader :aws_event_source_arn
+ # The state of the AWS event source.
+ sig { returns(String) }
+ attr_reader :aws_event_source_status
+ end
+ class WebhookEndpoint < Stripe::StripeObject
+ # The signing secret of the webhook endpoint, only includable on creation.
+ sig { returns(T.nilable(String)) }
+ attr_reader :signing_secret
+ # The URL of the webhook endpoint, includable.
+ sig { returns(T.nilable(String)) }
+ attr_reader :url
+ end
+ # Time at which the object was created.
+ sig { returns(String) }
+ attr_reader :created
+ # An optional description of what the event destination is used for.
+ sig { returns(String) }
+ attr_reader :description
+ # The list of events to enable for this endpoint.
+ sig { returns(T::Array[String]) }
+ attr_reader :enabled_events
+ # Payload type of events being subscribed to.
+ sig { returns(String) }
+ attr_reader :event_payload
+ # Where events should be routed from.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_reader :events_from
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # Metadata.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_reader :metadata
+ # Event destination name.
+ sig { returns(String) }
+ attr_reader :name
+ # String representing the object's type. Objects of the same type share the same value of the object field.
+ sig { returns(String) }
+ attr_reader :object
+ # If using the snapshot event payload, the API version events are rendered as.
+ sig { returns(T.nilable(String)) }
+ attr_reader :snapshot_api_version
+ # Status. It can be set to either enabled or disabled.
+ sig { returns(String) }
+ attr_reader :status
+ # Additional information about event destination status.
+ sig { returns(T.nilable(StatusDetails)) }
+ attr_reader :status_details
+ # Event destination type.
+ sig { returns(String) }
+ attr_reader :type
+ # Time at which the object was last updated.
+ sig { returns(String) }
+ attr_reader :updated
+ # Amazon EventBridge configuration.
+ sig { returns(T.nilable(AmazonEventbridge)) }
+ attr_reader :amazon_eventbridge
+ # Webhook endpoint configuration.
+ sig { returns(T.nilable(WebhookEndpoint)) }
+ attr_reader :webhook_endpoint
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/resources/webhook_endpoint.rbi b/rbi/stripe/resources/webhook_endpoint.rbi
new file mode 100644
index 00000000..e19b3df3
--- /dev/null
+++ b/rbi/stripe/resources/webhook_endpoint.rbi
@@ -0,0 +1,170 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ # You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be
+ # notified about events that happen in your Stripe account or connected
+ # accounts.
+ #
+ # Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.
+ #
+ # Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure)
+ class WebhookEndpoint < APIResource
+ # The API version events are rendered as for this webhook endpoint.
+ sig { returns(T.nilable(String)) }
+ attr_reader :api_version
+ # The ID of the associated Connect application.
+ sig { returns(T.nilable(String)) }
+ attr_reader :application
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
+ sig { returns(Integer) }
+ attr_reader :created
+ # An optional description of what the webhook is used for.
+ sig { returns(T.nilable(String)) }
+ attr_reader :description
+ # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
+ sig { returns(T::Array[String]) }
+ attr_reader :enabled_events
+ # Unique identifier for the object.
+ sig { returns(String) }
+ attr_reader :id
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ sig { returns(T::Boolean) }
+ attr_reader :livemode
+ # 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.
+ sig { returns(T::Hash[String, String]) }
+ attr_reader :metadata
+ # String representing the object's type. Objects of the same type share the same value.
+ sig { returns(String) }
+ attr_reader :object
+ # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
+ sig { returns(String) }
+ attr_reader :secret
+ # The status of the webhook. It can be `enabled` or `disabled`.
+ sig { returns(String) }
+ attr_reader :status
+ # The URL of the webhook endpoint.
+ sig { returns(String) }
+ attr_reader :url
+ # Always true for a deleted object
+ sig { returns(T::Boolean) }
+ attr_reader :deleted
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An optional description of what the webhook is used for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # Disable the webhook endpoint if set to true.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disabled
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(description: T.nilable(T.nilable(String)), disabled: T.nilable(T::Boolean), enabled_events: T.nilable(T::Array[String]), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), url: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ disabled: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :api_version
+ # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :connect
+ # An optional description of what the webhook is used for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ sig { returns(T::Array[String]) }
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ sig { returns(String) }
+ attr_accessor :url
+ sig {
+ params(api_version: T.nilable(String), connect: T.nilable(T::Boolean), description: T.nilable(T.nilable(String)), enabled_events: T::Array[String], expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), url: String).void
+ }
+ def initialize(
+ api_version: nil,
+ connect: nil,
+ description: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ ); end
+ end
+ # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
+ sig {
+ params(params: T.any(::Stripe::WebhookEndpoint::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def self.create(params = {}, opts = {}); end
+
+ # You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
+ sig {
+ params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpoint::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def self.delete(webhook_endpoint, params = {}, opts = {}); end
+
+ # You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
+ sig {
+ params(params: T.any(::Stripe::WebhookEndpoint::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def delete(params = {}, opts = {}); end
+
+ # Returns a list of your webhook endpoints.
+ sig {
+ params(params: T.any(::Stripe::WebhookEndpoint::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def self.list(params = {}, opts = {}); end
+
+ # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
+ sig {
+ params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpoint::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def self.update(webhook_endpoint, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_capability_service.rbi b/rbi/stripe/services/account_capability_service.rbi
new file mode 100644
index 00000000..a9fb3937
--- /dev/null
+++ b/rbi/stripe/services/account_capability_service.rbi
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountCapabilityService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
+ #
+ # If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(expand: T.nilable(T::Array[String]), requested: T.nilable(T::Boolean)).void }
+ def initialize(expand: nil, requested: nil); end
+ end
+ # Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountCapabilityService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(account, params = {}, opts = {}); end
+
+ # Retrieves information about the specified Account Capability.
+ sig {
+ params(account: String, capability: String, params: T.any(::Stripe::AccountCapabilityService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capability)
+ }
+ def retrieve(account, capability, params = {}, opts = {}); end
+
+ # Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.
+ sig {
+ params(account: String, capability: String, params: T.any(::Stripe::AccountCapabilityService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capability)
+ }
+ def update(account, capability, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_external_account_service.rbi b/rbi/stripe/services/account_external_account_service.rbi
new file mode 100644
index 00000000..2212e180
--- /dev/null
+++ b/rbi/stripe/services/account_external_account_service.rbi
@@ -0,0 +1,306 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountExternalAccountService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check.
+ sig {
+ returns(T.nilable(::Stripe::AccountExternalAccountService::UpdateParams::Documents::BankAccountOwnershipVerification))
+ }
+ attr_accessor :bank_account_ownership_verification
+ sig {
+ params(bank_account_ownership_verification: T.nilable(::Stripe::AccountExternalAccountService::UpdateParams::Documents::BankAccountOwnershipVerification)).void
+ }
+ def initialize(bank_account_ownership_verification: nil); end
+ end
+ # The name of the person or business that owns the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. This can be either `individual` or `company`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :account_holder_type
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # City/District/Suburb/Town/Village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Billing address country, if provided when creating card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Address line 1 (Street address/PO Box/Company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Address line 2 (Apartment/Suite/Unit/Building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # State/County/Province/Region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # When set to true, this becomes the default external account for its currency.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :default_for_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::AccountExternalAccountService::UpdateParams::Documents)) }
+ attr_accessor :documents
+ # Two digit number representing the card’s expiration month.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exp_month
+ # Four digit number representing the card’s expiration year.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Cardholder name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(account_holder_name: T.nilable(String), account_holder_type: T.nilable(T.nilable(T.any(String, String))), account_type: T.nilable(String), address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), default_for_currency: T.nilable(T::Boolean), documents: T.nilable(::Stripe::AccountExternalAccountService::UpdateParams::Documents), exp_month: T.nilable(String), exp_year: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_type: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ default_for_currency: nil,
+ documents: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ metadata: nil,
+ name: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filter external accounts according to a particular object type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :object
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), object: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ object: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(object: String, account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, country: String, currency: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field address_city
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field cvc
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ sig { returns(Integer) }
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ sig { returns(Integer) }
+ attr_accessor :exp_year
+ # Attribute for param field name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Attribute for param field number
+ sig { returns(String) }
+ attr_accessor :number
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(object: String, address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: Integer, exp_year: Integer, name: T.nilable(String), number: String, metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil
+ ); end
+ end
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field token
+ sig { returns(String) }
+ attr_accessor :token
+ sig { params(object: String, currency: T.nilable(String), token: String).void }
+ def initialize(object: nil, currency: nil, token: nil); end
+ end
+ # When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :default_for_currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead.
+ sig {
+ returns(T.any(String, ::Stripe::AccountExternalAccountService::CreateParams::Card, ::Stripe::AccountExternalAccountService::CreateParams::BankAccount, ::Stripe::AccountExternalAccountService::CreateParams::CardToken))
+ }
+ attr_accessor :external_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(default_for_currency: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), external_account: T.any(String, ::Stripe::AccountExternalAccountService::CreateParams::Card, ::Stripe::AccountExternalAccountService::CreateParams::BankAccount, ::Stripe::AccountExternalAccountService::CreateParams::CardToken), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(
+ default_for_currency: nil,
+ expand: nil,
+ external_account: nil,
+ metadata: nil
+ ); end
+ end
+ # Create an external account for a given account.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountExternalAccountService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card))
+ }
+ def create(account, params = {}, opts = {}); end
+
+ # Delete a specified external account for a given account.
+ sig {
+ params(account: String, id: String, params: T.any(::Stripe::AccountExternalAccountService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card))
+ }
+ def delete(account, id, params = {}, opts = {}); end
+
+ # List external accounts for an account.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountExternalAccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(account, params = {}, opts = {}); end
+
+ # Retrieve a specified external account for a given account.
+ sig {
+ params(account: String, id: String, params: T.any(::Stripe::AccountExternalAccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card))
+ }
+ def retrieve(account, id, params = {}, opts = {}); end
+
+ # Updates the metadata, account holder name, account holder type of a bank account belonging to
+ # a connected account and optionally sets it as the default for its currency. Other bank account
+ # details are not editable by design.
+ #
+ # You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
+ #
+ # You can re-enable a disabled bank account by performing an update call without providing any
+ # arguments or changes.
+ sig {
+ params(account: String, id: String, params: T.any(::Stripe::AccountExternalAccountService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card))
+ }
+ def update(account, id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_link_service.rbi b/rbi/stripe/services/account_link_service.rbi
new file mode 100644
index 00000000..249a55ca
--- /dev/null
+++ b/rbi/stripe/services/account_link_service.rbi
@@ -0,0 +1,58 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountLinkService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class CollectionOptions < Stripe::RequestParams
+ # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :fields
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :future_requirements
+ sig { params(fields: T.nilable(String), future_requirements: T.nilable(String)).void }
+ def initialize(fields: nil, future_requirements: nil); end
+ end
+ # The identifier of the account to create an account link for.
+ sig { returns(String) }
+ attr_accessor :account
+ # The collect parameter is deprecated. Use `collection_options` instead.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collect
+ # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
+ sig { returns(T.nilable(::Stripe::AccountLinkService::CreateParams::CollectionOptions)) }
+ attr_accessor :collection_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refresh_url
+ # The URL that the user will be redirected to upon leaving or completing the linked flow.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(account: String, collect: T.nilable(String), collection_options: T.nilable(::Stripe::AccountLinkService::CreateParams::CollectionOptions), expand: T.nilable(T::Array[String]), refresh_url: T.nilable(String), return_url: T.nilable(String), type: String).void
+ }
+ def initialize(
+ account: nil,
+ collect: nil,
+ collection_options: nil,
+ expand: nil,
+ refresh_url: nil,
+ return_url: nil,
+ type: nil
+ ); end
+ end
+ # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
+ sig {
+ params(params: T.any(::Stripe::AccountLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountLink)
+ }
+ def create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_login_link_service.rbi b/rbi/stripe/services/account_login_link_service.rbi
new file mode 100644
index 00000000..d9aea262
--- /dev/null
+++ b/rbi/stripe/services/account_login_link_service.rbi
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountLoginLinkService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a login link for a connected account to access the Express Dashboard.
+ #
+ # You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountLoginLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::LoginLink)
+ }
+ def create(account, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_person_service.rbi b/rbi/stripe/services/account_person_service.rbi
new file mode 100644
index 00000000..a6f4f5dd
--- /dev/null
+++ b/rbi/stripe/services/account_person_service.rbi
@@ -0,0 +1,923 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountPersonService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances::Account))
+ }
+ attr_accessor :account
+ sig {
+ params(account: T.nilable(::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances::Account)).void
+ }
+ def initialize(account: nil); end
+ end
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents::CompanyAuthorization))
+ }
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents::Passport))
+ }
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents::Visa)) }
+ attr_accessor :visa
+ sig {
+ params(company_authorization: T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents::CompanyAuthorization), passport: T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents::Passport), visa: T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents::Visa)).void
+ }
+ def initialize(company_authorization: nil, passport: nil, visa: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), representative: T.nilable(T::Boolean), title: T.nilable(String)).void
+ }
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::AccountPersonService::UpdateParams::Verification::AdditionalDocument), document: T.nilable(::Stripe::AccountPersonService::UpdateParams::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances))
+ }
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Address)) }
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::AccountPersonService::UpdateParams::Dob))))
+ }
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents)) }
+ attr_accessor :documents
+ # The person's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The person's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nationality
+ # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :person_token
+ # The person's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The person's registered address.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::RegisteredAddress)) }
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(additional_tos_acceptances: T.nilable(::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances), address: T.nilable(::Stripe::AccountPersonService::UpdateParams::Address), address_kana: T.nilable(::Stripe::AccountPersonService::UpdateParams::AddressKana), address_kanji: T.nilable(::Stripe::AccountPersonService::UpdateParams::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::AccountPersonService::UpdateParams::Dob))), documents: T.nilable(::Stripe::AccountPersonService::UpdateParams::Documents), email: T.nilable(String), expand: T.nilable(T::Array[String]), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nationality: T.nilable(String), person_token: T.nilable(String), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::AccountPersonService::UpdateParams::RegisteredAddress), relationship: T.nilable(::Stripe::AccountPersonService::UpdateParams::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::AccountPersonService::UpdateParams::Verification)).void
+ }
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ person_token: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Relationship < Stripe::RequestParams
+ # A filter on the list of people returned based on whether these people are authorizers of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :authorizer
+ # A filter on the list of people returned based on whether these people are directors of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # A filter on the list of people returned based on whether these people are executives of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # A filter on the list of people returned based on whether these people are legal guardians of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :legal_guardian
+ # A filter on the list of people returned based on whether these people are owners of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # A filter on the list of people returned based on whether these people are the representative of the account's company.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :representative
+ sig {
+ params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), representative: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ representative: nil
+ ); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filters on the list of people returned based on the person's relationship to the account's company.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::ListParams::Relationship)) }
+ attr_accessor :relationship
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), relationship: T.nilable(::Stripe::AccountPersonService::ListParams::Relationship), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ relationship: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances::Account))
+ }
+ attr_accessor :account
+ sig {
+ params(account: T.nilable(::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances::Account)).void
+ }
+ def initialize(account: nil); end
+ end
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Documents::CompanyAuthorization))
+ }
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Documents::Passport))
+ }
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Documents::Visa)) }
+ attr_accessor :visa
+ sig {
+ params(company_authorization: T.nilable(::Stripe::AccountPersonService::CreateParams::Documents::CompanyAuthorization), passport: T.nilable(::Stripe::AccountPersonService::CreateParams::Documents::Passport), visa: T.nilable(::Stripe::AccountPersonService::CreateParams::Documents::Visa)).void
+ }
+ def initialize(company_authorization: nil, passport: nil, visa: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), representative: T.nilable(T::Boolean), title: T.nilable(String)).void
+ }
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::AccountPersonService::CreateParams::Verification::AdditionalDocument), document: T.nilable(::Stripe::AccountPersonService::CreateParams::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ sig {
+ returns(T.nilable(::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances))
+ }
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Address)) }
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::AccountPersonService::CreateParams::Dob))))
+ }
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Documents)) }
+ attr_accessor :documents
+ # The person's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The person's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nationality
+ # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :person_token
+ # The person's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The person's registered address.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::RegisteredAddress)) }
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(additional_tos_acceptances: T.nilable(::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances), address: T.nilable(::Stripe::AccountPersonService::CreateParams::Address), address_kana: T.nilable(::Stripe::AccountPersonService::CreateParams::AddressKana), address_kanji: T.nilable(::Stripe::AccountPersonService::CreateParams::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::AccountPersonService::CreateParams::Dob))), documents: T.nilable(::Stripe::AccountPersonService::CreateParams::Documents), email: T.nilable(String), expand: T.nilable(T::Array[String]), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nationality: T.nilable(String), person_token: T.nilable(String), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::AccountPersonService::CreateParams::RegisteredAddress), relationship: T.nilable(::Stripe::AccountPersonService::CreateParams::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::AccountPersonService::CreateParams::Verification)).void
+ }
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ person_token: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ # Creates a new person.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountPersonService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person)
+ }
+ def create(account, params = {}, opts = {}); end
+
+ # Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.
+ sig {
+ params(account: String, person: String, params: T.any(::Stripe::AccountPersonService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person)
+ }
+ def delete(account, person, params = {}, opts = {}); end
+
+ # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountPersonService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(account, params = {}, opts = {}); end
+
+ # Retrieves an existing person.
+ sig {
+ params(account: String, person: String, params: T.any(::Stripe::AccountPersonService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person)
+ }
+ def retrieve(account, person, params = {}, opts = {}); end
+
+ # Updates an existing person.
+ sig {
+ params(account: String, person: String, params: T.any(::Stripe::AccountPersonService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person)
+ }
+ def update(account, person, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_service.rbi b/rbi/stripe/services/account_service.rbi
new file mode 100644
index 00000000..e932b22c
--- /dev/null
+++ b/rbi/stripe/services/account_service.rbi
@@ -0,0 +1,4117 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountService < StripeService
+ attr_reader :capabilities
+ attr_reader :external_accounts
+ attr_reader :login_links
+ attr_reader :persons
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(object: String, account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, country: String, currency: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ ); end
+ end
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ sig { returns(String) }
+ attr_accessor :fiscal_year_end
+ sig { params(amount: Integer, currency: String, fiscal_year_end: String).void }
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end
+ end
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ sig { params(amount: Integer, currency: String).void }
+ def initialize(amount: nil, currency: nil); end
+ end
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile::AnnualRevenue))
+ }
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue))
+ }
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile::SupportAddress))
+ }
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :support_url
+ # The business's publicly available website.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(annual_revenue: T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile::AnnualRevenue), estimated_worker_count: T.nilable(Integer), mcc: T.nilable(String), monthly_estimated_revenue: T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue), name: T.nilable(String), product_description: T.nilable(String), support_address: T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile::SupportAddress), support_email: T.nilable(String), support_phone: T.nilable(String), support_url: T.nilable(T.nilable(String)), url: T.nilable(String)).void
+ }
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ ); end
+ end
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ # The acss_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AcssDebitPayments))
+ }
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AffirmPayments))
+ }
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AfterpayClearpayPayments))
+ }
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AlmaPayments))
+ }
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AmazonPayPayments))
+ }
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AuBecsDebitPayments))
+ }
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BacsDebitPayments))
+ }
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BancontactPayments))
+ }
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BankTransferPayments))
+ }
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BilliePayments))
+ }
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BlikPayments))
+ }
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BoletoPayments))
+ }
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardPayments))
+ }
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CartesBancairesPayments))
+ }
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments))
+ }
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments))
+ }
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::FpxPayments))
+ }
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GbBankTransferPayments))
+ }
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GiropayPayments))
+ }
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GrabpayPayments))
+ }
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IdealPayments))
+ }
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IndiaInternationalPayments))
+ }
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JcbPayments))
+ }
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JpBankTransferPayments))
+ }
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KakaoPayPayments))
+ }
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KlarnaPayments))
+ }
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KonbiniPayments))
+ }
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KrCardPayments))
+ }
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LegacyPayments))
+ }
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LinkPayments))
+ }
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MobilepayPayments))
+ }
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MultibancoPayments))
+ }
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MxBankTransferPayments))
+ }
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::NaverPayPayments))
+ }
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::OxxoPayments))
+ }
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::P24Payments))
+ }
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PayByBankPayments))
+ }
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaycoPayments))
+ }
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaynowPayments))
+ }
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PromptpayPayments))
+ }
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::RevolutPayPayments))
+ }
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SamsungPayPayments))
+ }
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SatispayPayments))
+ }
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaBankTransferPayments))
+ }
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaDebitPayments))
+ }
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SofortPayments))
+ }
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SwishPayments))
+ }
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099K))
+ }
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099Misc))
+ }
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Transfers)) }
+ attr_accessor :transfers
+ # The treasury capability.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Treasury)) }
+ attr_accessor :treasury
+ # The twint_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TwintPayments))
+ }
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankAccountAchPayments))
+ }
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankTransferPayments))
+ }
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::ZipPayments))
+ }
+ attr_accessor :zip_payments
+ sig {
+ params(acss_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::NaverPayPayments), oxxo_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PaynowPayments), promptpay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities::ZipPayments)).void
+ }
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field address_city
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field cvc
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ sig { returns(Integer) }
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ sig { returns(Integer) }
+ attr_accessor :exp_year
+ # Attribute for param field name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Attribute for param field number
+ sig { returns(String) }
+ attr_accessor :number
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :default_for_currency
+ sig {
+ params(object: String, address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: Integer, exp_year: Integer, name: T.nilable(String), number: String, metadata: T.nilable(T::Hash[String, String]), default_for_currency: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ ); end
+ end
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field token
+ sig { returns(String) }
+ attr_accessor :token
+ sig { params(object: String, currency: T.nilable(String), token: String).void }
+ def initialize(object: nil, currency: nil, token: nil); end
+ end
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document verifying the business.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::AccountService::UpdateParams::Company::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # The company's primary address.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::Address)) }
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::AddressKanji)) }
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::DirectorshipDeclaration))
+ }
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::OwnershipDeclaration))
+ }
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Company::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::AccountService::UpdateParams::Company::Address), address_kana: T.nilable(::Stripe::AccountService::UpdateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::AccountService::UpdateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::AccountService::UpdateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::AccountService::UpdateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::AccountService::UpdateParams::Company::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ ); end
+ end
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::BankAccountOwnershipVerification))
+ }
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyLicense))
+ }
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMemorandumOfAssociation))
+ }
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMinisterialDecree))
+ }
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyRegistrationVerification))
+ }
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification))
+ }
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration))
+ }
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership))
+ }
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+ sig {
+ params(bank_account_ownership_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::AccountService::UpdateParams::Documents::ProofOfUltimateBeneficialOwnership)).void
+ }
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ ); end
+ end
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :payments_pricing
+ sig { params(payments_pricing: T.nilable(T.nilable(String))).void }
+ def initialize(payments_pricing: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), title: T.nilable(String)).void
+ }
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::AccountService::UpdateParams::Individual::Verification::AdditionalDocument), document: T.nilable(::Stripe::AccountService::UpdateParams::Individual::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # The individual's primary address.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::Address)) }
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::AccountService::UpdateParams::Individual::Dob))))
+ }
+ attr_accessor :dob
+ # The individual's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The individual's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The individual's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::RegisteredAddress))
+ }
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::AccountService::UpdateParams::Individual::Address), address_kana: T.nilable(::Stripe::AccountService::UpdateParams::Individual::AddressKana), address_kanji: T.nilable(::Stripe::AccountService::UpdateParams::Individual::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::AccountService::UpdateParams::Individual::Dob))), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::AccountService::UpdateParams::Individual::RegisteredAddress), relationship: T.nilable(::Stripe::AccountService::UpdateParams::Individual::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::AccountService::UpdateParams::Individual::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ sig { params(display_name: T.nilable(String)).void }
+ def initialize(display_name: nil); end
+ end
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :secondary_color
+ sig {
+ params(icon: T.nilable(String), logo: T.nilable(String), primary_color: T.nilable(String), secondary_color: T.nilable(String)).void
+ }
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardIssuing::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardIssuing::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cvc_failure
+ sig {
+ params(avs_failure: T.nilable(T::Boolean), cvc_failure: T.nilable(T::Boolean)).void
+ }
+ def initialize(avs_failure: nil, cvc_failure: nil); end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardPayments::DeclineOn))
+ }
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kanji
+ sig {
+ params(decline_on: T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardPayments::DeclineOn), statement_descriptor_prefix: T.nilable(String), statement_descriptor_prefix_kana: T.nilable(T.nilable(String)), statement_descriptor_prefix_kanji: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ ); end
+ end
+ class Invoices < Stripe::RequestParams
+ # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_account_tax_ids
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :hosted_payment_method_save
+ sig {
+ params(default_account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), hosted_payment_method_save: T.nilable(String)).void
+ }
+ def initialize(default_account_tax_ids: nil, hosted_payment_method_save: nil); end
+ end
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kanji
+ sig {
+ params(statement_descriptor: T.nilable(String), statement_descriptor_kana: T.nilable(String), statement_descriptor_kanji: T.nilable(String)).void
+ }
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ ); end
+ end
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :weekly_anchor
+ sig {
+ params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void
+ }
+ def initialize(
+ delay_days: nil,
+ interval: nil,
+ monthly_anchor: nil,
+ weekly_anchor: nil
+ ); end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Payouts::Schedule))
+ }
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(debit_negative_balances: T.nilable(T::Boolean), schedule: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Payouts::Schedule), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ debit_negative_balances: nil,
+ schedule: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Treasury::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Treasury::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ # Settings specific to Bacs Direct Debit payments.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::BacsDebitPayments))
+ }
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Branding)) }
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardIssuing)) }
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardPayments)) }
+ attr_accessor :card_payments
+ # Settings specific to the account's use of Invoices.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Invoices)) }
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Payments)) }
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Payouts)) }
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings::Treasury)) }
+ attr_accessor :treasury
+ sig {
+ params(bacs_debit_payments: T.nilable(::Stripe::AccountService::UpdateParams::Settings::BacsDebitPayments), branding: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Branding), card_issuing: T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::UpdateParams::Settings::CardPayments), invoices: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Invoices), payments: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Payments), payouts: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Payouts), treasury: T.nilable(::Stripe::AccountService::UpdateParams::Settings::Treasury)).void
+ }
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ ); end
+ end
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user's service agreement type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), service_agreement: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_token
+ # Business information about the account.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile)) }
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Capabilities)) }
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Company)) }
+ attr_accessor :company
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Documents)) }
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T.any(String, ::Stripe::AccountService::UpdateParams::BankAccount, ::Stripe::AccountService::UpdateParams::Card, ::Stripe::AccountService::UpdateParams::CardToken)))))
+ }
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Groups)) }
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Settings)) }
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::TosAcceptance)) }
+ attr_accessor :tos_acceptance
+ sig {
+ params(account_token: T.nilable(String), business_profile: T.nilable(::Stripe::AccountService::UpdateParams::BusinessProfile), business_type: T.nilable(String), capabilities: T.nilable(::Stripe::AccountService::UpdateParams::Capabilities), company: T.nilable(::Stripe::AccountService::UpdateParams::Company), default_currency: T.nilable(String), documents: T.nilable(::Stripe::AccountService::UpdateParams::Documents), email: T.nilable(String), expand: T.nilable(T::Array[String]), external_account: T.nilable(T.nilable(T.any(String, T.any(String, ::Stripe::AccountService::UpdateParams::BankAccount, ::Stripe::AccountService::UpdateParams::Card, ::Stripe::AccountService::UpdateParams::CardToken)))), groups: T.nilable(::Stripe::AccountService::UpdateParams::Groups), individual: T.nilable(::Stripe::AccountService::UpdateParams::Individual), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), settings: T.nilable(::Stripe::AccountService::UpdateParams::Settings), tos_acceptance: T.nilable(::Stripe::AccountService::UpdateParams::TosAcceptance)).void
+ }
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil
+ ); end
+ end
+ class RetrieveCurrentParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return connected accounts that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::AccountService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::AccountService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BankAccount < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(object: String, account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, country: String, currency: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ object: nil,
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ country: nil,
+ currency: nil,
+ routing_number: nil
+ ); end
+ end
+ class BusinessProfile < Stripe::RequestParams
+ class AnnualRevenue < Stripe::RequestParams
+ # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
+ sig { returns(String) }
+ attr_accessor :fiscal_year_end
+ sig { params(amount: Integer, currency: String, fiscal_year_end: String).void }
+ def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end
+ end
+ class MonthlyEstimatedRevenue < Stripe::RequestParams
+ # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ sig { params(amount: Integer, currency: String).void }
+ def initialize(amount: nil, currency: nil); end
+ end
+ class SupportAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The applicant's gross annual revenue for its preceding fiscal year.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile::AnnualRevenue))
+ }
+ attr_accessor :annual_revenue
+ # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :estimated_worker_count
+ # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mcc
+ # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile::MonthlyEstimatedRevenue))
+ }
+ attr_accessor :monthly_estimated_revenue
+ # The customer-facing business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product_description
+ # A publicly available mailing address for sending support issues to.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile::SupportAddress))
+ }
+ attr_accessor :support_address
+ # A publicly available email address for sending support issues to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_email
+ # A publicly available phone number to call with support issues.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :support_phone
+ # A publicly available website for handling support issues.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :support_url
+ # The business's publicly available website.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(annual_revenue: T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile::AnnualRevenue), estimated_worker_count: T.nilable(Integer), mcc: T.nilable(String), monthly_estimated_revenue: T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile::MonthlyEstimatedRevenue), name: T.nilable(String), product_description: T.nilable(String), support_address: T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile::SupportAddress), support_email: T.nilable(String), support_phone: T.nilable(String), support_url: T.nilable(T.nilable(String)), url: T.nilable(String)).void
+ }
+ def initialize(
+ annual_revenue: nil,
+ estimated_worker_count: nil,
+ mcc: nil,
+ monthly_estimated_revenue: nil,
+ name: nil,
+ product_description: nil,
+ support_address: nil,
+ support_email: nil,
+ support_phone: nil,
+ support_url: nil,
+ url: nil
+ ); end
+ end
+ class Capabilities < Stripe::RequestParams
+ class AcssDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AffirmPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AfterpayClearpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AlmaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AmazonPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class AuBecsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BacsDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BancontactPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BilliePayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BlikPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class BoletoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CartesBancairesPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class CashappPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class EpsPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class FpxPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GbBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GiropayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class GrabpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IdealPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class IndiaInternationalPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JcbPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class JpBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KakaoPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KlarnaPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KonbiniPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class KrCardPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LegacyPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class LinkPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MobilepayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MultibancoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class MxBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class NaverPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class OxxoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class P24Payments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PayByBankPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaycoPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PaynowPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class PromptpayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class RevolutPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SamsungPayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SatispayPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SepaDebitPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SofortPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class SwishPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099K < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TaxReportingUs1099Misc < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Transfers < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class Treasury < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class TwintPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankAccountAchPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class UsBankTransferPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ class ZipPayments < Stripe::RequestParams
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Boolean)).void }
+ def initialize(requested: nil); end
+ end
+ # The acss_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AcssDebitPayments))
+ }
+ attr_accessor :acss_debit_payments
+ # The affirm_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AffirmPayments))
+ }
+ attr_accessor :affirm_payments
+ # The afterpay_clearpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AfterpayClearpayPayments))
+ }
+ attr_accessor :afterpay_clearpay_payments
+ # The alma_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AlmaPayments))
+ }
+ attr_accessor :alma_payments
+ # The amazon_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AmazonPayPayments))
+ }
+ attr_accessor :amazon_pay_payments
+ # The au_becs_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AuBecsDebitPayments))
+ }
+ attr_accessor :au_becs_debit_payments
+ # The bacs_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BacsDebitPayments))
+ }
+ attr_accessor :bacs_debit_payments
+ # The bancontact_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BancontactPayments))
+ }
+ attr_accessor :bancontact_payments
+ # The bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BankTransferPayments))
+ }
+ attr_accessor :bank_transfer_payments
+ # The billie_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BilliePayments))
+ }
+ attr_accessor :billie_payments
+ # The blik_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BlikPayments))
+ }
+ attr_accessor :blik_payments
+ # The boleto_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BoletoPayments))
+ }
+ attr_accessor :boleto_payments
+ # The card_issuing capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # The card_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardPayments))
+ }
+ attr_accessor :card_payments
+ # The cartes_bancaires_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CartesBancairesPayments))
+ }
+ attr_accessor :cartes_bancaires_payments
+ # The cashapp_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CashappPayments))
+ }
+ attr_accessor :cashapp_payments
+ # The eps_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::EpsPayments))
+ }
+ attr_accessor :eps_payments
+ # The fpx_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::FpxPayments))
+ }
+ attr_accessor :fpx_payments
+ # The gb_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GbBankTransferPayments))
+ }
+ attr_accessor :gb_bank_transfer_payments
+ # The giropay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GiropayPayments))
+ }
+ attr_accessor :giropay_payments
+ # The grabpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GrabpayPayments))
+ }
+ attr_accessor :grabpay_payments
+ # The ideal_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IdealPayments))
+ }
+ attr_accessor :ideal_payments
+ # The india_international_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IndiaInternationalPayments))
+ }
+ attr_accessor :india_international_payments
+ # The jcb_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JcbPayments))
+ }
+ attr_accessor :jcb_payments
+ # The jp_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JpBankTransferPayments))
+ }
+ attr_accessor :jp_bank_transfer_payments
+ # The kakao_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KakaoPayPayments))
+ }
+ attr_accessor :kakao_pay_payments
+ # The klarna_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KlarnaPayments))
+ }
+ attr_accessor :klarna_payments
+ # The konbini_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KonbiniPayments))
+ }
+ attr_accessor :konbini_payments
+ # The kr_card_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KrCardPayments))
+ }
+ attr_accessor :kr_card_payments
+ # The legacy_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LegacyPayments))
+ }
+ attr_accessor :legacy_payments
+ # The link_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LinkPayments))
+ }
+ attr_accessor :link_payments
+ # The mobilepay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MobilepayPayments))
+ }
+ attr_accessor :mobilepay_payments
+ # The multibanco_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MultibancoPayments))
+ }
+ attr_accessor :multibanco_payments
+ # The mx_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MxBankTransferPayments))
+ }
+ attr_accessor :mx_bank_transfer_payments
+ # The naver_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::NaverPayPayments))
+ }
+ attr_accessor :naver_pay_payments
+ # The oxxo_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::OxxoPayments))
+ }
+ attr_accessor :oxxo_payments
+ # The p24_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::P24Payments))
+ }
+ attr_accessor :p24_payments
+ # The pay_by_bank_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PayByBankPayments))
+ }
+ attr_accessor :pay_by_bank_payments
+ # The payco_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaycoPayments))
+ }
+ attr_accessor :payco_payments
+ # The paynow_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaynowPayments))
+ }
+ attr_accessor :paynow_payments
+ # The promptpay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PromptpayPayments))
+ }
+ attr_accessor :promptpay_payments
+ # The revolut_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::RevolutPayPayments))
+ }
+ attr_accessor :revolut_pay_payments
+ # The samsung_pay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SamsungPayPayments))
+ }
+ attr_accessor :samsung_pay_payments
+ # The satispay_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SatispayPayments))
+ }
+ attr_accessor :satispay_payments
+ # The sepa_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaBankTransferPayments))
+ }
+ attr_accessor :sepa_bank_transfer_payments
+ # The sepa_debit_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaDebitPayments))
+ }
+ attr_accessor :sepa_debit_payments
+ # The sofort_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SofortPayments))
+ }
+ attr_accessor :sofort_payments
+ # The swish_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SwishPayments))
+ }
+ attr_accessor :swish_payments
+ # The tax_reporting_us_1099_k capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099K))
+ }
+ attr_accessor :tax_reporting_us_1099_k
+ # The tax_reporting_us_1099_misc capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099Misc))
+ }
+ attr_accessor :tax_reporting_us_1099_misc
+ # The transfers capability.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Transfers)) }
+ attr_accessor :transfers
+ # The treasury capability.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Treasury)) }
+ attr_accessor :treasury
+ # The twint_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TwintPayments))
+ }
+ attr_accessor :twint_payments
+ # The us_bank_account_ach_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankAccountAchPayments))
+ }
+ attr_accessor :us_bank_account_ach_payments
+ # The us_bank_transfer_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankTransferPayments))
+ }
+ attr_accessor :us_bank_transfer_payments
+ # The zip_payments capability.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities::ZipPayments))
+ }
+ attr_accessor :zip_payments
+ sig {
+ params(acss_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AcssDebitPayments), affirm_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AffirmPayments), afterpay_clearpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AfterpayClearpayPayments), alma_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AlmaPayments), amazon_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AmazonPayPayments), au_becs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::AuBecsDebitPayments), bacs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BacsDebitPayments), bancontact_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BancontactPayments), bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BankTransferPayments), billie_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BilliePayments), blik_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BlikPayments), boleto_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::BoletoPayments), card_issuing: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CardPayments), cartes_bancaires_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CartesBancairesPayments), cashapp_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::CashappPayments), eps_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::EpsPayments), fpx_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::FpxPayments), gb_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GbBankTransferPayments), giropay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GiropayPayments), grabpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::GrabpayPayments), ideal_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IdealPayments), india_international_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::IndiaInternationalPayments), jcb_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JcbPayments), jp_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::JpBankTransferPayments), kakao_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KakaoPayPayments), klarna_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KlarnaPayments), konbini_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KonbiniPayments), kr_card_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::KrCardPayments), legacy_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LegacyPayments), link_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::LinkPayments), mobilepay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MobilepayPayments), multibanco_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MultibancoPayments), mx_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::MxBankTransferPayments), naver_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::NaverPayPayments), oxxo_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::OxxoPayments), p24_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::P24Payments), pay_by_bank_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PayByBankPayments), payco_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaycoPayments), paynow_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PaynowPayments), promptpay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::PromptpayPayments), revolut_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::RevolutPayPayments), samsung_pay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SamsungPayPayments), satispay_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SatispayPayments), sepa_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaBankTransferPayments), sepa_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SepaDebitPayments), sofort_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SofortPayments), swish_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::SwishPayments), tax_reporting_us_1099_k: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099K), tax_reporting_us_1099_misc: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099Misc), transfers: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Transfers), treasury: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::Treasury), twint_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::TwintPayments), us_bank_account_ach_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankAccountAchPayments), us_bank_transfer_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::UsBankTransferPayments), zip_payments: T.nilable(::Stripe::AccountService::CreateParams::Capabilities::ZipPayments)).void
+ }
+ def initialize(
+ acss_debit_payments: nil,
+ affirm_payments: nil,
+ afterpay_clearpay_payments: nil,
+ alma_payments: nil,
+ amazon_pay_payments: nil,
+ au_becs_debit_payments: nil,
+ bacs_debit_payments: nil,
+ bancontact_payments: nil,
+ bank_transfer_payments: nil,
+ billie_payments: nil,
+ blik_payments: nil,
+ boleto_payments: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ cartes_bancaires_payments: nil,
+ cashapp_payments: nil,
+ eps_payments: nil,
+ fpx_payments: nil,
+ gb_bank_transfer_payments: nil,
+ giropay_payments: nil,
+ grabpay_payments: nil,
+ ideal_payments: nil,
+ india_international_payments: nil,
+ jcb_payments: nil,
+ jp_bank_transfer_payments: nil,
+ kakao_pay_payments: nil,
+ klarna_payments: nil,
+ konbini_payments: nil,
+ kr_card_payments: nil,
+ legacy_payments: nil,
+ link_payments: nil,
+ mobilepay_payments: nil,
+ multibanco_payments: nil,
+ mx_bank_transfer_payments: nil,
+ naver_pay_payments: nil,
+ oxxo_payments: nil,
+ p24_payments: nil,
+ pay_by_bank_payments: nil,
+ payco_payments: nil,
+ paynow_payments: nil,
+ promptpay_payments: nil,
+ revolut_pay_payments: nil,
+ samsung_pay_payments: nil,
+ satispay_payments: nil,
+ sepa_bank_transfer_payments: nil,
+ sepa_debit_payments: nil,
+ sofort_payments: nil,
+ swish_payments: nil,
+ tax_reporting_us_1099_k: nil,
+ tax_reporting_us_1099_misc: nil,
+ transfers: nil,
+ treasury: nil,
+ twint_payments: nil,
+ us_bank_account_ach_payments: nil,
+ us_bank_transfer_payments: nil,
+ zip_payments: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field address_city
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Attribute for param field address_country
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Attribute for param field address_line1
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Attribute for param field address_line2
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # Attribute for param field address_state
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # Attribute for param field address_zip
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field cvc
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Attribute for param field exp_month
+ sig { returns(Integer) }
+ attr_accessor :exp_month
+ # Attribute for param field exp_year
+ sig { returns(Integer) }
+ attr_accessor :exp_year
+ # Attribute for param field name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Attribute for param field number
+ sig { returns(String) }
+ attr_accessor :number
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Attribute for param field default_for_currency
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :default_for_currency
+ sig {
+ params(object: String, address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: Integer, exp_year: Integer, name: T.nilable(String), number: String, metadata: T.nilable(T::Hash[String, String]), default_for_currency: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ object: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ number: nil,
+ metadata: nil,
+ default_for_currency: nil
+ ); end
+ end
+ class CardToken < Stripe::RequestParams
+ # Attribute for param field object
+ sig { returns(String) }
+ attr_accessor :object
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field token
+ sig { returns(String) }
+ attr_accessor :token
+ sig { params(object: String, currency: T.nilable(String), token: String).void }
+ def initialize(object: nil, currency: nil, token: nil); end
+ end
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document verifying the business.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Company::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::AccountService::CreateParams::Company::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # The company's primary address.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Company::Address)) }
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Company::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Company::AddressKanji)) }
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Company::DirectorshipDeclaration))
+ }
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Company::OwnershipDeclaration))
+ }
+ attr_accessor :ownership_declaration
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Company::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::AccountService::CreateParams::Company::Address), address_kana: T.nilable(::Stripe::AccountService::CreateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::AccountService::CreateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::AccountService::CreateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::AccountService::CreateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::AccountService::CreateParams::Company::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ ); end
+ end
+ class Controller < Stripe::RequestParams
+ class Fees < Stripe::RequestParams
+ # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payer
+ sig { params(payer: T.nilable(String)).void }
+ def initialize(payer: nil); end
+ end
+ class Losses < Stripe::RequestParams
+ # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payments
+ sig { params(payments: T.nilable(String)).void }
+ def initialize(payments: nil); end
+ end
+ class StripeDashboard < Stripe::RequestParams
+ # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig { params(type: T.nilable(String)).void }
+ def initialize(type: nil); end
+ end
+ # A hash of configuration for who pays Stripe fees for product usage on this account.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Controller::Fees)) }
+ attr_accessor :fees
+ # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Controller::Losses)) }
+ attr_accessor :losses
+ # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requirement_collection
+ # A hash of configuration for Stripe-hosted dashboards.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Controller::StripeDashboard))
+ }
+ attr_accessor :stripe_dashboard
+ sig {
+ params(fees: T.nilable(::Stripe::AccountService::CreateParams::Controller::Fees), losses: T.nilable(::Stripe::AccountService::CreateParams::Controller::Losses), requirement_collection: T.nilable(String), stripe_dashboard: T.nilable(::Stripe::AccountService::CreateParams::Controller::StripeDashboard)).void
+ }
+ def initialize(
+ fees: nil,
+ losses: nil,
+ requirement_collection: nil,
+ stripe_dashboard: nil
+ ); end
+ end
+ class Documents < Stripe::RequestParams
+ class BankAccountOwnershipVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyLicense < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMemorandumOfAssociation < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyMinisterialDecree < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyRegistrationVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class CompanyTaxIdVerification < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfRegistration < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class ProofOfUltimateBeneficialOwnership < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::BankAccountOwnershipVerification))
+ }
+ attr_accessor :bank_account_ownership_verification
+ # One or more documents that demonstrate proof of a company's license to operate.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyLicense))
+ }
+ attr_accessor :company_license
+ # One or more documents showing the company's Memorandum of Association.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMemorandumOfAssociation))
+ }
+ attr_accessor :company_memorandum_of_association
+ # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMinisterialDecree))
+ }
+ attr_accessor :company_ministerial_decree
+ # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyRegistrationVerification))
+ }
+ attr_accessor :company_registration_verification
+ # One or more documents that demonstrate proof of a company's tax ID.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification))
+ }
+ attr_accessor :company_tax_id_verification
+ # One or more documents showing the company’s proof of registration with the national business registry.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration))
+ }
+ attr_accessor :proof_of_registration
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfUltimateBeneficialOwnership))
+ }
+ attr_accessor :proof_of_ultimate_beneficial_ownership
+ sig {
+ params(bank_account_ownership_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::BankAccountOwnershipVerification), company_license: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyLicense), company_memorandum_of_association: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMemorandumOfAssociation), company_ministerial_decree: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyMinisterialDecree), company_registration_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyRegistrationVerification), company_tax_id_verification: T.nilable(::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification), proof_of_registration: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration), proof_of_ultimate_beneficial_ownership: T.nilable(::Stripe::AccountService::CreateParams::Documents::ProofOfUltimateBeneficialOwnership)).void
+ }
+ def initialize(
+ bank_account_ownership_verification: nil,
+ company_license: nil,
+ company_memorandum_of_association: nil,
+ company_ministerial_decree: nil,
+ company_registration_verification: nil,
+ company_tax_id_verification: nil,
+ proof_of_registration: nil,
+ proof_of_ultimate_beneficial_ownership: nil
+ ); end
+ end
+ class Groups < Stripe::RequestParams
+ # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :payments_pricing
+ sig { params(payments_pricing: T.nilable(T.nilable(String))).void }
+ def initialize(payments_pricing: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), title: T.nilable(String)).void
+ }
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::AccountService::CreateParams::Individual::Verification::AdditionalDocument), document: T.nilable(::Stripe::AccountService::CreateParams::Individual::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # The individual's primary address.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::Address)) }
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::AccountService::CreateParams::Individual::Dob))))
+ }
+ attr_accessor :dob
+ # The individual's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The individual's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The individual's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::RegisteredAddress))
+ }
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::AccountService::CreateParams::Individual::Address), address_kana: T.nilable(::Stripe::AccountService::CreateParams::Individual::AddressKana), address_kanji: T.nilable(::Stripe::AccountService::CreateParams::Individual::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::AccountService::CreateParams::Individual::Dob))), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::AccountService::CreateParams::Individual::RegisteredAddress), relationship: T.nilable(::Stripe::AccountService::CreateParams::Individual::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::AccountService::CreateParams::Individual::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class Settings < Stripe::RequestParams
+ class BacsDebitPayments < Stripe::RequestParams
+ # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ sig { params(display_name: T.nilable(String)).void }
+ def initialize(display_name: nil); end
+ end
+ class Branding < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :icon
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :logo
+ # A CSS hex color value representing the primary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :primary_color
+ # A CSS hex color value representing the secondary branding color for this account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :secondary_color
+ sig {
+ params(icon: T.nilable(String), logo: T.nilable(String), primary_color: T.nilable(String), secondary_color: T.nilable(String)).void
+ }
+ def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end
+ end
+ class CardIssuing < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance).
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::CardIssuing::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::AccountService::CreateParams::Settings::CardIssuing::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ class CardPayments < Stripe::RequestParams
+ class DeclineOn < Stripe::RequestParams
+ # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :avs_failure
+ # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cvc_failure
+ sig {
+ params(avs_failure: T.nilable(T::Boolean), cvc_failure: T.nilable(T::Boolean)).void
+ }
+ def initialize(avs_failure: nil, cvc_failure: nil); end
+ end
+ # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::CardPayments::DeclineOn))
+ }
+ attr_accessor :decline_on
+ # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_prefix
+ # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kana
+ # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_prefix_kanji
+ sig {
+ params(decline_on: T.nilable(::Stripe::AccountService::CreateParams::Settings::CardPayments::DeclineOn), statement_descriptor_prefix: T.nilable(String), statement_descriptor_prefix_kana: T.nilable(T.nilable(String)), statement_descriptor_prefix_kanji: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ decline_on: nil,
+ statement_descriptor_prefix: nil,
+ statement_descriptor_prefix_kana: nil,
+ statement_descriptor_prefix_kanji: nil
+ ); end
+ end
+ class Invoices < Stripe::RequestParams
+ # Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :hosted_payment_method_save
+ sig { params(hosted_payment_method_save: T.nilable(String)).void }
+ def initialize(hosted_payment_method_save: nil); end
+ end
+ class Payments < Stripe::RequestParams
+ # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kana
+ # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_kanji
+ sig {
+ params(statement_descriptor: T.nilable(String), statement_descriptor_kana: T.nilable(String), statement_descriptor_kanji: T.nilable(String)).void
+ }
+ def initialize(
+ statement_descriptor: nil,
+ statement_descriptor_kana: nil,
+ statement_descriptor_kanji: nil
+ ); end
+ end
+ class Payouts < Stripe::RequestParams
+ class Schedule < Stripe::RequestParams
+ # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :delay_days
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :monthly_anchor
+ # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :weekly_anchor
+ sig {
+ params(delay_days: T.nilable(T.any(String, Integer)), interval: T.nilable(String), monthly_anchor: T.nilable(Integer), weekly_anchor: T.nilable(String)).void
+ }
+ def initialize(
+ delay_days: nil,
+ interval: nil,
+ monthly_anchor: nil,
+ weekly_anchor: nil
+ ); end
+ end
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :debit_negative_balances
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Payouts::Schedule))
+ }
+ attr_accessor :schedule
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(debit_negative_balances: T.nilable(T::Boolean), schedule: T.nilable(::Stripe::AccountService::CreateParams::Settings::Payouts::Schedule), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ debit_negative_balances: nil,
+ schedule: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class Treasury < Stripe::RequestParams
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Treasury::TosAcceptance))
+ }
+ attr_accessor :tos_acceptance
+ sig {
+ params(tos_acceptance: T.nilable(::Stripe::AccountService::CreateParams::Settings::Treasury::TosAcceptance)).void
+ }
+ def initialize(tos_acceptance: nil); end
+ end
+ # Settings specific to Bacs Direct Debit.
+ sig {
+ returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::BacsDebitPayments))
+ }
+ attr_accessor :bacs_debit_payments
+ # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Branding)) }
+ attr_accessor :branding
+ # Settings specific to the account's use of the Card Issuing product.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::CardIssuing)) }
+ attr_accessor :card_issuing
+ # Settings specific to card charging on the account.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::CardPayments)) }
+ attr_accessor :card_payments
+ # Settings specific to the account’s use of Invoices.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Invoices)) }
+ attr_accessor :invoices
+ # Settings that apply across payment methods for charging on the account.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Payments)) }
+ attr_accessor :payments
+ # Settings specific to the account's payouts.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Payouts)) }
+ attr_accessor :payouts
+ # Settings specific to the account's Treasury FinancialAccounts.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings::Treasury)) }
+ attr_accessor :treasury
+ sig {
+ params(bacs_debit_payments: T.nilable(::Stripe::AccountService::CreateParams::Settings::BacsDebitPayments), branding: T.nilable(::Stripe::AccountService::CreateParams::Settings::Branding), card_issuing: T.nilable(::Stripe::AccountService::CreateParams::Settings::CardIssuing), card_payments: T.nilable(::Stripe::AccountService::CreateParams::Settings::CardPayments), invoices: T.nilable(::Stripe::AccountService::CreateParams::Settings::Invoices), payments: T.nilable(::Stripe::AccountService::CreateParams::Settings::Payments), payouts: T.nilable(::Stripe::AccountService::CreateParams::Settings::Payouts), treasury: T.nilable(::Stripe::AccountService::CreateParams::Settings::Treasury)).void
+ }
+ def initialize(
+ bacs_debit_payments: nil,
+ branding: nil,
+ card_issuing: nil,
+ card_payments: nil,
+ invoices: nil,
+ payments: nil,
+ payouts: nil,
+ treasury: nil
+ ); end
+ end
+ class TosAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted their service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user's service agreement type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_agreement
+ # The user agent of the browser from which the account representative accepted their service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), service_agreement: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end
+ end
+ # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_token
+ # Business information about the account.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile)) }
+ attr_accessor :business_profile
+ # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :business_type
+ # Each key of the dictionary represents a capability, and each capability
+ # maps to its settings (for example, whether it has been requested or not). Each
+ # capability is inactive until you have provided its specific
+ # requirements and Stripe has verified them. An account might have some
+ # of its requested capabilities be active and some be inactive.
+ #
+ # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type)
+ # is `none`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Capabilities)) }
+ attr_accessor :capabilities
+ # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Company)) }
+ attr_accessor :company
+ # A hash of configuration describing the account controller's attributes.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Controller)) }
+ attr_accessor :controller
+ # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_currency
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Documents)) }
+ attr_accessor :documents
+ # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.
By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig {
+ returns(T.nilable(T.any(String, ::Stripe::AccountService::CreateParams::BankAccount, ::Stripe::AccountService::CreateParams::Card, ::Stripe::AccountService::CreateParams::CardToken)))
+ }
+ attr_accessor :external_account
+ # A hash of account group type to tokens. These are account groups this account should be added to.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Groups)) }
+ attr_accessor :groups
+ # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Options for customizing how the account functions within Stripe.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Settings)) }
+ attr_accessor :settings
+ # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
+ sig { returns(T.nilable(::Stripe::AccountService::CreateParams::TosAcceptance)) }
+ attr_accessor :tos_acceptance
+ # The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(account_token: T.nilable(String), business_profile: T.nilable(::Stripe::AccountService::CreateParams::BusinessProfile), business_type: T.nilable(String), capabilities: T.nilable(::Stripe::AccountService::CreateParams::Capabilities), company: T.nilable(::Stripe::AccountService::CreateParams::Company), controller: T.nilable(::Stripe::AccountService::CreateParams::Controller), country: T.nilable(String), default_currency: T.nilable(String), documents: T.nilable(::Stripe::AccountService::CreateParams::Documents), email: T.nilable(String), expand: T.nilable(T::Array[String]), external_account: T.nilable(T.any(String, ::Stripe::AccountService::CreateParams::BankAccount, ::Stripe::AccountService::CreateParams::Card, ::Stripe::AccountService::CreateParams::CardToken)), groups: T.nilable(::Stripe::AccountService::CreateParams::Groups), individual: T.nilable(::Stripe::AccountService::CreateParams::Individual), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), settings: T.nilable(::Stripe::AccountService::CreateParams::Settings), tos_acceptance: T.nilable(::Stripe::AccountService::CreateParams::TosAcceptance), type: T.nilable(String)).void
+ }
+ def initialize(
+ account_token: nil,
+ business_profile: nil,
+ business_type: nil,
+ capabilities: nil,
+ company: nil,
+ controller: nil,
+ country: nil,
+ default_currency: nil,
+ documents: nil,
+ email: nil,
+ expand: nil,
+ external_account: nil,
+ groups: nil,
+ individual: nil,
+ metadata: nil,
+ settings: nil,
+ tos_acceptance: nil,
+ type: nil
+ ); end
+ end
+ class RejectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.
+ sig { returns(String) }
+ attr_accessor :reason
+ sig { params(expand: T.nilable(T::Array[String]), reason: String).void }
+ def initialize(expand: nil, reason: nil); end
+ end
+ # With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
+ # To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
+ #
+ # If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when
+ # creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding.
+ # You can prefill any information on the account.
+ sig {
+ params(params: T.any(::Stripe::AccountService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def create(params = {}, opts = {}); end
+
+ # With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+ #
+ # Test-mode accounts can be deleted at any time.
+ #
+ # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.
+ #
+ # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def delete(account, params = {}, opts = {}); end
+
+ # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
+ sig {
+ params(params: T.any(::Stripe::AccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
+ #
+ # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountService::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def reject(account, params = {}, opts = {}); end
+
+ # Retrieves the details of an account.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def retrieve(account, params = {}, opts = {}); end
+
+ # Retrieves the details of an account.
+ sig {
+ params(params: T.any(::Stripe::AccountService::RetrieveCurrentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def retrieve_current(params = {}, opts = {}); end
+
+ # Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
+ # left unchanged.
+ #
+ # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ # is application, which includes Custom accounts, you can update any information on the account.
+ #
+ # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ # is stripe, which includes Standard and Express accounts, you can update all information until you create
+ # an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding,
+ # after which some properties can no longer be updated.
+ #
+ # To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
+ # [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
+ sig {
+ params(account: String, params: T.any(::Stripe::AccountService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account)
+ }
+ def update(account, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/account_session_service.rbi b/rbi/stripe/services/account_session_service.rbi
new file mode 100644
index 00000000..5440de02
--- /dev/null
+++ b/rbi/stripe/services/account_session_service.rbi
@@ -0,0 +1,572 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AccountSessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class AccountManagement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class AccountOnboarding < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Balances < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :standard_payouts
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), edit_payout_schedule: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean), instant_payouts: T.nilable(T::Boolean), standard_payouts: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Balances::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Balances::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Documents < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Documents::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Documents::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class FinancialAccount < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow external accounts to be linked for money transfer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ # Whether to allow sending money.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :send_money
+ # Whether to allow transferring balance.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_balance
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean), send_money: T.nilable(T::Boolean), transfer_balance: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil,
+ send_money: nil,
+ transfer_balance: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class FinancialAccountTransactions < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card spend dispute management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_spend_dispute_management
+ sig { params(card_spend_dispute_management: T.nilable(T::Boolean)).void }
+ def initialize(card_spend_dispute_management: nil); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class IssuingCard < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cardholder_management
+ # Whether to allow spend control management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :spend_control_management
+ sig {
+ params(card_management: T.nilable(T::Boolean), card_spend_dispute_management: T.nilable(T::Boolean), cardholder_management: T.nilable(T::Boolean), spend_control_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ spend_control_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class IssuingCardsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow card management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_management
+ # Whether to allow card spend dispute management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :card_spend_dispute_management
+ # Whether to allow cardholder management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cardholder_management
+ # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow spend control management features.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :spend_control_management
+ sig {
+ params(card_management: T.nilable(T::Boolean), card_spend_dispute_management: T.nilable(T::Boolean), cardholder_management: T.nilable(T::Boolean), disable_stripe_user_authentication: T.nilable(T::Boolean), spend_control_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_management: nil,
+ card_spend_dispute_management: nil,
+ cardholder_management: nil,
+ disable_stripe_user_authentication: nil,
+ spend_control_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class NotificationBanner < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ external_account_collection: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class PaymentDetails < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_management
+ sig {
+ params(capture_payments: T.nilable(T::Boolean), destination_on_behalf_of_charge_management: T.nilable(T::Boolean), dispute_management: T.nilable(T::Boolean), refund_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Payments < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :capture_payments
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :destination_on_behalf_of_charge_management
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :dispute_management
+ # Whether to allow sending refunds. This is `true` by default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_management
+ sig {
+ params(capture_payments: T.nilable(T::Boolean), destination_on_behalf_of_charge_management: T.nilable(T::Boolean), dispute_management: T.nilable(T::Boolean), refund_management: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ capture_payments: nil,
+ destination_on_behalf_of_charge_management: nil,
+ dispute_management: nil,
+ refund_management: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payments::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payments::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class Payouts < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disable_stripe_user_authentication
+ # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :edit_payout_schedule
+ # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :external_account_collection
+ # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :instant_payouts
+ # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :standard_payouts
+ sig {
+ params(disable_stripe_user_authentication: T.nilable(T::Boolean), edit_payout_schedule: T.nilable(T::Boolean), external_account_collection: T.nilable(T::Boolean), instant_payouts: T.nilable(T::Boolean), standard_payouts: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ disable_stripe_user_authentication: nil,
+ edit_payout_schedule: nil,
+ external_account_collection: nil,
+ instant_payouts: nil,
+ standard_payouts: nil
+ ); end
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payouts::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payouts::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class PayoutsList < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class TaxRegistrations < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class TaxSettings < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+
+ end
+ # Whether the embedded component is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of features enabled in the embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ # Configuration for the account management embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement))
+ }
+ attr_accessor :account_management
+ # Configuration for the account onboarding embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding))
+ }
+ attr_accessor :account_onboarding
+ # Configuration for the balances embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Balances))
+ }
+ attr_accessor :balances
+ # Configuration for the documents embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Documents))
+ }
+ attr_accessor :documents
+ # Configuration for the financial account embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount))
+ }
+ attr_accessor :financial_account
+ # Configuration for the financial account transactions embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions))
+ }
+ attr_accessor :financial_account_transactions
+ # Configuration for the issuing card embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard))
+ }
+ attr_accessor :issuing_card
+ # Configuration for the issuing cards list embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList))
+ }
+ attr_accessor :issuing_cards_list
+ # Configuration for the notification banner embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner))
+ }
+ attr_accessor :notification_banner
+ # Configuration for the payment details embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails))
+ }
+ attr_accessor :payment_details
+ # Configuration for the payments embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payments))
+ }
+ attr_accessor :payments
+ # Configuration for the payouts embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payouts))
+ }
+ attr_accessor :payouts
+ # Configuration for the payouts list embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList))
+ }
+ attr_accessor :payouts_list
+ # Configuration for the tax registrations embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations))
+ }
+ attr_accessor :tax_registrations
+ # Configuration for the tax settings embedded component.
+ sig {
+ returns(T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings))
+ }
+ attr_accessor :tax_settings
+ sig {
+ params(account_management: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement), account_onboarding: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding), balances: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Balances), documents: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Documents), financial_account: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount), financial_account_transactions: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions), issuing_card: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard), issuing_cards_list: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList), notification_banner: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner), payment_details: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails), payments: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payments), payouts: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::Payouts), payouts_list: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList), tax_registrations: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations), tax_settings: T.nilable(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings)).void
+ }
+ def initialize(
+ account_management: nil,
+ account_onboarding: nil,
+ balances: nil,
+ documents: nil,
+ financial_account: nil,
+ financial_account_transactions: nil,
+ issuing_card: nil,
+ issuing_cards_list: nil,
+ notification_banner: nil,
+ payment_details: nil,
+ payments: nil,
+ payouts: nil,
+ payouts_list: nil,
+ tax_registrations: nil,
+ tax_settings: nil
+ ); end
+ end
+ # The identifier of the account to create an Account Session for.
+ sig { returns(String) }
+ attr_accessor :account
+ # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
+ sig { returns(::Stripe::AccountSessionService::CreateParams::Components) }
+ attr_accessor :components
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(account: String, components: ::Stripe::AccountSessionService::CreateParams::Components, expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(account: nil, components: nil, expand: nil); end
+ end
+ # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
+ sig {
+ params(params: T.any(::Stripe::AccountSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountSession)
+ }
+ def create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/apple_pay_domain_service.rbi b/rbi/stripe/services/apple_pay_domain_service.rbi
new file mode 100644
index 00000000..bbdd3a6f
--- /dev/null
+++ b/rbi/stripe/services/apple_pay_domain_service.rbi
@@ -0,0 +1,78 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ApplePayDomainService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ sig { returns(T.nilable(String)) }
+ attr_accessor :domain_name
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(domain_name: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ domain_name: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field domain_name
+ sig { returns(String) }
+ attr_accessor :domain_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(domain_name: String, expand: T.nilable(T::Array[String])).void }
+ def initialize(domain_name: nil, expand: nil); end
+ end
+ # Create an apple pay domain.
+ sig {
+ params(params: T.any(::Stripe::ApplePayDomainService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Delete an apple pay domain.
+ sig {
+ params(domain: String, params: T.any(::Stripe::ApplePayDomainService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain)
+ }
+ def delete(domain, params = {}, opts = {}); end
+
+ # List apple pay domains.
+ sig {
+ params(params: T.any(::Stripe::ApplePayDomainService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieve an apple pay domain.
+ sig {
+ params(domain: String, params: T.any(::Stripe::ApplePayDomainService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain)
+ }
+ def retrieve(domain, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/application_fee_refund_service.rbi b/rbi/stripe/services/application_fee_refund_service.rbi
new file mode 100644
index 00000000..c3e57c6e
--- /dev/null
+++ b/rbi/stripe/services/application_fee_refund_service.rbi
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ApplicationFeeRefundService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(amount: nil, expand: nil, metadata: nil); end
+ end
+ # Refunds an application fee that has previously been collected but not yet refunded.
+ # Funds will be refunded to the Stripe account from which the fee was originally collected.
+ #
+ # You can optionally refund only part of an application fee.
+ # You can do so multiple times, until the entire fee has been refunded.
+ #
+ # Once entirely refunded, an application fee can't be refunded again.
+ # This method will raise an error when called on an already-refunded application fee,
+ # or when trying to refund more money than is left on an application fee.
+ sig {
+ params(id: String, params: T.any(::Stripe::ApplicationFeeRefundService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFeeRefund)
+ }
+ def create(id, params = {}, opts = {}); end
+
+ # You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.
+ sig {
+ params(id: String, params: T.any(::Stripe::ApplicationFeeRefundService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(id, params = {}, opts = {}); end
+
+ # By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
+ sig {
+ params(fee: String, id: String, params: T.any(::Stripe::ApplicationFeeRefundService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFeeRefund)
+ }
+ def retrieve(fee, id, params = {}, opts = {}); end
+
+ # Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ #
+ # This request only accepts metadata as an argument.
+ sig {
+ params(fee: String, id: String, params: T.any(::Stripe::ApplicationFeeRefundService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFeeRefund)
+ }
+ def update(fee, id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/application_fee_service.rbi b/rbi/stripe/services/application_fee_service.rbi
new file mode 100644
index 00000000..2b46f19e
--- /dev/null
+++ b/rbi/stripe/services/application_fee_service.rbi
@@ -0,0 +1,78 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ApplicationFeeService < StripeService
+ attr_reader :refunds
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return application fees for the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return applications fees that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::ApplicationFeeService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::ApplicationFeeService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
+ sig {
+ params(params: T.any(::Stripe::ApplicationFeeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
+ sig {
+ params(id: String, params: T.any(::Stripe::ApplicationFeeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFee)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/apps/secret_service.rbi b/rbi/stripe/services/apps/secret_service.rbi
new file mode 100644
index 00000000..6b1acc68
--- /dev/null
+++ b/rbi/stripe/services/apps/secret_service.rbi
@@ -0,0 +1,151 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Apps
+ class SecretService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::SecretService::ListParams::Scope) }
+ attr_accessor :scope
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), scope: ::Stripe::Apps::SecretService::ListParams::Scope, starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ scope: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The Unix timestamp for the expiry time of the secret, after which the secret deletes.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_accessor :name
+ # The plaintext secret value to be stored.
+ sig { returns(String) }
+ attr_accessor :payload
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::SecretService::CreateParams::Scope) }
+ attr_accessor :scope
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), name: String, payload: String, scope: ::Stripe::Apps::SecretService::CreateParams::Scope).void
+ }
+ def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil); end
+ end
+ class FindParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::SecretService::FindParams::Scope) }
+ attr_accessor :scope
+ sig {
+ params(expand: T.nilable(T::Array[String]), name: String, scope: ::Stripe::Apps::SecretService::FindParams::Scope).void
+ }
+ def initialize(expand: nil, name: nil, scope: nil); end
+ end
+ class DeleteWhereParams < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ # The secret scope type.
+ sig { returns(String) }
+ attr_accessor :type
+ # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user
+ sig { params(type: String, user: T.nilable(String)).void }
+ def initialize(type: nil, user: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A name for the secret that's unique within the scope.
+ sig { returns(String) }
+ attr_accessor :name
+ # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
+ sig { returns(::Stripe::Apps::SecretService::DeleteWhereParams::Scope) }
+ attr_accessor :scope
+ sig {
+ params(expand: T.nilable(T::Array[String]), name: String, scope: ::Stripe::Apps::SecretService::DeleteWhereParams::Scope).void
+ }
+ def initialize(expand: nil, name: nil, scope: nil); end
+ end
+ # Create or replace a secret in the secret store.
+ sig {
+ params(params: T.any(::Stripe::Apps::SecretService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a secret from the secret store by name and scope.
+ sig {
+ params(params: T.any(::Stripe::Apps::SecretService::DeleteWhereParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret)
+ }
+ def delete_where(params = {}, opts = {}); end
+
+ # Finds a secret in the secret store by name and scope.
+ sig {
+ params(params: T.any(::Stripe::Apps::SecretService::FindParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret)
+ }
+ def find(params = {}, opts = {}); end
+
+ # List all secrets stored on the given scope.
+ sig {
+ params(params: T.any(::Stripe::Apps::SecretService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/apps_service.rbi b/rbi/stripe/services/apps_service.rbi
new file mode 100644
index 00000000..2bfceb80
--- /dev/null
+++ b/rbi/stripe/services/apps_service.rbi
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class AppsService < StripeService
+ attr_reader :secrets
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/balance_service.rbi b/rbi/stripe/services/balance_service.rbi
new file mode 100644
index 00000000..9021deca
--- /dev/null
+++ b/rbi/stripe/services/balance_service.rbi
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class BalanceService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieves the current account balance, based on the authentication that was used to make the request.
+ # For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
+ sig {
+ params(params: T.any(::Stripe::BalanceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Balance)
+ }
+ def retrieve(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/balance_transaction_service.rbi b/rbi/stripe/services/balance_transaction_service.rbi
new file mode 100644
index 00000000..c9133464
--- /dev/null
+++ b/rbi/stripe/services/balance_transaction_service.rbi
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class BalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return transactions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::BalanceTransactionService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return transactions in a certain currency. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payout
+ # Only returns the original transaction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(created: T.nilable(T.any(::Stripe::BalanceTransactionService::ListParams::Created, Integer)), currency: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payout: T.nilable(String), source: T.nilable(String), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payout: nil,
+ source: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
+ #
+ # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
+ sig {
+ params(params: T.any(::Stripe::BalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the balance transaction with the given ID.
+ #
+ # Note that this endpoint previously used the path /v1/balance/history/:id.
+ sig {
+ params(id: String, params: T.any(::Stripe::BalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BalanceTransaction)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/alert_service.rbi b/rbi/stripe/services/billing/alert_service.rbi
new file mode 100644
index 00000000..29bf1e67
--- /dev/null
+++ b/rbi/stripe/services/billing/alert_service.rbi
@@ -0,0 +1,152 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class AlertService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Filter results to only include this type of alert.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :alert_type
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filter results to only include alerts with the given meter.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(alert_type: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), meter: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ alert_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ meter: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class UsageThreshold < Stripe::RequestParams
+ class Filter < Stripe::RequestParams
+ # Limit the scope to this usage alert only to this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # What type of filter is being applied to this usage alert.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(customer: T.nilable(String), type: String).void }
+ def initialize(customer: nil, type: nil); end
+ end
+ # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Billing::AlertService::CreateParams::UsageThreshold::Filter]))
+ }
+ attr_accessor :filters
+ # Defines at which value the alert will fire.
+ sig { returns(Integer) }
+ attr_accessor :gte
+ # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # Whether the alert should only fire only once, or once per billing cycle.
+ sig { returns(String) }
+ attr_accessor :recurrence
+ sig {
+ params(filters: T.nilable(T::Array[::Stripe::Billing::AlertService::CreateParams::UsageThreshold::Filter]), gte: Integer, meter: T.nilable(String), recurrence: String).void
+ }
+ def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil); end
+ end
+ # The type of alert to create.
+ sig { returns(String) }
+ attr_accessor :alert_type
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The title of the alert.
+ sig { returns(String) }
+ attr_accessor :title
+ # The configuration of the usage threshold.
+ sig { returns(T.nilable(::Stripe::Billing::AlertService::CreateParams::UsageThreshold)) }
+ attr_accessor :usage_threshold
+ sig {
+ params(alert_type: String, expand: T.nilable(T::Array[String]), title: String, usage_threshold: T.nilable(::Stripe::Billing::AlertService::CreateParams::UsageThreshold)).void
+ }
+ def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Reactivates this alert, allowing it to trigger again.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::AlertService::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def activate(id, params = {}, opts = {}); end
+
+ # Archives this alert, removing it from the list view and APIs. This is non-reversible.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::AlertService::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def archive(id, params = {}, opts = {}); end
+
+ # Creates a billing alert
+ sig {
+ params(params: T.any(::Stripe::Billing::AlertService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deactivates this alert, preventing it from triggering.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::AlertService::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def deactivate(id, params = {}, opts = {}); end
+
+ # Lists billing active and inactive alerts
+ sig {
+ params(params: T.any(::Stripe::Billing::AlertService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a billing alert given an ID
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::AlertService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/credit_balance_summary_service.rbi b/rbi/stripe/services/billing/credit_balance_summary_service.rbi
new file mode 100644
index 00000000..b5f0e10c
--- /dev/null
+++ b/rbi/stripe/services/billing/credit_balance_summary_service.rbi
@@ -0,0 +1,68 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class CreditBalanceSummaryService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ class Filter < Stripe::RequestParams
+ class ApplicabilityScope < Stripe::RequestParams
+ class Price < Stripe::RequestParams
+ # The price ID this credit grant should apply to.
+ sig { returns(String) }
+ attr_accessor :id
+ sig { params(id: String).void }
+ def initialize(id: nil); end
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price_type
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter::ApplicabilityScope::Price]))
+ }
+ attr_accessor :prices
+ sig {
+ params(price_type: T.nilable(String), prices: T.nilable(T::Array[::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter::ApplicabilityScope::Price])).void
+ }
+ def initialize(price_type: nil, prices: nil); end
+ end
+ # The billing credit applicability scope for which to fetch credit balance summary.
+ sig {
+ returns(T.nilable(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter::ApplicabilityScope))
+ }
+ attr_accessor :applicability_scope
+ # The credit grant for which to fetch credit balance summary.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :credit_grant
+ # Specify the type of this filter.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(applicability_scope: T.nilable(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter::ApplicabilityScope), credit_grant: T.nilable(String), type: String).void
+ }
+ def initialize(applicability_scope: nil, credit_grant: nil, type: nil); end
+ end
+ # The customer for which to fetch credit balance summary.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The filter criteria for the credit balance summary.
+ sig { returns(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter) }
+ attr_accessor :filter
+ sig {
+ params(customer: String, expand: T.nilable(T::Array[String]), filter: ::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter).void
+ }
+ def initialize(customer: nil, expand: nil, filter: nil); end
+ end
+ # Retrieves the credit balance summary for a customer.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditBalanceSummary)
+ }
+ def retrieve(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/credit_balance_transaction_service.rbi b/rbi/stripe/services/billing/credit_balance_transaction_service.rbi
new file mode 100644
index 00000000..0e4fa133
--- /dev/null
+++ b/rbi/stripe/services/billing/credit_balance_transaction_service.rbi
@@ -0,0 +1,59 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class CreditBalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The credit grant for which to fetch credit balance transactions.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :credit_grant
+ # The customer for which to fetch credit balance transactions.
+ sig { returns(String) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(credit_grant: T.nilable(String), customer: String, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ credit_grant: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieve a list of credit balance transactions.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditBalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a credit balance transaction.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditBalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditBalanceTransaction)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/credit_grant_service.rbi b/rbi/stripe/services/billing/credit_grant_service.rbi
new file mode 100644
index 00000000..a6260730
--- /dev/null
+++ b/rbi/stripe/services/billing/credit_grant_service.rbi
@@ -0,0 +1,211 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class CreditGrantService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Only return credit grants for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ class Monetary < Stripe::RequestParams
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
+ sig { returns(String) }
+ attr_accessor :currency
+ # A positive integer representing the amount of the credit grant.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(currency: String, value: Integer).void }
+ def initialize(currency: nil, value: nil); end
+ end
+ # The monetary amount.
+ sig {
+ returns(T.nilable(::Stripe::Billing::CreditGrantService::CreateParams::Amount::Monetary))
+ }
+ attr_accessor :monetary
+ # Specify the type of this amount. We currently only support `monetary` billing credits.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(monetary: T.nilable(::Stripe::Billing::CreditGrantService::CreateParams::Amount::Monetary), type: String).void
+ }
+ def initialize(monetary: nil, type: nil); end
+ end
+ class ApplicabilityConfig < Stripe::RequestParams
+ class Scope < Stripe::RequestParams
+ class Price < Stripe::RequestParams
+ # The price ID this credit grant should apply to.
+ sig { returns(String) }
+ attr_accessor :id
+ sig { params(id: String).void }
+ def initialize(id: nil); end
+ end
+ # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price_type
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig::Scope::Price]))
+ }
+ attr_accessor :prices
+ sig {
+ params(price_type: T.nilable(String), prices: T.nilable(T::Array[::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig::Scope::Price])).void
+ }
+ def initialize(price_type: nil, prices: nil); end
+ end
+ # Specify the scope of this applicability config.
+ sig {
+ returns(::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig::Scope)
+ }
+ attr_accessor :scope
+ sig {
+ params(scope: ::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig::Scope).void
+ }
+ def initialize(scope: nil); end
+ end
+ # Amount of this credit grant.
+ sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::Amount) }
+ attr_accessor :amount
+ # Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
+ sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig) }
+ attr_accessor :applicability_config
+ # The category of this credit grant.
+ sig { returns(String) }
+ attr_accessor :category
+ # ID of the customer to receive the billing credits.
+ sig { returns(String) }
+ attr_accessor :customer
+ # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The time when the billing credits expire. If not specified, the billing credits don't expire.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A descriptive name shown in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :priority
+ sig {
+ params(amount: ::Stripe::Billing::CreditGrantService::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: T.nilable(Integer), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(String), priority: T.nilable(Integer)).void
+ }
+ def initialize(
+ amount: nil,
+ applicability_config: nil,
+ category: nil,
+ customer: nil,
+ effective_at: nil,
+ expand: nil,
+ expires_at: nil,
+ metadata: nil,
+ name: nil,
+ priority: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, Integer))), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(expand: nil, expires_at: nil, metadata: nil); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class VoidGrantParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a credit grant.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditGrantService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Expires a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def expire(id, params = {}, opts = {}); end
+
+ # Retrieve a list of credit grants.
+ sig {
+ params(params: T.any(::Stripe::Billing::CreditGrantService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Updates a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def update(id, params = {}, opts = {}); end
+
+ # Voids a credit grant.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::VoidGrantParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant)
+ }
+ def void_grant(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/meter_event_adjustment_service.rbi b/rbi/stripe/services/billing/meter_event_adjustment_service.rbi
new file mode 100644
index 00000000..b71b7f01
--- /dev/null
+++ b/rbi/stripe/services/billing/meter_event_adjustment_service.rbi
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class MeterEventAdjustmentService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Cancel < Stripe::RequestParams
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :identifier
+ sig { params(identifier: T.nilable(String)).void }
+ def initialize(identifier: nil); end
+ end
+ # Specifies which event to cancel.
+ sig {
+ returns(T.nilable(::Stripe::Billing::MeterEventAdjustmentService::CreateParams::Cancel))
+ }
+ attr_accessor :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cancel: T.nilable(::Stripe::Billing::MeterEventAdjustmentService::CreateParams::Cancel), event_name: String, expand: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(cancel: nil, event_name: nil, expand: nil, type: nil); end
+ end
+ # Creates a billing meter event adjustment.
+ sig {
+ params(params: T.any(::Stripe::Billing::MeterEventAdjustmentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEventAdjustment)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/meter_event_service.rbi b/rbi/stripe/services/billing/meter_event_service.rbi
new file mode 100644
index 00000000..800ad4ac
--- /dev/null
+++ b/rbi/stripe/services/billing/meter_event_service.rbi
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class MeterEventService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ sig { returns(T::Hash[String, String]) }
+ attr_accessor :payload
+ # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :timestamp
+ sig {
+ params(event_name: String, expand: T.nilable(T::Array[String]), identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(Integer)).void
+ }
+ def initialize(
+ event_name: nil,
+ expand: nil,
+ identifier: nil,
+ payload: nil,
+ timestamp: nil
+ ); end
+ end
+ # Creates a billing meter event.
+ sig {
+ params(params: T.any(::Stripe::Billing::MeterEventService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEvent)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/meter_event_summary_service.rbi b/rbi/stripe/services/billing/meter_event_summary_service.rbi
new file mode 100644
index 00000000..a03fe936
--- /dev/null
+++ b/rbi/stripe/services/billing/meter_event_summary_service.rbi
@@ -0,0 +1,54 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class MeterEventSummaryService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The customer for which to fetch event summaries.
+ sig { returns(String) }
+ attr_accessor :customer
+ # The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
+ sig { returns(Integer) }
+ attr_accessor :end_time
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
+ sig { returns(Integer) }
+ attr_accessor :start_time
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :value_grouping_window
+ sig {
+ params(customer: String, end_time: Integer, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), start_time: Integer, starting_after: T.nilable(String), value_grouping_window: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ end_time: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ start_time: nil,
+ starting_after: nil,
+ value_grouping_window: nil
+ ); end
+ end
+ # Retrieve a list of billing meter event summaries.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::MeterEventSummaryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing/meter_service.rbi b/rbi/stripe/services/billing/meter_service.rbi
new file mode 100644
index 00000000..bb99915a
--- /dev/null
+++ b/rbi/stripe/services/billing/meter_service.rbi
@@ -0,0 +1,163 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Billing
+ class MeterService < StripeService
+ attr_reader :event_summaries
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Filter results to only include meters with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CustomerMapping < Stripe::RequestParams
+ # The key in the meter event payload to use for mapping the event to a customer.
+ sig { returns(String) }
+ attr_accessor :event_payload_key
+ # The method for mapping a meter event to a customer. Must be `by_id`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(event_payload_key: String, type: String).void }
+ def initialize(event_payload_key: nil, type: nil); end
+ end
+ class DefaultAggregation < Stripe::RequestParams
+ # Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window.
+ sig { returns(String) }
+ attr_accessor :formula
+ sig { params(formula: String).void }
+ def initialize(formula: nil); end
+ end
+ class ValueSettings < Stripe::RequestParams
+ # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
+ sig { returns(String) }
+ attr_accessor :event_payload_key
+ sig { params(event_payload_key: String).void }
+ def initialize(event_payload_key: nil); end
+ end
+ # Fields that specify how to map a meter event to a customer.
+ sig { returns(T.nilable(::Stripe::Billing::MeterService::CreateParams::CustomerMapping)) }
+ attr_accessor :customer_mapping
+ # The default settings to aggregate a meter's events with.
+ sig { returns(::Stripe::Billing::MeterService::CreateParams::DefaultAggregation) }
+ attr_accessor :default_aggregation
+ # The meter’s name. Not visible to the customer.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # The time window to pre-aggregate meter events for, if any.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :event_time_window
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Fields that specify how to calculate a meter event's value.
+ sig { returns(T.nilable(::Stripe::Billing::MeterService::CreateParams::ValueSettings)) }
+ attr_accessor :value_settings
+ sig {
+ params(customer_mapping: T.nilable(::Stripe::Billing::MeterService::CreateParams::CustomerMapping), default_aggregation: ::Stripe::Billing::MeterService::CreateParams::DefaultAggregation, display_name: String, event_name: String, event_time_window: T.nilable(String), expand: T.nilable(T::Array[String]), value_settings: T.nilable(::Stripe::Billing::MeterService::CreateParams::ValueSettings)).void
+ }
+ def initialize(
+ customer_mapping: nil,
+ default_aggregation: nil,
+ display_name: nil,
+ event_name: nil,
+ event_time_window: nil,
+ expand: nil,
+ value_settings: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # The meter’s name. Not visible to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(display_name: T.nilable(String), expand: T.nilable(T::Array[String])).void }
+ def initialize(display_name: nil, expand: nil); end
+ end
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a billing meter.
+ sig {
+ params(params: T.any(::Stripe::Billing::MeterService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def create(params = {}, opts = {}); end
+
+ # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::MeterService::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def deactivate(id, params = {}, opts = {}); end
+
+ # Retrieve a list of billing meters.
+ sig {
+ params(params: T.any(::Stripe::Billing::MeterService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::MeterService::ReactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def reactivate(id, params = {}, opts = {}); end
+
+ # Retrieves a billing meter given an ID.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::MeterService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Updates a billing meter.
+ sig {
+ params(id: String, params: T.any(::Stripe::Billing::MeterService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter)
+ }
+ def update(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing_portal/configuration_service.rbi b/rbi/stripe/services/billing_portal/configuration_service.rbi
new file mode 100644
index 00000000..50cb8318
--- /dev/null
+++ b/rbi/stripe/services/billing_portal/configuration_service.rbi
@@ -0,0 +1,511 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module BillingPortal
+ class ConfigurationService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), is_default: T.nilable(T::Boolean), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ ending_before: nil,
+ expand: nil,
+ is_default: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terms_of_service_url
+ sig {
+ params(headline: T.nilable(T.nilable(String)), privacy_policy_url: T.nilable(String), terms_of_service_url: T.nilable(String)).void
+ }
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end
+ end
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig {
+ params(allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T::Boolean).void
+ }
+ def initialize(allowed_updates: nil, enabled: nil); end
+ end
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ sig { returns(T.nilable(T.any(String, T::Array[String]))) }
+ attr_accessor :options
+ sig {
+ params(enabled: T::Boolean, options: T.nilable(T.any(String, T::Array[String]))).void
+ }
+ def initialize(enabled: nil, options: nil); end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel::CancellationReason))
+ }
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(cancellation_reason: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel::CancellationReason), enabled: T::Boolean, mode: T.nilable(String), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ ); end
+ end
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ sig { returns(T::Array[String]) }
+ attr_accessor :prices
+ # The product id.
+ sig { returns(String) }
+ attr_accessor :product
+ sig { params(prices: T::Array[String], product: String).void }
+ def initialize(prices: nil, product: nil); end
+ end
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]))
+ }
+ attr_accessor :conditions
+ sig {
+ params(conditions: T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])).void
+ }
+ def initialize(conditions: nil); end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::Product]))))
+ }
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd))
+ }
+ attr_accessor :schedule_at_period_end
+ sig {
+ params(default_allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T::Boolean, products: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::Product]))), proration_behavior: T.nilable(String), schedule_at_period_end: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd)).void
+ }
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ ); end
+ end
+ # Information about updating the customer details in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::CustomerUpdate))
+ }
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::InvoiceHistory))
+ }
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::PaymentMethodUpdate))
+ }
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel))
+ }
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate))
+ }
+ attr_accessor :subscription_update
+ sig {
+ params(customer_update: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::CustomerUpdate), invoice_history: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::InvoiceHistory), payment_method_update: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::PaymentMethodUpdate), subscription_cancel: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel), subscription_update: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate)).void
+ }
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ ); end
+ end
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ # The business information shown to customers in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::BusinessProfile))
+ }
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ sig { returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features) }
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::LoginPage))
+ }
+ attr_accessor :login_page
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(business_profile: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::BusinessProfile), default_return_url: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), features: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features, login_page: T.nilable(::Stripe::BillingPortal::ConfigurationService::CreateParams::LoginPage), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BusinessProfile < Stripe::RequestParams
+ # The messaging shown to customers in the portal.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :headline
+ # A link to the business’s publicly available privacy policy.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :privacy_policy_url
+ # A link to the business’s publicly available terms of service.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :terms_of_service_url
+ sig {
+ params(headline: T.nilable(T.nilable(String)), privacy_policy_url: T.nilable(T.nilable(String)), terms_of_service_url: T.nilable(T.nilable(String))).void
+ }
+ def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end
+ end
+ class Features < Stripe::RequestParams
+ class CustomerUpdate < Stripe::RequestParams
+ # The types of customer updates that are supported. When empty, customers are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ sig {
+ params(allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T.nilable(T::Boolean)).void
+ }
+ def initialize(allowed_updates: nil, enabled: nil); end
+ end
+ class InvoiceHistory < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class PaymentMethodUpdate < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class SubscriptionCancel < Stripe::RequestParams
+ class CancellationReason < Stripe::RequestParams
+ # Whether the feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Which cancellation reasons will be given as options to the customer.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :options
+ sig {
+ params(enabled: T::Boolean, options: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(enabled: nil, options: nil); end
+ end
+ # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel::CancellationReason))
+ }
+ attr_accessor :cancellation_reason
+ # Whether the feature is enabled.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # Whether to cancel subscriptions immediately or at the end of the billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mode
+ # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(cancellation_reason: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel::CancellationReason), enabled: T.nilable(T::Boolean), mode: T.nilable(String), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ cancellation_reason: nil,
+ enabled: nil,
+ mode: nil,
+ proration_behavior: nil
+ ); end
+ end
+ class SubscriptionUpdate < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # The list of price IDs for the product that a subscription can be updated to.
+ sig { returns(T::Array[String]) }
+ attr_accessor :prices
+ # The product id.
+ sig { returns(String) }
+ attr_accessor :product
+ sig { params(prices: T::Array[String], product: String).void }
+ def initialize(prices: nil, product: nil); end
+ end
+ class ScheduleAtPeriodEnd < Stripe::RequestParams
+ class Condition < Stripe::RequestParams
+ # The type of condition.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ # List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]))))
+ }
+ attr_accessor :conditions
+ sig {
+ params(conditions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])))).void
+ }
+ def initialize(conditions: nil); end
+ end
+ # The types of subscription updates that are supported. When empty, subscriptions are not updateable.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_allowed_updates
+ # Whether the feature is enabled.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The list of up to 10 products that support subscription updates.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::Product]))))
+ }
+ attr_accessor :products
+ # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd))
+ }
+ attr_accessor :schedule_at_period_end
+ sig {
+ params(default_allowed_updates: T.nilable(T.nilable(T.any(String, T::Array[String]))), enabled: T.nilable(T::Boolean), products: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::Product]))), proration_behavior: T.nilable(String), schedule_at_period_end: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd)).void
+ }
+ def initialize(
+ default_allowed_updates: nil,
+ enabled: nil,
+ products: nil,
+ proration_behavior: nil,
+ schedule_at_period_end: nil
+ ); end
+ end
+ # Information about updating the customer details in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::CustomerUpdate))
+ }
+ attr_accessor :customer_update
+ # Information about showing the billing history in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::InvoiceHistory))
+ }
+ attr_accessor :invoice_history
+ # Information about updating payment methods in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::PaymentMethodUpdate))
+ }
+ attr_accessor :payment_method_update
+ # Information about canceling subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel))
+ }
+ attr_accessor :subscription_cancel
+ # Information about updating subscriptions in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate))
+ }
+ attr_accessor :subscription_update
+ sig {
+ params(customer_update: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::CustomerUpdate), invoice_history: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::InvoiceHistory), payment_method_update: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::PaymentMethodUpdate), subscription_cancel: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel), subscription_update: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate)).void
+ }
+ def initialize(
+ customer_update: nil,
+ invoice_history: nil,
+ payment_method_update: nil,
+ subscription_cancel: nil,
+ subscription_update: nil
+ ); end
+ end
+ class LoginPage < Stripe::RequestParams
+ # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
+ #
+ # Set to `false` to deactivate the `login_page.url`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ # Whether the configuration is active and can be used to create portal sessions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The business information shown to customers in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::BusinessProfile))
+ }
+ attr_accessor :business_profile
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_return_url
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about the features available in the portal.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features))
+ }
+ attr_accessor :features
+ # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::LoginPage))
+ }
+ attr_accessor :login_page
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(active: T.nilable(T::Boolean), business_profile: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::BusinessProfile), default_return_url: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), features: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features), login_page: T.nilable(::Stripe::BillingPortal::ConfigurationService::UpdateParams::LoginPage), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(
+ active: nil,
+ business_profile: nil,
+ default_return_url: nil,
+ expand: nil,
+ features: nil,
+ login_page: nil,
+ metadata: nil
+ ); end
+ end
+ # Creates a configuration that describes the functionality and behavior of a PortalSession
+ sig {
+ params(params: T.any(::Stripe::BillingPortal::ConfigurationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of configurations that describe the functionality of the customer portal.
+ sig {
+ params(params: T.any(::Stripe::BillingPortal::ConfigurationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a configuration that describes the functionality of the customer portal.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::BillingPortal::ConfigurationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration)
+ }
+ def retrieve(configuration, params = {}, opts = {}); end
+
+ # Updates a configuration that describes the functionality of the customer portal.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::BillingPortal::ConfigurationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration)
+ }
+ def update(configuration, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing_portal/session_service.rbi b/rbi/stripe/services/billing_portal/session_service.rbi
new file mode 100644
index 00000000..0a8821f3
--- /dev/null
+++ b/rbi/stripe/services/billing_portal/session_service.rbi
@@ -0,0 +1,204 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module BillingPortal
+ class SessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class FlowData < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the flow is completed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :custom_message
+ sig { params(custom_message: T.nilable(String)).void }
+ def initialize(custom_message: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # The URL the customer will be redirected to after the flow is completed.
+ sig { returns(String) }
+ attr_accessor :return_url
+ sig { params(return_url: String).void }
+ def initialize(return_url: nil); end
+ end
+ # Configuration when `after_completion.type=hosted_confirmation`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::HostedConfirmation))
+ }
+ attr_accessor :hosted_confirmation
+ # Configuration when `after_completion.type=redirect`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::Redirect))
+ }
+ attr_accessor :redirect
+ # The specified behavior after the flow is completed.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(hosted_confirmation: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::Redirect), type: String).void
+ }
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
+ end
+ class SubscriptionCancel < Stripe::RequestParams
+ class Retention < Stripe::RequestParams
+ class CouponOffer < Stripe::RequestParams
+ # The ID of the coupon to be offered.
+ sig { returns(String) }
+ attr_accessor :coupon
+ sig { params(coupon: String).void }
+ def initialize(coupon: nil); end
+ end
+ # Configuration when `retention.type=coupon_offer`.
+ sig {
+ returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer)
+ }
+ attr_accessor :coupon_offer
+ # Type of retention strategy to use with the customer.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(coupon_offer: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer, type: String).void
+ }
+ def initialize(coupon_offer: nil, type: nil); end
+ end
+ # Specify a retention strategy to be used in the cancellation flow.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention))
+ }
+ attr_accessor :retention
+ # The ID of the subscription to be canceled.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig {
+ params(retention: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention), subscription: String).void
+ }
+ def initialize(retention: nil, subscription: nil); end
+ end
+ class SubscriptionUpdate < Stripe::RequestParams
+ # The ID of the subscription to be updated.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig { params(subscription: String).void }
+ def initialize(subscription: nil); end
+ end
+ class SubscriptionUpdateConfirm < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this subscription update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this subscription update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig { params(coupon: T.nilable(String), promotion_code: T.nilable(String)).void }
+ def initialize(coupon: nil, promotion_code: nil); end
+ end
+ class Item < Stripe::RequestParams
+ # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
+ sig { returns(String) }
+ attr_accessor :id
+ # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ sig {
+ params(id: String, price: T.nilable(String), quantity: T.nilable(Integer)).void
+ }
+ def initialize(id: nil, price: nil, quantity: nil); end
+ end
+ # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount]))
+ }
+ attr_accessor :discounts
+ # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
+ sig {
+ returns(T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Item])
+ }
+ attr_accessor :items
+ # The ID of the subscription to be updated.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount]), items: T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Item], subscription: String).void
+ }
+ def initialize(discounts: nil, items: nil, subscription: nil); end
+ end
+ # Behavior after the flow is completed.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion))
+ }
+ attr_accessor :after_completion
+ # Configuration when `flow_data.type=subscription_cancel`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel))
+ }
+ attr_accessor :subscription_cancel
+ # Configuration when `flow_data.type=subscription_update`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdate))
+ }
+ attr_accessor :subscription_update
+ # Configuration when `flow_data.type=subscription_update_confirm`.
+ sig {
+ returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm))
+ }
+ attr_accessor :subscription_update_confirm
+ # Type of flow that the customer will go through.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(after_completion: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion), subscription_cancel: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel), subscription_update: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdate), subscription_update_confirm: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm), type: String).void
+ }
+ def initialize(
+ after_completion: nil,
+ subscription_cancel: nil,
+ subscription_update: nil,
+ subscription_update_confirm: nil,
+ type: nil
+ ); end
+ end
+ # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :configuration
+ # The ID of an existing customer.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
+ sig { returns(T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData)) }
+ attr_accessor :flow_data
+ # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :locale
+ # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # The default URL to redirect customers to when they click on the portal's link to return to your website.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(configuration: T.nilable(String), customer: String, expand: T.nilable(T::Array[String]), flow_data: T.nilable(::Stripe::BillingPortal::SessionService::CreateParams::FlowData), locale: T.nilable(String), on_behalf_of: T.nilable(String), return_url: T.nilable(String)).void
+ }
+ def initialize(
+ configuration: nil,
+ customer: nil,
+ expand: nil,
+ flow_data: nil,
+ locale: nil,
+ on_behalf_of: nil,
+ return_url: nil
+ ); end
+ end
+ # Creates a session of the customer portal.
+ sig {
+ params(params: T.any(::Stripe::BillingPortal::SessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Session)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing_portal_service.rbi b/rbi/stripe/services/billing_portal_service.rbi
new file mode 100644
index 00000000..2517d4b4
--- /dev/null
+++ b/rbi/stripe/services/billing_portal_service.rbi
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class BillingPortalService < StripeService
+ attr_reader :configurations
+ attr_reader :sessions
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/billing_service.rbi b/rbi/stripe/services/billing_service.rbi
new file mode 100644
index 00000000..69563c49
--- /dev/null
+++ b/rbi/stripe/services/billing_service.rbi
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class BillingService < StripeService
+ attr_reader :alerts
+ attr_reader :credit_balance_summary
+ attr_reader :credit_balance_transactions
+ attr_reader :credit_grants
+ attr_reader :meters
+ attr_reader :meter_events
+ attr_reader :meter_event_adjustments
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/charge_service.rbi b/rbi/stripe/services/charge_service.rbi
new file mode 100644
index 00000000..11a254c8
--- /dev/null
+++ b/rbi/stripe/services/charge_service.rbi
@@ -0,0 +1,448 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ChargeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return charges that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::ChargeService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return charges for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return charges for this transfer group, limited to 100.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(created: T.nilable(T.any(::Stripe::ChargeService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil,
+ transfer_group: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Destination < Stripe::RequestParams
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :account
+ # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(account: String, amount: T.nilable(Integer)).void }
+ def initialize(account: nil, amount: nil); end
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::ChargeService::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::ChargeService::CreateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Attribute for param field application_fee
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee
+ # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :capture
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The ID of an existing customer that will be charged in this request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field destination
+ sig { returns(T.nilable(::Stripe::ChargeService::CreateParams::Destination)) }
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig { returns(T.nilable(::Stripe::ChargeService::CreateParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ sig { returns(T.nilable(::Stripe::ChargeService::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ sig { returns(T.nilable(::Stripe::ChargeService::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), application_fee: T.nilable(Integer), application_fee_amount: T.nilable(Integer), capture: T.nilable(T::Boolean), currency: T.nilable(String), customer: T.nilable(String), description: T.nilable(String), destination: T.nilable(::Stripe::ChargeService::CreateParams::Destination), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), on_behalf_of: T.nilable(String), radar_options: T.nilable(::Stripe::ChargeService::CreateParams::RadarOptions), receipt_email: T.nilable(String), shipping: T.nilable(::Stripe::ChargeService::CreateParams::Shipping), source: T.nilable(String), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::ChargeService::CreateParams::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ capture: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ shipping: nil,
+ source: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class FraudDetails < Stripe::RequestParams
+ # Either `safe` or `fraudulent`.
+ sig { returns(T.nilable(T.any(String, String))) }
+ attr_accessor :user_report
+ sig { params(user_report: T.nilable(T.any(String, String))).void }
+ def initialize(user_report: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::ChargeService::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::ChargeService::UpdateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
+ sig { returns(T.nilable(::Stripe::ChargeService::UpdateParams::FraudDetails)) }
+ attr_accessor :fraud_details
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ sig { returns(T.nilable(::Stripe::ChargeService::UpdateParams::Shipping)) }
+ attr_accessor :shipping
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), fraud_details: T.nilable(::Stripe::ChargeService::UpdateParams::FraudDetails), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), receipt_email: T.nilable(String), shipping: T.nilable(::Stripe::ChargeService::UpdateParams::Shipping), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ description: nil,
+ expand: nil,
+ fraud_details: nil,
+ metadata: nil,
+ receipt_email: nil,
+ shipping: nil,
+ transfer_group: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # The amount to capture, which must be less than or equal to the original amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An application fee to add on to this charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee
+ # An application fee amount to add on to this charge, which must be less than or equal to the original amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. 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).
+ #
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
+ sig { returns(T.nilable(::Stripe::ChargeService::CaptureParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), application_fee: T.nilable(Integer), application_fee_amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), receipt_email: T.nilable(String), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::ChargeService::CaptureParams::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ receipt_email: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
+ #
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
+ #
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
+ sig {
+ params(charge: String, params: T.any(::Stripe::ChargeService::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def capture(charge, params = {}, opts = {}); end
+
+ # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
+ # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
+ # object used to request payment.
+ sig {
+ params(params: T.any(::Stripe::ChargeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
+ sig {
+ params(params: T.any(::Stripe::ChargeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.
+ sig {
+ params(charge: String, params: T.any(::Stripe::ChargeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def retrieve(charge, params = {}, opts = {}); end
+
+ # Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::ChargeService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(charge: String, params: T.any(::Stripe::ChargeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
+ }
+ def update(charge, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/checkout/session_line_item_service.rbi b/rbi/stripe/services/checkout/session_line_item_service.rbi
new file mode 100644
index 00000000..420e1442
--- /dev/null
+++ b/rbi/stripe/services/checkout/session_line_item_service.rbi
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Checkout
+ class SessionLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # When retrieving a Checkout Session, 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.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::SessionLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(session, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/checkout/session_service.rbi b/rbi/stripe/services/checkout/session_service.rbi
new file mode 100644
index 00000000..bdd08db4
--- /dev/null
+++ b/rbi/stripe/services/checkout/session_service.rbi
@@ -0,0 +1,2585 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Checkout
+ class SessionService < StripeService
+ attr_reader :line_items
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CustomerDetails < Stripe::RequestParams
+ # Customer's email address.
+ sig { returns(String) }
+ attr_accessor :email
+ sig { params(email: String).void }
+ def initialize(email: nil); end
+ end
+ # Only return Checkout Sessions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Checkout::SessionService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return the Checkout Sessions for the Customer specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Only return the Checkout Sessions for the Customer details specified.
+ sig { returns(T.nilable(::Stripe::Checkout::SessionService::ListParams::CustomerDetails)) }
+ attr_accessor :customer_details
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return the Checkout Session for the PaymentIntent specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # Only return the Checkout Sessions for the Payment Link specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_link
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return the Checkout Sessions matching the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return the Checkout Session for the subscription specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Checkout::SessionService::ListParams::Created, Integer)), customer: T.nilable(String), customer_details: T.nilable(::Stripe::Checkout::SessionService::ListParams::CustomerDetails), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), payment_link: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), subscription: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ customer_details: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ payment_link: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AdaptivePricing < Stripe::RequestParams
+ # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ sig { params(enabled: T.nilable(T::Boolean)).void }
+ def initialize(enabled: nil); end
+ end
+ class AfterExpiration < Stripe::RequestParams
+ class Recovery < Stripe::RequestParams
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # If `true`, a recovery URL will be generated to recover this Checkout Session if it
+ # expires before a successful transaction is completed. It will be attached to the
+ # Checkout Session object upon expiration.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(allow_promotion_codes: T.nilable(T::Boolean), enabled: T::Boolean).void }
+ def initialize(allow_promotion_codes: nil, enabled: nil); end
+ end
+ # Configure a Checkout Session that can be used to recover an expired session.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::AfterExpiration::Recovery))
+ }
+ attr_accessor :recovery
+ sig {
+ params(recovery: T.nilable(::Stripe::Checkout::SessionService::CreateParams::AfterExpiration::Recovery)).void
+ }
+ def initialize(recovery: nil); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::Checkout::SessionService::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ sig { returns(String) }
+ attr_accessor :position
+ sig { params(position: String).void }
+ def initialize(position: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement))
+ }
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terms_of_service
+ sig {
+ params(payment_method_reuse_agreement: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement), promotions: T.nilable(String), terms_of_service: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_reuse_agreement: nil,
+ promotions: nil,
+ terms_of_service: nil
+ ); end
+ end
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_accessor :label
+ # 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.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(label: String, value: String).void }
+ def initialize(label: nil, value: nil); end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig {
+ returns(T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown::Option])
+ }
+ attr_accessor :options
+ sig {
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown::Option]).void
+ }
+ def initialize(default_value: nil, options: nil); end
+ end
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(String) }
+ attr_accessor :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(custom: String, type: String).void }
+ def initialize(custom: nil, type: nil); end
+ end
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ # Configuration for `type=dropdown` fields.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown))
+ }
+ attr_accessor :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomField::Label) }
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomField::Numeric))
+ }
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomField::Text))
+ }
+ attr_accessor :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(dropdown: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown), key: String, label: ::Stripe::Checkout::SessionService::CreateParams::CustomField::Label, numeric: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomField::Numeric), optional: T.nilable(T::Boolean), text: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomField::Text), type: String).void
+ }
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ ); end
+ end
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::AfterSubmit))))
+ }
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::ShippingAddress))))
+ }
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::Submit))))
+ }
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::TermsOfServiceAcceptance))))
+ }
+ attr_accessor :terms_of_service_acceptance
+ sig {
+ params(after_submit: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::AfterSubmit))), shipping_address: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::ShippingAddress))), submit: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::Submit))), terms_of_service_acceptance: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::CustomText::TermsOfServiceAcceptance)))).void
+ }
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ ); end
+ end
+ class CustomerUpdate < Stripe::RequestParams
+ # Describes whether Checkout saves the billing address onto `customer.address`.
+ # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address
+ # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Describes whether Checkout saves shipping information onto `customer.shipping`.
+ # To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping
+ sig {
+ params(address: T.nilable(String), name: T.nilable(String), shipping: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, shipping: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # The ID of the coupon to apply to this Session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # The ID of a promotion code to apply to this Session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig { params(coupon: T.nilable(String), promotion_code: T.nilable(String)).void }
+ def initialize(coupon: nil, promotion_code: nil); end
+ end
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ sig { params(amount_tax_display: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(amount_tax_display: nil); end
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::Issuer))
+ }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ 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::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::CustomField]))), description: T.nilable(String), footer: T.nilable(String), issuer: T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::Issuer), metadata: T.nilable(T::Hash[String, String]), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)))).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ ); end
+ end
+ # Set to `true` to enable invoice creation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Parameters passed when creating invoices for payment-mode Checkout Sessions.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData))
+ }
+ attr_accessor :invoice_data
+ sig {
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData)).void
+ }
+ def initialize(enabled: nil, invoice_data: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::Recurring))
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :dynamic_tax_rates
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData))
+ }
+ attr_accessor :price_data
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :tax_rates
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::AdjustableQuantity), dynamic_tax_rates: T.nilable(T::Array[String]), price: T.nilable(String), price_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ adjustable_quantity: nil,
+ dynamic_tax_rates: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::OptionalItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ sig { returns(String) }
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::Checkout::SessionService::CreateParams::OptionalItem::AdjustableQuantity), price: String, quantity: Integer).void
+ }
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
+ end
+ class PaymentIntentData < Stripe::RequestParams
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig {
+ returns(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping::Address)
+ }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ carrier: nil,
+ name: nil,
+ phone: nil,
+ tracking_number: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Stripe account ID for which these funds are intended. For details,
+ # see the PaymentIntents [use case for connected
+ # accounts](/docs/payments/connected-accounts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the
+ # customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,
+ # Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this payment.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping))
+ }
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # The parameters used to automatically create a Transfer when the payment succeeds.
+ # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::TransferData))
+ }
+ attr_accessor :transfer_data
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(application_fee_amount: T.nilable(Integer), capture_method: T.nilable(String), description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), receipt_email: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ application_fee_amount: nil,
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ sig { params(allow_redisplay: T.nilable(String)).void }
+ def initialize(allow_redisplay: nil); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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). This is only accepted for Checkout Sessions in `setup` mode.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(String), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(String), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(String), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ # Setting to true enables installments for this Checkout Session.
+ # Setting to false will prevent any installment plan from applying to a payment.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ sig { params(enabled: T.nilable(T::Boolean)).void }
+ def initialize(enabled: nil); end
+ end
+ class Restrictions < Stripe::RequestParams
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :brands_blocked
+ sig { params(brands_blocked: T.nilable(T::Array[String])).void }
+ def initialize(brands_blocked: nil); end
+ end
+ # Installment options for card payments
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # Restrictions to apply to the card payment method. For example, you can block specific card brands.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card::Restrictions))
+ }
+ attr_accessor :restrictions
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ sig {
+ params(installments: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card::Installments), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), restrictions: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card::Restrictions), setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String)).void
+ }
+ def initialize(
+ installments: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ restrictions: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(String)).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ sig { params(expires_after_seconds: T.nilable(Integer)).void }
+ def initialize(expires_after_seconds: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(String)).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(String), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig { params(reference: T.nilable(String)).void }
+ def initialize(reference: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), setup_future_usage: T.nilable(String), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(String) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: String, setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ # contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Affirm))
+ }
+ attr_accessor :affirm
+ # contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Alipay))
+ }
+ attr_accessor :alipay
+ # contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # contains details about the AU Becs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Bancontact))
+ }
+ attr_accessor :bancontact
+ # contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Boleto))
+ }
+ attr_accessor :boleto
+ # contains details about the Card payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card))
+ }
+ attr_accessor :card
+ # contains details about the Cashapp Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Cashapp))
+ }
+ attr_accessor :cashapp
+ # contains details about the Customer Balance payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Eps))
+ }
+ attr_accessor :eps
+ # contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Fpx))
+ }
+ attr_accessor :fpx
+ # contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Giropay))
+ }
+ attr_accessor :giropay
+ # contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Grabpay))
+ }
+ attr_accessor :grabpay
+ # contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Ideal))
+ }
+ attr_accessor :ideal
+ # contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna))
+ }
+ attr_accessor :klarna
+ # contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Konbini))
+ }
+ attr_accessor :konbini
+ # contains details about the Korean card payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KrCard))
+ }
+ attr_accessor :kr_card
+ # contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Link))
+ }
+ attr_accessor :link
+ # contains details about the Mobilepay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Multibanco))
+ }
+ attr_accessor :multibanco
+ # contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Oxxo))
+ }
+ attr_accessor :oxxo
+ # contains details about the P24 payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::P24))
+ }
+ attr_accessor :p24
+ # contains details about the Pay By Bank payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payco))
+ }
+ attr_accessor :payco
+ # contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paynow))
+ }
+ attr_accessor :paynow
+ # contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Pix))
+ }
+ attr_accessor :pix
+ # contains details about the RevolutPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # contains details about the Sepa Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # contains details about the Sofort payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Sofort))
+ }
+ attr_accessor :sofort
+ # contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Swish))
+ }
+ attr_accessor :swish
+ # contains details about the Us Bank Account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ sig {
+ params(acss_debit: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Alipay), amazon_pay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Bancontact), boleto: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card), cashapp: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Giropay), grabpay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Grabpay), ideal: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Ideal), kakao_pay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Link), mobilepay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::P24), pay_by_bank: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::PayByBank), payco: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paypal), pix: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Pix), revolut_pay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit), sofort: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Swish), us_bank_account: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::WechatPay)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ us_bank_account: nil,
+ wechat_pay: nil
+ ); end
+ end
+ class Permissions < Stripe::RequestParams
+ # Determines which entity is allowed to update the shipping details.
+ #
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ #
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :update_shipping_details
+ sig { params(update_shipping_details: T.nilable(String)).void }
+ def initialize(update_shipping_details: nil); end
+ end
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ #
+ # Can only be set in `payment` and `subscription` mode.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class SavedPaymentMethodOptions < Stripe::RequestParams
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allow_redisplay_filters
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_save
+ sig {
+ params(allow_redisplay_filters: T.nilable(T::Array[String]), payment_method_save: T.nilable(String)).void
+ }
+ def initialize(allow_redisplay_filters: nil, payment_method_save: nil); end
+ end
+ class SetupIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Stripe account for which the setup is intended.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ sig {
+ params(description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String)).void
+ }
+ def initialize(description: nil, metadata: nil, on_behalf_of: nil); end
+ end
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ sig { returns(T::Array[String]) }
+ attr_accessor :allowed_countries
+ sig { params(allowed_countries: T::Array[String]).void }
+ def initialize(allowed_countries: nil); end
+ end
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData))
+ }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(issuer: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings::Issuer)).void
+ }
+ def initialize(issuer: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig {
+ returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings::EndBehavior)
+ }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # 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. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :billing_cycle_anchor
+ # The tax rates that will apply to any subscription item that does not have
+ # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
+ # from the subscription.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_tax_rates
+ # 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 the [customer portal](https://stripe.com/docs/customer-management).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData))
+ }
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer
+ # will get before being charged for the first time. Has to be at least
+ # 48 hours in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_end
+ # Integer representing the number of trial period days before the
+ # customer is charged for the first time. Has to be at least 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings))
+ }
+ attr_accessor :trial_settings
+ sig {
+ params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void
+ }
+ def initialize(
+ application_fee_percent: nil,
+ billing_cycle_anchor: nil,
+ default_tax_rates: nil,
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :required
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
+ def initialize(enabled: nil, required: nil); end
+ end
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::AdaptivePricing))
+ }
+ attr_accessor :adaptive_pricing
+ # Configure actions after a Checkout Session has expired.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::AfterExpiration))
+ }
+ attr_accessor :after_expiration
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
+ sig { returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address_collection
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancel_url
+ # A unique string to reference the Checkout Session. This can be a
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
+ # session with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Configure fields for the Checkout Session to gather active consent from customers.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ConsentCollection))
+ }
+ attr_accessor :consent_collection
+ # 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). Required in `setup` mode when `payment_method_types` is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField]))
+ }
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ sig { returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText)) }
+ attr_accessor :custom_text
+ # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card
+ # payment method will be used to prefill the email, name, card details, and billing address
+ # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
+ # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
+ #
+ # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
+ # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
+ #
+ # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.
+ #
+ # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
+ #
+ # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
+ # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
+ #
+ # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
+ # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
+ #
+ # Can only be set in `payment` and `setup` mode.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_creation
+ # If provided, this value will be used when the Customer object is created.
+ # If not provided, customers will be asked to enter their email address.
+ # Use this parameter to prefill customer data if you already have an email
+ # on file. To access information about the customer once a session is
+ # complete, use the `customer` field.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_email
+ # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
+ sig { returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomerUpdate)) }
+ attr_accessor :customer_update
+ # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::Discount]))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Generate a post-purchase Invoice for one-time payments.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation))
+ }
+ attr_accessor :invoice_creation
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+ #
+ # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::LineItem]))
+ }
+ attr_accessor :line_items
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :locale
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mode
+ # 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).
+ #
+ # There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
+ #
+ # For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
+ #
+ # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::OptionalItem]))
+ }
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData))
+ }
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_collection
+ # The ID of the payment method configuration to use with this Checkout session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # This parameter allows you to set some attributes on the payment method created during a Checkout session.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodData))
+ }
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
+ #
+ # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
+ #
+ # Read more about the supported payment methods and their requirements in our [payment
+ # method details guide](/docs/payments/checkout/payment-methods).
+ #
+ # If multiple payment methods are passed, Checkout will dynamically reorder them to
+ # prioritize the most relevant payment methods based on the customer's location and
+ # other characteristics.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ #
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
+ sig { returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::Permissions)) }
+ attr_accessor :permissions
+ # Controls phone number collection settings for the session.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts
+ # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::PhoneNumberCollection))
+ }
+ attr_accessor :phone_number_collection
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :redirect_on_completion
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
+ # and redirect-based payment methods are enabled on the session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SavedPaymentMethodOptions))
+ }
+ attr_accessor :saved_payment_method_options
+ # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SetupIntentData))
+ }
+ attr_accessor :setup_intent_data
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingAddressCollection))
+ }
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::ShippingOption]))
+ }
+ attr_accessor :shipping_options
+ # Describes the type of transaction being performed by Checkout in order
+ # to customize relevant text on the page, such as the submit button.
+ # `submit_type` can only be specified on Checkout Sessions in
+ # `payment` or `subscription` mode. If blank or `auto`, `pay` is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :submit_type
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData))
+ }
+ attr_accessor :subscription_data
+ # The URL to which Stripe should send customers when payment or setup
+ # is complete.
+ # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
+ # information from the successful Checkout Session on your page, read the
+ # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :success_url
+ # Controls tax ID collection during checkout.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::TaxIdCollection))
+ }
+ attr_accessor :tax_id_collection
+ # The UI mode of the Session. Defaults to `hosted`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ui_mode
+ sig {
+ params(adaptive_pricing: T.nilable(::Stripe::Checkout::SessionService::CreateParams::AdaptivePricing), after_expiration: T.nilable(::Stripe::Checkout::SessionService::CreateParams::AfterExpiration), allow_promotion_codes: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::Checkout::SessionService::CreateParams::AutomaticTax), billing_address_collection: T.nilable(String), cancel_url: T.nilable(String), client_reference_id: T.nilable(String), consent_collection: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ConsentCollection), currency: T.nilable(String), custom_fields: T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField]), custom_text: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText), customer: T.nilable(String), customer_creation: T.nilable(String), customer_email: T.nilable(String), customer_update: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomerUpdate), discounts: T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::Discount]), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), invoice_creation: T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation), line_items: T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::LineItem]), locale: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), mode: T.nilable(String), optional_items: T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::OptionalItem]), payment_intent_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData), payment_method_collection: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), permissions: T.nilable(::Stripe::Checkout::SessionService::CreateParams::Permissions), phone_number_collection: T.nilable(::Stripe::Checkout::SessionService::CreateParams::PhoneNumberCollection), redirect_on_completion: T.nilable(String), return_url: T.nilable(String), saved_payment_method_options: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SavedPaymentMethodOptions), setup_intent_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SetupIntentData), shipping_address_collection: T.nilable(::Stripe::Checkout::SessionService::CreateParams::ShippingAddressCollection), shipping_options: T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::ShippingOption]), submit_type: T.nilable(String), subscription_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData), success_url: T.nilable(String), tax_id_collection: T.nilable(::Stripe::Checkout::SessionService::CreateParams::TaxIdCollection), ui_mode: T.nilable(String)).void
+ }
+ def initialize(
+ adaptive_pricing: nil,
+ after_expiration: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ cancel_url: nil,
+ client_reference_id: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer: nil,
+ customer_creation: nil,
+ customer_email: nil,
+ customer_update: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ locale: nil,
+ metadata: nil,
+ mode: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ permissions: nil,
+ phone_number_collection: nil,
+ redirect_on_completion: nil,
+ return_url: nil,
+ saved_payment_method_options: nil,
+ setup_intent_data: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ success_url: nil,
+ tax_id_collection: nil,
+ ui_mode: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CollectedInformation < Stripe::RequestParams
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: String, line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The address of the customer
+ sig {
+ returns(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails::Address)
+ }
+ attr_accessor :address
+ # The name of customer
+ sig { returns(String) }
+ attr_accessor :name
+ sig {
+ params(address: ::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails::Address, name: String).void
+ }
+ def initialize(address: nil, name: nil); end
+ end
+ # The shipping details to apply to this Session.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails))
+ }
+ attr_accessor :shipping_details
+ sig {
+ params(shipping_details: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails)).void
+ }
+ def initialize(shipping_details: nil); end
+ end
+ class ShippingOption < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData))
+ }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ # Information about the customer collected within the Checkout Session.
+ sig {
+ returns(T.nilable(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation))
+ }
+ attr_accessor :collected_information
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::UpdateParams::ShippingOption]))))
+ }
+ attr_accessor :shipping_options
+ sig {
+ params(collected_information: T.nilable(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), shipping_options: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::UpdateParams::ShippingOption])))).void
+ }
+ def initialize(
+ collected_information: nil,
+ expand: nil,
+ metadata: nil,
+ shipping_options: nil
+ ); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a Checkout Session object.
+ sig {
+ params(params: T.any(::Stripe::Checkout::SessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def create(params = {}, opts = {}); end
+
+ # A Checkout Session can be expired when it is in one of these statuses: open
+ #
+ # After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::SessionService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def expire(session, params = {}, opts = {}); end
+
+ # Returns a list of Checkout Sessions.
+ sig {
+ params(params: T.any(::Stripe::Checkout::SessionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a Checkout Session object.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::SessionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def retrieve(session, params = {}, opts = {}); end
+
+ # Updates a Checkout Session object.
+ sig {
+ params(session: String, params: T.any(::Stripe::Checkout::SessionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
+ }
+ def update(session, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/checkout_service.rbi b/rbi/stripe/services/checkout_service.rbi
new file mode 100644
index 00000000..ad2207a8
--- /dev/null
+++ b/rbi/stripe/services/checkout_service.rbi
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CheckoutService < StripeService
+ attr_reader :sessions
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/climate/order_service.rbi b/rbi/stripe/services/climate/order_service.rbi
new file mode 100644
index 00000000..42f88360
--- /dev/null
+++ b/rbi/stripe/services/climate/order_service.rbi
@@ -0,0 +1,142 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Climate
+ class OrderService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ sig { returns(String) }
+ attr_accessor :public_name
+ sig { params(public_name: String).void }
+ def initialize(public_name: nil); end
+ end
+ # Requested amount of carbon removal units. Either this or `metric_tons` must be specified.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ sig { returns(T.nilable(::Stripe::Climate::OrderService::CreateParams::Beneficiary)) }
+ attr_accessor :beneficiary
+ # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Requested number of tons for the order. Either this or `amount` must be specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :metric_tons
+ # Unique identifier of the Climate product.
+ sig { returns(String) }
+ attr_accessor :product
+ sig {
+ params(amount: T.nilable(Integer), beneficiary: T.nilable(::Stripe::Climate::OrderService::CreateParams::Beneficiary), currency: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), metric_tons: T.nilable(String), product: String).void
+ }
+ def initialize(
+ amount: nil,
+ beneficiary: nil,
+ currency: nil,
+ expand: nil,
+ metadata: nil,
+ metric_tons: nil,
+ product: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Beneficiary < Stripe::RequestParams
+ # Publicly displayable name for the end beneficiary of carbon removal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :public_name
+ sig { params(public_name: T.nilable(String)).void }
+ def initialize(public_name: nil); end
+ end
+ # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Climate::OrderService::UpdateParams::Beneficiary))))
+ }
+ attr_accessor :beneficiary
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(beneficiary: T.nilable(T.nilable(T.any(String, ::Stripe::Climate::OrderService::UpdateParams::Beneficiary))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(beneficiary: nil, expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
+ # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
+ # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
+ # provides 90 days advance notice and refunds the amount_total.
+ sig {
+ params(order: String, params: T.any(::Stripe::Climate::OrderService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def cancel(order, params = {}, opts = {}); end
+
+ # Creates a Climate order object for a given Climate product. The order will be processed immediately
+ # after creation and payment will be deducted your Stripe balance.
+ sig {
+ params(params: T.any(::Stripe::Climate::OrderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Lists all Climate order objects. The orders are returned sorted by creation date, with the
+ # most recently created orders appearing first.
+ sig {
+ params(params: T.any(::Stripe::Climate::OrderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a Climate order object with the given ID.
+ sig {
+ params(order: String, params: T.any(::Stripe::Climate::OrderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def retrieve(order, params = {}, opts = {}); end
+
+ # Updates the specified order by setting the values of the parameters passed.
+ sig {
+ params(order: String, params: T.any(::Stripe::Climate::OrderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order)
+ }
+ def update(order, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/climate/product_service.rbi b/rbi/stripe/services/climate/product_service.rbi
new file mode 100644
index 00000000..4d6144b5
--- /dev/null
+++ b/rbi/stripe/services/climate/product_service.rbi
@@ -0,0 +1,46 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Climate
+ class ProductService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Lists all available Climate product objects.
+ sig {
+ params(params: T.any(::Stripe::Climate::ProductService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a Climate product with the given ID.
+ sig {
+ params(product: String, params: T.any(::Stripe::Climate::ProductService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Product)
+ }
+ def retrieve(product, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/climate/supplier_service.rbi b/rbi/stripe/services/climate/supplier_service.rbi
new file mode 100644
index 00000000..15121400
--- /dev/null
+++ b/rbi/stripe/services/climate/supplier_service.rbi
@@ -0,0 +1,46 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Climate
+ class SupplierService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Lists all available Climate supplier objects.
+ sig {
+ params(params: T.any(::Stripe::Climate::SupplierService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a Climate supplier object.
+ sig {
+ params(supplier: String, params: T.any(::Stripe::Climate::SupplierService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Supplier)
+ }
+ def retrieve(supplier, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/climate_service.rbi b/rbi/stripe/services/climate_service.rbi
new file mode 100644
index 00000000..efac4d98
--- /dev/null
+++ b/rbi/stripe/services/climate_service.rbi
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ClimateService < StripeService
+ attr_reader :orders
+ attr_reader :products
+ attr_reader :suppliers
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/confirmation_token_service.rbi b/rbi/stripe/services/confirmation_token_service.rbi
new file mode 100644
index 00000000..ee11757c
--- /dev/null
+++ b/rbi/stripe/services/confirmation_token_service.rbi
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ConfirmationTokenService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieves an existing ConfirmationToken object
+ sig {
+ params(confirmation_token: String, params: T.any(::Stripe::ConfirmationTokenService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ConfirmationToken)
+ }
+ def retrieve(confirmation_token, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/country_spec_service.rbi b/rbi/stripe/services/country_spec_service.rbi
new file mode 100644
index 00000000..ceee95c8
--- /dev/null
+++ b/rbi/stripe/services/country_spec_service.rbi
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CountrySpecService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Lists all Country Spec objects available in the API.
+ sig {
+ params(params: T.any(::Stripe::CountrySpecService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Returns a Country Spec for a given Country code.
+ sig {
+ params(country: String, params: T.any(::Stripe::CountrySpecService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CountrySpec)
+ }
+ def retrieve(country, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/coupon_service.rbi b/rbi/stripe/services/coupon_service.rbi
new file mode 100644
index 00000000..3d59a012
--- /dev/null
+++ b/rbi/stripe/services/coupon_service.rbi
@@ -0,0 +1,192 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CouponService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ sig { returns(Integer) }
+ attr_accessor :amount_off
+ sig { params(amount_off: Integer).void }
+ def initialize(amount_off: nil); end
+ end
+ # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::CouponService::UpdateParams::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::CouponService::UpdateParams::CurrencyOptions]), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String)).void
+ }
+ def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::CouponService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::CouponService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AppliesTo < Stripe::RequestParams
+ # An array of Product IDs that this Coupon will apply to.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :products
+ sig { params(products: T.nilable(T::Array[String])).void }
+ def initialize(products: nil); end
+ end
+ class CurrencyOptions < Stripe::RequestParams
+ # A positive integer representing the amount to subtract from an invoice total.
+ sig { returns(Integer) }
+ attr_accessor :amount_off
+ sig { params(amount_off: Integer).void }
+ def initialize(amount_off: nil); end
+ end
+ # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_off
+ # A hash containing directions for what this Coupon will apply discounts to.
+ sig { returns(T.nilable(::Stripe::CouponService::CreateParams::AppliesTo)) }
+ attr_accessor :applies_to
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::CouponService::CreateParams::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duration
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :max_redemptions
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :percent_off
+ # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :redeem_by
+ sig {
+ params(amount_off: T.nilable(Integer), applies_to: T.nilable(::Stripe::CouponService::CreateParams::AppliesTo), currency: T.nilable(String), currency_options: T.nilable(T::Hash[String, ::Stripe::CouponService::CreateParams::CurrencyOptions]), duration: T.nilable(String), expand: T.nilable(T::Array[String]), id: T.nilable(String), max_redemptions: T.nilable(Integer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), percent_off: T.nilable(Float), redeem_by: T.nilable(Integer)).void
+ }
+ def initialize(
+ amount_off: nil,
+ applies_to: nil,
+ currency: nil,
+ currency_options: nil,
+ duration: nil,
+ expand: nil,
+ id: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ name: nil,
+ percent_off: nil,
+ redeem_by: nil
+ ); end
+ end
+ # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
+ #
+ # A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
+ sig {
+ params(params: T.any(::Stripe::CouponService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def create(params = {}, opts = {}); end
+
+ # You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
+ sig {
+ params(coupon: String, params: T.any(::Stripe::CouponService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def delete(coupon, params = {}, opts = {}); end
+
+ # Returns a list of your coupons.
+ sig {
+ params(params: T.any(::Stripe::CouponService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the coupon with the given ID.
+ sig {
+ params(coupon: String, params: T.any(::Stripe::CouponService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def retrieve(coupon, params = {}, opts = {}); end
+
+ # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
+ sig {
+ params(coupon: String, params: T.any(::Stripe::CouponService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon)
+ }
+ def update(coupon, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/credit_note_line_item_service.rbi b/rbi/stripe/services/credit_note_line_item_service.rbi
new file mode 100644
index 00000000..54639e28
--- /dev/null
+++ b/rbi/stripe/services/credit_note_line_item_service.rbi
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CreditNoteLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
+ sig {
+ params(credit_note: String, params: T.any(::Stripe::CreditNoteLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(credit_note, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/credit_note_preview_lines_service.rbi b/rbi/stripe/services/credit_note_preview_lines_service.rbi
new file mode 100644
index 00000000..4f528581
--- /dev/null
+++ b/rbi/stripe/services/credit_note_preview_lines_service.rbi
@@ -0,0 +1,167 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CreditNotePreviewLinesService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ sig { returns(String) }
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void }
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ sig { returns(String) }
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund
+ sig { params(amount_refunded: T.nilable(Integer), refund: T.nilable(String)).void }
+ def initialize(amount_refunded: nil, refund: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email_type
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the invoice.
+ sig { returns(String) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Line items that make up the credit note.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line]))
+ }
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Refund]))
+ }
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ sig { returns(T.nilable(::Stripe::CreditNotePreviewLinesService::ListParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(amount: T.nilable(Integer), credit_amount: T.nilable(Integer), effective_at: T.nilable(Integer), email_type: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: String, limit: T.nilable(Integer), lines: T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), out_of_band_amount: T.nilable(Integer), reason: T.nilable(String), refund_amount: T.nilable(Integer), refunds: T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Refund]), shipping_cost: T.nilable(::Stripe::CreditNotePreviewLinesService::ListParams::ShippingCost), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil,
+ starting_after: nil
+ ); end
+ end
+ # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
+ sig {
+ params(params: T.any(::Stripe::CreditNotePreviewLinesService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/credit_note_service.rbi b/rbi/stripe/services/credit_note_service.rbi
new file mode 100644
index 00000000..966de8f1
--- /dev/null
+++ b/rbi/stripe/services/credit_note_service.rbi
@@ -0,0 +1,416 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CreditNoteService < StripeService
+ attr_reader :line_items
+ attr_reader :preview_lines
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return credit notes that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::CreditNoteService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return credit notes for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return credit notes for the invoice specified by this invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::CreditNoteService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ sig { returns(String) }
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void }
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNoteService::CreateParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ sig { returns(String) }
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNoteService::CreateParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund
+ sig { params(amount_refunded: T.nilable(Integer), refund: T.nilable(String)).void }
+ def initialize(amount_refunded: nil, refund: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the invoice.
+ sig { returns(String) }
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Line])) }
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Refund])) }
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ sig { returns(T.nilable(::Stripe::CreditNoteService::CreateParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ sig {
+ params(amount: T.nilable(Integer), credit_amount: T.nilable(Integer), effective_at: T.nilable(Integer), email_type: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: String, lines: T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Line]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), out_of_band_amount: T.nilable(Integer), reason: T.nilable(String), refund_amount: T.nilable(Integer), refunds: T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Refund]), shipping_cost: T.nilable(::Stripe::CreditNoteService::CreateParams::ShippingCost)).void
+ }
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Credit note memo.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(expand: nil, memo: nil, metadata: nil); end
+ end
+ class PreviewParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class TaxAmount < Stripe::RequestParams
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
+ sig { returns(String) }
+ attr_accessor :tax_rate
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void }
+ def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end
+ end
+ # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_line_item
+ # The line item quantity to credit.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNoteService::PreviewParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
+ sig { returns(String) }
+ attr_accessor :type
+ # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CreditNoteService::PreviewParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ invoice_line_item: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil,
+ type: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Refund < Stripe::RequestParams
+ # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_refunded
+ # ID of an existing refund to link this credit note to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund
+ sig { params(amount_refunded: T.nilable(Integer), refund: T.nilable(String)).void }
+ def initialize(amount_refunded: nil, refund: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :credit_amount
+ # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email_type
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the invoice.
+ sig { returns(String) }
+ attr_accessor :invoice
+ # Line items that make up the credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Line])) }
+ attr_accessor :lines
+ # The credit note's memo appears on the credit note PDF.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :memo
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :out_of_band_amount
+ # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ # Refunds to link to this credit note.
+ sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Refund])) }
+ attr_accessor :refunds
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ sig { returns(T.nilable(::Stripe::CreditNoteService::PreviewParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ sig {
+ params(amount: T.nilable(Integer), credit_amount: T.nilable(Integer), effective_at: T.nilable(Integer), email_type: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: String, lines: T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Line]), memo: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), out_of_band_amount: T.nilable(Integer), reason: T.nilable(String), refund_amount: T.nilable(Integer), refunds: T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Refund]), shipping_cost: T.nilable(::Stripe::CreditNoteService::PreviewParams::ShippingCost)).void
+ }
+ def initialize(
+ amount: nil,
+ credit_amount: nil,
+ effective_at: nil,
+ email_type: nil,
+ expand: nil,
+ invoice: nil,
+ lines: nil,
+ memo: nil,
+ metadata: nil,
+ out_of_band_amount: nil,
+ reason: nil,
+ refund_amount: nil,
+ refunds: nil,
+ shipping_cost: nil
+ ); end
+ end
+ class VoidCreditNoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
+ # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
+ # in any combination of the following:
+ #
+ #
+ # Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
+ # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
+ # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
+ #
+ #
+ # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
+ #
+ # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
+ # or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
+ sig {
+ params(params: T.any(::Stripe::CreditNoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of credit notes.
+ sig {
+ params(params: T.any(::Stripe::CreditNoteService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Get a preview of a credit note without creating it.
+ sig {
+ params(params: T.any(::Stripe::CreditNoteService::PreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def preview(params = {}, opts = {}); end
+
+ # Retrieves the credit note object with the given identifier.
+ sig {
+ params(id: String, params: T.any(::Stripe::CreditNoteService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Updates an existing credit note.
+ sig {
+ params(id: String, params: T.any(::Stripe::CreditNoteService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def update(id, params = {}, opts = {}); end
+
+ # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
+ sig {
+ params(id: String, params: T.any(::Stripe::CreditNoteService::VoidCreditNoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote)
+ }
+ def void_credit_note(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_balance_transaction_service.rbi b/rbi/stripe/services/customer_balance_transaction_service.rbi
new file mode 100644
index 00000000..e48fdc9e
--- /dev/null
+++ b/rbi/stripe/services/customer_balance_transaction_service.rbi
@@ -0,0 +1,92 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerBalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(amount: nil, currency: nil, description: nil, expand: nil, metadata: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(description: nil, expand: nil, metadata: nil); end
+ end
+ # Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance).
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerBalanceTransactionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerBalanceTransaction)
+ }
+ def create(customer, params = {}, opts = {}); end
+
+ # Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerBalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(customer, params = {}, opts = {}); end
+
+ # Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
+ sig {
+ params(customer: String, transaction: String, params: T.any(::Stripe::CustomerBalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerBalanceTransaction)
+ }
+ def retrieve(customer, transaction, params = {}, opts = {}); end
+
+ # Most credit balance transaction fields are immutable, but you may update its description and metadata.
+ sig {
+ params(customer: String, transaction: String, params: T.any(::Stripe::CustomerBalanceTransactionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerBalanceTransaction)
+ }
+ def update(customer, transaction, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_cash_balance_service.rbi b/rbi/stripe/services/customer_cash_balance_service.rbi
new file mode 100644
index 00000000..7c370ec4
--- /dev/null
+++ b/rbi/stripe/services/customer_cash_balance_service.rbi
@@ -0,0 +1,45 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerCashBalanceService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reconciliation_mode
+ sig { params(reconciliation_mode: T.nilable(String)).void }
+ def initialize(reconciliation_mode: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A hash of settings for this cash balance.
+ sig { returns(T.nilable(::Stripe::CustomerCashBalanceService::UpdateParams::Settings)) }
+ attr_accessor :settings
+ sig {
+ params(expand: T.nilable(T::Array[String]), settings: T.nilable(::Stripe::CustomerCashBalanceService::UpdateParams::Settings)).void
+ }
+ def initialize(expand: nil, settings: nil); end
+ end
+ # Retrieves a customer's cash balance.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerCashBalanceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CashBalance)
+ }
+ def retrieve(customer, params = {}, opts = {}); end
+
+ # Changes the settings on a customer's cash balance.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerCashBalanceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CashBalance)
+ }
+ def update(customer, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_cash_balance_transaction_service.rbi b/rbi/stripe/services/customer_cash_balance_transaction_service.rbi
new file mode 100644
index 00000000..8814a7dc
--- /dev/null
+++ b/rbi/stripe/services/customer_cash_balance_transaction_service.rbi
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerCashBalanceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerCashBalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(customer, params = {}, opts = {}); end
+
+ # Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
+ sig {
+ params(customer: String, transaction: String, params: T.any(::Stripe::CustomerCashBalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerCashBalanceTransaction)
+ }
+ def retrieve(customer, transaction, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_funding_instructions_service.rbi b/rbi/stripe/services/customer_funding_instructions_service.rbi
new file mode 100644
index 00000000..b9c578b7
--- /dev/null
+++ b/rbi/stripe/services/customer_funding_instructions_service.rbi
@@ -0,0 +1,59 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerFundingInstructionsService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The type of the `bank_transfer`
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Additional parameters for `bank_transfer` funding types
+ sig { returns(::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer) }
+ attr_accessor :bank_transfer
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The `funding_type` to get the instructions for.
+ sig { returns(String) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: ::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer, currency: String, expand: T.nilable(T::Array[String]), funding_type: String).void
+ }
+ def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil); end
+ end
+ # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
+ # funding instructions will be created. If funding instructions have already been created for a given customer, the same
+ # funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerFundingInstructionsService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FundingInstructions)
+ }
+ def create(customer, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_payment_method_service.rbi b/rbi/stripe/services/customer_payment_method_service.rbi
new file mode 100644
index 00000000..ee85eb27
--- /dev/null
+++ b/rbi/stripe/services/customer_payment_method_service.rbi
@@ -0,0 +1,57 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerPaymentMethodService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(allow_redisplay: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of PaymentMethods for a given Customer
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerPaymentMethodService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(customer, params = {}, opts = {}); end
+
+ # Retrieves a PaymentMethod object for a given Customer.
+ sig {
+ params(customer: String, payment_method: String, params: T.any(::Stripe::CustomerPaymentMethodService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def retrieve(customer, payment_method, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_payment_source_service.rbi b/rbi/stripe/services/customer_payment_source_service.rbi
new file mode 100644
index 00000000..efe721c0
--- /dev/null
+++ b/rbi/stripe/services/customer_payment_source_service.rbi
@@ -0,0 +1,232 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerPaymentSourceService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filter sources according to a particular object type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :object
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), object: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ object: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Please refer to full [documentation](https://stripe.com/docs/api) instead.
+ sig { returns(String) }
+ attr_accessor :source
+ # Attribute for param field validate
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :validate
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), source: String, validate: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, metadata: nil, source: nil, validate: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Owner's address.
+ sig {
+ returns(T.nilable(::Stripe::CustomerPaymentSourceService::UpdateParams::Owner::Address))
+ }
+ attr_accessor :address
+ # Owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Owner's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Owner's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(::Stripe::CustomerPaymentSourceService::UpdateParams::Owner::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ # The name of the person or business that owns the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. This can be either `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # City/District/Suburb/Town/Village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Billing address country, if provided when creating card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Address line 1 (Street address/PO Box/Company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Address line 2 (Apartment/Suite/Unit/Building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # State/County/Province/Region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Two digit number representing the card’s expiration month.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exp_month
+ # Four digit number representing the card’s expiration year.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Cardholder name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Attribute for param field owner
+ sig { returns(T.nilable(::Stripe::CustomerPaymentSourceService::UpdateParams::Owner)) }
+ attr_accessor :owner
+ sig {
+ params(account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), exp_month: T.nilable(String), exp_year: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), owner: T.nilable(::Stripe::CustomerPaymentSourceService::UpdateParams::Owner)).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ metadata: nil,
+ name: nil,
+ owner: nil
+ ); end
+ end
+ class DeleteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class VerifyParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :amounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amounts: T.nilable(T::Array[Integer]), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amounts: nil, expand: nil); end
+ end
+ # When you create a new credit card, you must specify a customer or recipient on which to create it.
+ #
+ # If the card's owner has no default card, then the new card will become the default.
+ # However, if the owner already has a default, then it will not change.
+ # To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerPaymentSourceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))
+ }
+ def create(customer, params = {}, opts = {}); end
+
+ # Delete a specified source for a given customer.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))
+ }
+ def delete(customer, id, params = {}, opts = {}); end
+
+ # List sources for a specified customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerPaymentSourceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(customer, params = {}, opts = {}); end
+
+ # Retrieve a specified source for a given customer.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))
+ }
+ def retrieve(customer, id, params = {}, opts = {}); end
+
+ # Update a specified source for a given customer.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))
+ }
+ def update(customer, id, params = {}, opts = {}); end
+
+ # Verify a specified bank account for a given customer.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BankAccount)
+ }
+ def verify(customer, id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_service.rbi b/rbi/stripe/services/customer_service.rbi
new file mode 100644
index 00000000..bb7d9105
--- /dev/null
+++ b/rbi/stripe/services/customer_service.rbi
@@ -0,0 +1,651 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerService < StripeService
+ attr_reader :cash_balance
+ attr_reader :balance_transactions
+ attr_reader :cash_balance_transactions
+ attr_reader :payment_sources
+ attr_reader :tax_ids
+ attr_reader :payment_methods
+ attr_reader :funding_instructions
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reconciliation_mode
+ sig { params(reconciliation_mode: T.nilable(String)).void }
+ def initialize(reconciliation_mode: nil); end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ sig { returns(T.nilable(::Stripe::CustomerService::UpdateParams::CashBalance::Settings)) }
+ attr_accessor :settings
+ sig {
+ params(settings: T.nilable(::Stripe::CustomerService::UpdateParams::CashBalance::Settings)).void
+ }
+ def initialize(settings: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), template: T.nilable(String)).void
+ }
+ def initialize(amount_tax_display: nil, template: nil); end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CustomerService::UpdateParams::InvoiceSettings::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::UpdateParams::InvoiceSettings::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ params(custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CustomerService::UpdateParams::InvoiceSettings::CustomField]))), default_payment_method: T.nilable(String), footer: T.nilable(String), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::UpdateParams::InvoiceSettings::RenderingOptions)))).void
+ }
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Customer shipping address.
+ sig { returns(::Stripe::CustomerService::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # Customer name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Customer phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::CustomerService::UpdateParams::Shipping::Address, name: String, phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :validate_location
+ sig {
+ params(ip_address: T.nilable(T.nilable(String)), validate_location: T.nilable(String)).void
+ }
+ def initialize(ip_address: nil, validate_location: nil); end
+ end
+ # The customer's address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::UpdateParams::Address))))
+ }
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ sig { returns(T.nilable(::Stripe::CustomerService::UpdateParams::CashBalance)) }
+ attr_accessor :cash_balance
+ # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.
+ #
+ # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
+ #
+ # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_source
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ sig { returns(T.nilable(::Stripe::CustomerService::UpdateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :next_invoice_sequence
+ # The customer's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::UpdateParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # Attribute for param field source
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # Tax details about the customer.
+ sig { returns(T.nilable(::Stripe::CustomerService::UpdateParams::Tax)) }
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :tax_exempt
+ # Attribute for param field validate
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :validate
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::UpdateParams::Address))), balance: T.nilable(Integer), cash_balance: T.nilable(::Stripe::CustomerService::UpdateParams::CashBalance), default_source: T.nilable(String), description: T.nilable(String), email: T.nilable(String), expand: T.nilable(T::Array[String]), invoice_prefix: T.nilable(String), invoice_settings: T.nilable(::Stripe::CustomerService::UpdateParams::InvoiceSettings), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), next_invoice_sequence: T.nilable(Integer), phone: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::UpdateParams::Shipping))), source: T.nilable(String), tax: T.nilable(::Stripe::CustomerService::UpdateParams::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), validate: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ default_source: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ validate: nil
+ ); end
+ end
+ class DeleteDiscountParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return customers that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::CustomerService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ sig {
+ params(created: T.nilable(T.any(::Stripe::CustomerService::ListParams::Created, Integer)), email: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), test_clock: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ test_clock: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class CashBalance < Stripe::RequestParams
+ class Settings < Stripe::RequestParams
+ # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reconciliation_mode
+ sig { params(reconciliation_mode: T.nilable(String)).void }
+ def initialize(reconciliation_mode: nil); end
+ end
+ # Settings controlling the behavior of the customer's cash balance,
+ # such as reconciliation of funds received.
+ sig { returns(T.nilable(::Stripe::CustomerService::CreateParams::CashBalance::Settings)) }
+ attr_accessor :settings
+ sig {
+ params(settings: T.nilable(::Stripe::CustomerService::CreateParams::CashBalance::Settings)).void
+ }
+ def initialize(settings: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # ID of the invoice rendering template to use for future invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), template: T.nilable(String)).void
+ }
+ def initialize(amount_tax_display: nil, template: nil); end
+ end
+ # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CustomerService::CreateParams::InvoiceSettings::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::CreateParams::InvoiceSettings::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ params(custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::CustomerService::CreateParams::InvoiceSettings::CustomField]))), default_payment_method: T.nilable(String), footer: T.nilable(String), rendering_options: T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::CreateParams::InvoiceSettings::RenderingOptions)))).void
+ }
+ def initialize(
+ custom_fields: nil,
+ default_payment_method: nil,
+ footer: nil,
+ rendering_options: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Customer shipping address.
+ sig { returns(::Stripe::CustomerService::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # Customer name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Customer phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::CustomerService::CreateParams::Shipping::Address, name: String, phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :ip_address
+ # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :validate_location
+ sig {
+ params(ip_address: T.nilable(T.nilable(String)), validate_location: T.nilable(String)).void
+ }
+ def initialize(ip_address: nil, validate_location: nil); end
+ end
+ class TaxIdDatum < Stripe::RequestParams
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(type: String, value: String).void }
+ def initialize(type: nil, value: nil); end
+ end
+ # The customer's address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::CreateParams::Address))))
+ }
+ attr_accessor :address
+ # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :balance
+ # Balance information and default balance settings for this customer.
+ sig { returns(T.nilable(::Stripe::CustomerService::CreateParams::CashBalance)) }
+ attr_accessor :cash_balance
+ # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_prefix
+ # Default invoice settings for this customer.
+ sig { returns(T.nilable(::Stripe::CustomerService::CreateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The customer's full name or business name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The sequence to be used on the customer's next invoice. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :next_invoice_sequence
+ # Attribute for param field payment_method
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The customer's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Customer's preferred languages, ordered by preference.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::CreateParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # Attribute for param field source
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # Tax details about the customer.
+ sig { returns(T.nilable(::Stripe::CustomerService::CreateParams::Tax)) }
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ sig { returns(T.nilable(T::Array[::Stripe::CustomerService::CreateParams::TaxIdDatum])) }
+ attr_accessor :tax_id_data
+ # ID of the test clock to attach to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ # Attribute for param field validate
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :validate
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::CreateParams::Address))), balance: T.nilable(Integer), cash_balance: T.nilable(::Stripe::CustomerService::CreateParams::CashBalance), description: T.nilable(String), email: T.nilable(String), expand: T.nilable(T::Array[String]), invoice_prefix: T.nilable(String), invoice_settings: T.nilable(::Stripe::CustomerService::CreateParams::InvoiceSettings), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), next_invoice_sequence: T.nilable(Integer), payment_method: T.nilable(String), phone: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::CustomerService::CreateParams::Shipping))), source: T.nilable(String), tax: T.nilable(::Stripe::CustomerService::CreateParams::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), tax_id_data: T.nilable(T::Array[::Stripe::CustomerService::CreateParams::TaxIdDatum]), test_clock: T.nilable(String), validate: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ address: nil,
+ balance: nil,
+ cash_balance: nil,
+ description: nil,
+ email: nil,
+ expand: nil,
+ invoice_prefix: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ name: nil,
+ next_invoice_sequence: nil,
+ payment_method: nil,
+ phone: nil,
+ preferred_locales: nil,
+ shipping: nil,
+ source: nil,
+ tax: nil,
+ tax_exempt: nil,
+ tax_id_data: nil,
+ test_clock: nil,
+ validate: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ # Creates a new customer object.
+ sig {
+ params(params: T.any(::Stripe::CustomerService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def delete(customer, params = {}, opts = {}); end
+
+ # Removes the currently applied discount on a customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerService::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
+ }
+ def delete_discount(customer, params = {}, opts = {}); end
+
+ # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
+ sig {
+ params(params: T.any(::Stripe::CustomerService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a Customer object.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def retrieve(customer, params = {}, opts = {}); end
+
+ # Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::CustomerService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
+ #
+ # This request accepts mostly the same arguments as the customer creation call.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer)
+ }
+ def update(customer, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_session_service.rbi b/rbi/stripe/services/customer_session_service.rbi
new file mode 100644
index 00000000..6137d158
--- /dev/null
+++ b/rbi/stripe/services/customer_session_service.rbi
@@ -0,0 +1,116 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerSessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Components < Stripe::RequestParams
+ class BuyButton < Stripe::RequestParams
+ # Whether the buy button is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class PaymentElement < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
+ #
+ # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_allow_redisplay_filters
+ # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_redisplay
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :payment_method_redisplay_limit
+ # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
+ #
+ # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_remove
+ # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
+ #
+ # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_save
+ # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
+ #
+ # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_save_usage
+ sig {
+ params(payment_method_allow_redisplay_filters: T.nilable(T::Array[String]), payment_method_redisplay: T.nilable(String), payment_method_redisplay_limit: T.nilable(Integer), payment_method_remove: T.nilable(String), payment_method_save: T.nilable(String), payment_method_save_usage: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_allow_redisplay_filters: nil,
+ payment_method_redisplay: nil,
+ payment_method_redisplay_limit: nil,
+ payment_method_remove: nil,
+ payment_method_save: nil,
+ payment_method_save_usage: nil
+ ); end
+ end
+ # Whether the Payment Element is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # This hash defines whether the Payment Element supports certain features.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement::Features))
+ }
+ attr_accessor :features
+ sig {
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement::Features)).void
+ }
+ def initialize(enabled: nil, features: nil); end
+ end
+ class PricingTable < Stripe::RequestParams
+ # Whether the pricing table is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ # Configuration for buy button.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::BuyButton))
+ }
+ attr_accessor :buy_button
+ # Configuration for the Payment Element.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement))
+ }
+ attr_accessor :payment_element
+ # Configuration for the pricing table.
+ sig {
+ returns(T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::PricingTable))
+ }
+ attr_accessor :pricing_table
+ sig {
+ params(buy_button: T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::BuyButton), payment_element: T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement), pricing_table: T.nilable(::Stripe::CustomerSessionService::CreateParams::Components::PricingTable)).void
+ }
+ def initialize(buy_button: nil, payment_element: nil, pricing_table: nil); end
+ end
+ # Configuration for each component. Exactly 1 component must be enabled.
+ sig { returns(::Stripe::CustomerSessionService::CreateParams::Components) }
+ attr_accessor :components
+ # The ID of an existing customer for which to create the Customer Session.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(components: ::Stripe::CustomerSessionService::CreateParams::Components, customer: String, expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(components: nil, customer: nil, expand: nil); end
+ end
+ # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
+ sig {
+ params(params: T.any(::Stripe::CustomerSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerSession)
+ }
+ def create(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/customer_tax_id_service.rbi b/rbi/stripe/services/customer_tax_id_service.rbi
new file mode 100644
index 00000000..9492ef0a
--- /dev/null
+++ b/rbi/stripe/services/customer_tax_id_service.rbi
@@ -0,0 +1,72 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class CustomerTaxIdService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(expand: T.nilable(T::Array[String]), type: String, value: String).void }
+ def initialize(expand: nil, type: nil, value: nil); end
+ end
+ # Creates a new tax_id object for a customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerTaxIdService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def create(customer, params = {}, opts = {}); end
+
+ # Deletes an existing tax_id object.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::CustomerTaxIdService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def delete(customer, id, params = {}, opts = {}); end
+
+ # Returns a list of tax IDs for a customer.
+ sig {
+ params(customer: String, params: T.any(::Stripe::CustomerTaxIdService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(customer, params = {}, opts = {}); end
+
+ # Retrieves the tax_id object with the given identifier.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::CustomerTaxIdService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def retrieve(customer, id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/dispute_service.rbi b/rbi/stripe/services/dispute_service.rbi
new file mode 100644
index 00000000..8e72c140
--- /dev/null
+++ b/rbi/stripe/services/dispute_service.rbi
@@ -0,0 +1,424 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class DisputeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return disputes associated to the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return disputes that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::DisputeService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::DisputeService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class EnhancedEvidence < Stripe::RequestParams
+ class VisaCompellingEvidence3 < Stripe::RequestParams
+ class DisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: T.nilable(T.nilable(String)), line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_purchase_ip
+ # Categorization of disputed payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :merchandise_or_services
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress))
+ }
+ attr_accessor :shipping_address
+ sig {
+ params(customer_account_id: T.nilable(T.nilable(String)), customer_device_fingerprint: T.nilable(T.nilable(String)), customer_device_id: T.nilable(T.nilable(String)), customer_email_address: T.nilable(T.nilable(String)), customer_purchase_ip: T.nilable(T.nilable(String)), merchandise_or_services: T.nilable(String), product_description: T.nilable(T.nilable(String)), shipping_address: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress)).void
+ }
+ def initialize(
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ merchandise_or_services: nil,
+ product_description: nil,
+ shipping_address: nil
+ ); end
+ end
+ class PriorUndisputedTransaction < Stripe::RequestParams
+ class ShippingAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: T.nilable(T.nilable(String)), line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
+ sig { returns(String) }
+ attr_accessor :charge
+ # User Account ID used to log into business platform. Must be recognizable by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_account_id
+ # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_fingerprint
+ # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_device_id
+ # The email address of the customer.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_email_address
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :customer_purchase_ip
+ # A description of the product or service that was sold.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress))
+ }
+ attr_accessor :shipping_address
+ sig {
+ params(charge: String, customer_account_id: T.nilable(T.nilable(String)), customer_device_fingerprint: T.nilable(T.nilable(String)), customer_device_id: T.nilable(T.nilable(String)), customer_email_address: T.nilable(T.nilable(String)), customer_purchase_ip: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), shipping_address: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress)).void
+ }
+ def initialize(
+ charge: nil,
+ customer_account_id: nil,
+ customer_device_fingerprint: nil,
+ customer_device_id: nil,
+ customer_email_address: nil,
+ customer_purchase_ip: nil,
+ product_description: nil,
+ shipping_address: nil
+ ); end
+ end
+ # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction))
+ }
+ attr_accessor :disputed_transaction
+ # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction]))
+ }
+ attr_accessor :prior_undisputed_transactions
+ sig {
+ params(disputed_transaction: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction), prior_undisputed_transactions: T.nilable(T::Array[::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction])).void
+ }
+ def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil); end
+ end
+ class VisaCompliance < Stripe::RequestParams
+ # A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :fee_acknowledged
+ sig { params(fee_acknowledged: T.nilable(T::Boolean)).void }
+ def initialize(fee_acknowledged: nil); end
+ end
+ # Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3))
+ }
+ attr_accessor :visa_compelling_evidence_3
+ # Evidence provided for Visa compliance evidence submission.
+ sig {
+ returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance))
+ }
+ attr_accessor :visa_compliance
+ sig {
+ params(visa_compelling_evidence_3: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3), visa_compliance: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance)).void
+ }
+ def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil); end
+ end
+ # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :access_activity_log
+ # The billing address provided by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_policy
+ # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_policy_disclosure
+ # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_rebuttal
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_communication
+ # The email address of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_email_address
+ # The name of the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_name
+ # The IP address that the customer used when making the purchase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_purchase_ip
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_signature
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duplicate_charge_documentation
+ # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duplicate_charge_explanation
+ # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :duplicate_charge_id
+ # Additional evidence for qualifying evidence programs.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence))))
+ }
+ attr_accessor :enhanced_evidence
+ # A description of the product or service that was sold. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product_description
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_policy
+ # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_policy_disclosure
+ # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_refusal_explanation
+ # The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_documentation
+ # The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_carrier
+ # The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_date
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_documentation
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_tracking_number
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :uncategorized_file
+ # Any additional evidence or statements. Has a maximum character count of 20,000.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :uncategorized_text
+ sig {
+ params(access_activity_log: T.nilable(String), billing_address: T.nilable(String), cancellation_policy: T.nilable(String), cancellation_policy_disclosure: T.nilable(String), cancellation_rebuttal: T.nilable(String), customer_communication: T.nilable(String), customer_email_address: T.nilable(String), customer_name: T.nilable(String), customer_purchase_ip: T.nilable(String), customer_signature: T.nilable(String), duplicate_charge_documentation: T.nilable(String), duplicate_charge_explanation: T.nilable(String), duplicate_charge_id: T.nilable(String), enhanced_evidence: T.nilable(T.nilable(T.any(String, ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence))), product_description: T.nilable(String), receipt: T.nilable(String), refund_policy: T.nilable(String), refund_policy_disclosure: T.nilable(String), refund_refusal_explanation: T.nilable(String), service_date: T.nilable(String), service_documentation: T.nilable(String), shipping_address: T.nilable(String), shipping_carrier: T.nilable(String), shipping_date: T.nilable(String), shipping_documentation: T.nilable(String), shipping_tracking_number: T.nilable(String), uncategorized_file: T.nilable(String), uncategorized_text: T.nilable(String)).void
+ }
+ def initialize(
+ access_activity_log: nil,
+ billing_address: nil,
+ cancellation_policy: nil,
+ cancellation_policy_disclosure: nil,
+ cancellation_rebuttal: nil,
+ customer_communication: nil,
+ customer_email_address: nil,
+ customer_name: nil,
+ customer_purchase_ip: nil,
+ customer_signature: nil,
+ duplicate_charge_documentation: nil,
+ duplicate_charge_explanation: nil,
+ duplicate_charge_id: nil,
+ enhanced_evidence: nil,
+ product_description: nil,
+ receipt: nil,
+ refund_policy: nil,
+ refund_policy_disclosure: nil,
+ refund_refusal_explanation: nil,
+ service_date: nil,
+ service_documentation: nil,
+ shipping_address: nil,
+ shipping_carrier: nil,
+ shipping_date: nil,
+ shipping_documentation: nil,
+ shipping_tracking_number: nil,
+ uncategorized_file: nil,
+ uncategorized_text: nil
+ ); end
+ end
+ # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
+ sig { returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence)) }
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :submit
+ sig {
+ params(evidence: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), submit: T.nilable(T::Boolean)).void
+ }
+ def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil); end
+ end
+ class CloseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
+ #
+ # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
+ sig {
+ params(dispute: String, params: T.any(::Stripe::DisputeService::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute)
+ }
+ def close(dispute, params = {}, opts = {}); end
+
+ # Returns a list of your disputes.
+ sig {
+ params(params: T.any(::Stripe::DisputeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the dispute with the given ID.
+ sig {
+ params(dispute: String, params: T.any(::Stripe::DisputeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute)
+ }
+ def retrieve(dispute, params = {}, opts = {}); end
+
+ # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
+ #
+ # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories).
+ sig {
+ params(dispute: String, params: T.any(::Stripe::DisputeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute)
+ }
+ def update(dispute, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/entitlements/active_entitlement_service.rbi b/rbi/stripe/services/entitlements/active_entitlement_service.rbi
new file mode 100644
index 00000000..75e1a862
--- /dev/null
+++ b/rbi/stripe/services/entitlements/active_entitlement_service.rbi
@@ -0,0 +1,55 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Entitlements
+ class ActiveEntitlementService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer.
+ sig { returns(String) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(customer: String, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieve a list of active entitlements for a customer
+ sig {
+ params(params: T.any(::Stripe::Entitlements::ActiveEntitlementService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieve an active entitlement
+ sig {
+ params(id: String, params: T.any(::Stripe::Entitlements::ActiveEntitlementService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::ActiveEntitlement)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/entitlements/feature_service.rbi b/rbi/stripe/services/entitlements/feature_service.rbi
new file mode 100644
index 00000000..49d778e9
--- /dev/null
+++ b/rbi/stripe/services/entitlements/feature_service.rbi
@@ -0,0 +1,107 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Entitlements
+ class FeatureService < StripeService
+ class ListParams < Stripe::RequestParams
+ # If set, filter results to only include features with the given archive status.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :archived
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # If set, filter results to only include features with the given lookup_key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(archived: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), lookup_key: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ archived: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_key: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
+ sig { returns(String) }
+ attr_accessor :lookup_key
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ sig {
+ params(expand: T.nilable(T::Array[String]), lookup_key: String, metadata: T.nilable(T::Hash[String, String]), name: String).void
+ }
+ def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String)).void
+ }
+ def initialize(active: nil, expand: nil, metadata: nil, name: nil); end
+ end
+ # Creates a feature
+ sig {
+ params(params: T.any(::Stripe::Entitlements::FeatureService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Retrieve a list of features
+ sig {
+ params(params: T.any(::Stripe::Entitlements::FeatureService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a feature
+ sig {
+ params(id: String, params: T.any(::Stripe::Entitlements::FeatureService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Update a feature's metadata or permanently deactivate it.
+ sig {
+ params(id: String, params: T.any(::Stripe::Entitlements::FeatureService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature)
+ }
+ def update(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/entitlements_service.rbi b/rbi/stripe/services/entitlements_service.rbi
new file mode 100644
index 00000000..24228dd5
--- /dev/null
+++ b/rbi/stripe/services/entitlements_service.rbi
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class EntitlementsService < StripeService
+ attr_reader :active_entitlements
+ attr_reader :features
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/ephemeral_key_service.rbi b/rbi/stripe/services/ephemeral_key_service.rbi
new file mode 100644
index 00000000..cc016694
--- /dev/null
+++ b/rbi/stripe/services/ephemeral_key_service.rbi
@@ -0,0 +1,53 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class EphemeralKeyService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The ID of the Customer you'd like to modify using the resulting ephemeral key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The ID of the Issuing Card you'd like to access using the resulting ephemeral key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :issuing_card
+ # A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nonce
+ # The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_session
+ sig {
+ params(customer: T.nilable(String), expand: T.nilable(T::Array[String]), issuing_card: T.nilable(String), nonce: T.nilable(String), verification_session: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ expand: nil,
+ issuing_card: nil,
+ nonce: nil,
+ verification_session: nil
+ ); end
+ end
+ # Creates a short-lived API key for a given resource.
+ sig {
+ params(params: T.any(::Stripe::EphemeralKeyService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Invalidates a short-lived API key for a given resource.
+ sig {
+ params(key: String, params: T.any(::Stripe::EphemeralKeyService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey)
+ }
+ def delete(key, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/event_service.rbi b/rbi/stripe/services/event_service.rbi
new file mode 100644
index 00000000..167b6f65
--- /dev/null
+++ b/rbi/stripe/services/event_service.rbi
@@ -0,0 +1,83 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class EventService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return events that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::EventService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :delivery_success
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :types
+ sig {
+ params(created: T.nilable(T.any(::Stripe::EventService::ListParams::Created, Integer)), delivery_success: T.nilable(T::Boolean), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String), types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ created: nil,
+ delivery_success: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ types: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ sig {
+ params(params: T.any(::Stripe::EventService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook.
+ sig {
+ params(id: String, params: T.any(::Stripe::EventService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Event)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/exchange_rate_service.rbi b/rbi/stripe/services/exchange_rate_service.rbi
new file mode 100644
index 00000000..96b4f534
--- /dev/null
+++ b/rbi/stripe/services/exchange_rate_service.rbi
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ExchangeRateService < StripeService
+ class ListParams < Stripe::RequestParams
+ # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
+ sig {
+ params(params: T.any(::Stripe::ExchangeRateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the exchange rates from the given currency to every supported currency.
+ sig {
+ params(rate_id: String, params: T.any(::Stripe::ExchangeRateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ExchangeRate)
+ }
+ def retrieve(rate_id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/file_link_service.rbi b/rbi/stripe/services/file_link_service.rbi
new file mode 100644
index 00000000..81a9041b
--- /dev/null
+++ b/rbi/stripe/services/file_link_service.rbi
@@ -0,0 +1,124 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class FileLinkService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return links that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::FileLinkService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Filter links by their expiration status. By default, Stripe returns all links.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :expired
+ # Only return links for the given file.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :file
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::FileLinkService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), expired: T.nilable(T::Boolean), file: T.nilable(String), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ expired: nil,
+ file: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The link isn't usable after this future timestamp.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ sig { returns(String) }
+ attr_accessor :file
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), file: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :expires_at
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, expires_at: nil, metadata: nil); end
+ end
+ # Creates a new file link object.
+ sig {
+ params(params: T.any(::Stripe::FileLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of file links.
+ sig {
+ params(params: T.any(::Stripe::FileLinkService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the file link with the given ID.
+ sig {
+ params(link: String, params: T.any(::Stripe::FileLinkService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
+ }
+ def retrieve(link, params = {}, opts = {}); end
+
+ # Updates an existing file link object. Expired links can no longer be updated.
+ sig {
+ params(link: String, params: T.any(::Stripe::FileLinkService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink)
+ }
+ def update(link, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/file_service.rbi b/rbi/stripe/services/file_service.rbi
new file mode 100644
index 00000000..5482889d
--- /dev/null
+++ b/rbi/stripe/services/file_service.rbi
@@ -0,0 +1,116 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class FileService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return files that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::FileService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purpose
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::FileService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), purpose: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ purpose: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class FileLinkData < Stripe::RequestParams
+ # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ sig { returns(T::Boolean) }
+ attr_accessor :create
+ # The link isn't available after this future timestamp.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(create: T::Boolean, expires_at: T.nilable(Integer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(create: nil, expires_at: nil, metadata: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.
+ sig { returns(T.untyped) }
+ attr_accessor :file
+ # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
+ sig { returns(T.nilable(::Stripe::FileService::CreateParams::FileLinkData)) }
+ attr_accessor :file_link_data
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ sig { returns(String) }
+ attr_accessor :purpose
+ sig {
+ params(expand: T.nilable(T::Array[String]), file: T.untyped, file_link_data: T.nilable(::Stripe::FileService::CreateParams::FileLinkData), purpose: String).void
+ }
+ def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
+ #
+ # All of Stripe's officially supported Client libraries support sending multipart/form-data.
+ sig {
+ params(params: T.any(::Stripe::FileService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::File)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
+ sig {
+ params(params: T.any(::Stripe::FileService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents).
+ sig {
+ params(file: String, params: T.any(::Stripe::FileService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::File)
+ }
+ def retrieve(file, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/financial_connections/account_owner_service.rbi b/rbi/stripe/services/financial_connections/account_owner_service.rbi
new file mode 100644
index 00000000..b006a4a2
--- /dev/null
+++ b/rbi/stripe/services/financial_connections/account_owner_service.rbi
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ class AccountOwnerService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The ID of the ownership object to fetch owners from.
+ sig { returns(String) }
+ attr_accessor :ownership
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), ownership: String, starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ ownership: nil,
+ starting_after: nil
+ ); end
+ end
+ # Lists all owners for a given Account
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::AccountOwnerService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(account, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/financial_connections/account_service.rbi b/rbi/stripe/services/financial_connections/account_service.rbi
new file mode 100644
index 00000000..f6c73868
--- /dev/null
+++ b/rbi/stripe/services/financial_connections/account_service.rbi
@@ -0,0 +1,133 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ class AccountService < StripeService
+ attr_reader :owners
+ class ListParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ sig { params(account: T.nilable(String), customer: T.nilable(String)).void }
+ def initialize(account: nil, customer: nil); end
+ end
+ # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
+ sig {
+ returns(T.nilable(::Stripe::FinancialConnections::AccountService::ListParams::AccountHolder))
+ }
+ attr_accessor :account_holder
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # If present, only return accounts that were collected as part of the given session.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(account_holder: T.nilable(::Stripe::FinancialConnections::AccountService::ListParams::AccountHolder), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), session: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ session: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class DisconnectParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RefreshParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The list of account features that you would like to refresh.
+ sig { returns(T::Array[String]) }
+ attr_accessor :features
+ sig { params(expand: T.nilable(T::Array[String]), features: T::Array[String]).void }
+ def initialize(expand: nil, features: nil); end
+ end
+ class SubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The list of account features to which you would like to subscribe.
+ sig { returns(T::Array[String]) }
+ attr_accessor :features
+ sig { params(expand: T.nilable(T::Array[String]), features: T::Array[String]).void }
+ def initialize(expand: nil, features: nil); end
+ end
+ class UnsubscribeParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The list of account features from which you would like to unsubscribe.
+ sig { returns(T::Array[String]) }
+ attr_accessor :features
+ sig { params(expand: T.nilable(T::Array[String]), features: T::Array[String]).void }
+ def initialize(expand: nil, features: nil); end
+ end
+ # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::DisconnectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def disconnect(account, params = {}, opts = {}); end
+
+ # Returns a list of Financial Connections Account objects.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::AccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Refreshes the data associated with a Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::RefreshParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def refresh(account, params = {}, opts = {}); end
+
+ # Retrieves the details of an Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def retrieve(account, params = {}, opts = {}); end
+
+ # Subscribes to periodic refreshes of data associated with a Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::SubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def subscribe(account, params = {}, opts = {}); end
+
+ # Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
+ sig {
+ params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::UnsubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account)
+ }
+ def unsubscribe(account, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/financial_connections/session_service.rbi b/rbi/stripe/services/financial_connections/session_service.rbi
new file mode 100644
index 00000000..061a2b48
--- /dev/null
+++ b/rbi/stripe/services/financial_connections/session_service.rbi
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ class SessionService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AccountHolder < Stripe::RequestParams
+ # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Type of account holder to collect accounts for.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), customer: T.nilable(String), type: String).void }
+ def initialize(account: nil, customer: nil, type: nil); end
+ end
+ class Filters < Stripe::RequestParams
+ # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ # List of countries from which to collect accounts.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :countries
+ sig {
+ params(account_subcategories: T.nilable(T::Array[String]), countries: T.nilable(T::Array[String])).void
+ }
+ def initialize(account_subcategories: nil, countries: nil); end
+ end
+ # The account holder to link accounts for.
+ sig { returns(::Stripe::FinancialConnections::SessionService::CreateParams::AccountHolder) }
+ attr_accessor :account_holder
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Filters to restrict the kinds of accounts to collect.
+ sig {
+ returns(T.nilable(::Stripe::FinancialConnections::SessionService::CreateParams::Filters))
+ }
+ attr_accessor :filters
+ # List of data features that you would like to request access to.
+ #
+ # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
+ sig { returns(T::Array[String]) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(account_holder: ::Stripe::FinancialConnections::SessionService::CreateParams::AccountHolder, expand: T.nilable(T::Array[String]), filters: T.nilable(::Stripe::FinancialConnections::SessionService::CreateParams::Filters), permissions: T::Array[String], prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder: nil,
+ expand: nil,
+ filters: nil,
+ permissions: nil,
+ prefetch: nil,
+ return_url: nil
+ ); end
+ end
+ # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::SessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Session)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Retrieves the details of a Financial Connections Session
+ sig {
+ params(session: String, params: T.any(::Stripe::FinancialConnections::SessionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Session)
+ }
+ def retrieve(session, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/financial_connections/transaction_service.rbi b/rbi/stripe/services/financial_connections/transaction_service.rbi
new file mode 100644
index 00000000..ca3138f6
--- /dev/null
+++ b/rbi/stripe/services/financial_connections/transaction_service.rbi
@@ -0,0 +1,92 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module FinancialConnections
+ class TransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class TransactedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class TransactionRefresh < Stripe::RequestParams
+ # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
+ sig { returns(String) }
+ attr_accessor :after
+ sig { params(after: String).void }
+ def initialize(after: nil); end
+ end
+ # The ID of the Financial Connections Account whose transactions will be retrieved.
+ sig { returns(String) }
+ attr_accessor :account
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
+ sig {
+ returns(T.nilable(T.any(::Stripe::FinancialConnections::TransactionService::ListParams::TransactedAt, Integer)))
+ }
+ attr_accessor :transacted_at
+ # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
+ sig {
+ returns(T.nilable(::Stripe::FinancialConnections::TransactionService::ListParams::TransactionRefresh))
+ }
+ attr_accessor :transaction_refresh
+ sig {
+ params(account: String, ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), transacted_at: T.nilable(T.any(::Stripe::FinancialConnections::TransactionService::ListParams::TransactedAt, Integer)), transaction_refresh: T.nilable(::Stripe::FinancialConnections::TransactionService::ListParams::TransactionRefresh)).void
+ }
+ def initialize(
+ account: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transacted_at: nil,
+ transaction_refresh: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of Financial Connections Transaction objects.
+ sig {
+ params(params: T.any(::Stripe::FinancialConnections::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a Financial Connections Transaction
+ sig {
+ params(transaction: String, params: T.any(::Stripe::FinancialConnections::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Transaction)
+ }
+ def retrieve(transaction, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/financial_connections_service.rbi b/rbi/stripe/services/financial_connections_service.rbi
new file mode 100644
index 00000000..7aff3e5d
--- /dev/null
+++ b/rbi/stripe/services/financial_connections_service.rbi
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class FinancialConnectionsService < StripeService
+ attr_reader :accounts
+ attr_reader :sessions
+ attr_reader :transactions
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/forwarding/request_service.rbi b/rbi/stripe/services/forwarding/request_service.rbi
new file mode 100644
index 00000000..4757d643
--- /dev/null
+++ b/rbi/stripe/services/forwarding/request_service.rbi
@@ -0,0 +1,134 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Forwarding
+ class RequestService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Return results where the `created` field is greater than this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Return results where the `created` field is greater than or equal to this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Return results where the `created` field is less than this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Return results where the `created` field is less than or equal to this value.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.
+ sig { returns(T.nilable(::Stripe::Forwarding::RequestService::ListParams::Created)) }
+ attr_accessor :created
+ # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(::Stripe::Forwarding::RequestService::ListParams::Created), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Request < Stripe::RequestParams
+ class Header < Stripe::RequestParams
+ # The header name.
+ sig { returns(String) }
+ attr_accessor :name
+ # The header value.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ # The body payload to send to the destination endpoint.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :body
+ # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Forwarding::RequestService::CreateParams::Request::Header]))
+ }
+ attr_accessor :headers
+ sig {
+ params(body: T.nilable(String), headers: T.nilable(T::Array[::Stripe::Forwarding::RequestService::CreateParams::Request::Header])).void
+ }
+ def initialize(body: nil, headers: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ sig { returns(String) }
+ attr_accessor :payment_method
+ # The field kinds to be replaced in the forwarded request.
+ sig { returns(T::Array[String]) }
+ attr_accessor :replacements
+ # The request body and headers to be sent to the destination endpoint.
+ sig { returns(::Stripe::Forwarding::RequestService::CreateParams::Request) }
+ attr_accessor :request
+ # The destination URL for the forwarded request. Must be supported by the config.
+ sig { returns(String) }
+ attr_accessor :url
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), payment_method: String, replacements: T::Array[String], request: ::Stripe::Forwarding::RequestService::CreateParams::Request, url: String).void
+ }
+ def initialize(
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ replacements: nil,
+ request: nil,
+ url: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a ForwardingRequest object.
+ sig {
+ params(params: T.any(::Stripe::Forwarding::RequestService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Forwarding::Request)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Lists all ForwardingRequest objects.
+ sig {
+ params(params: T.any(::Stripe::Forwarding::RequestService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a ForwardingRequest object.
+ sig {
+ params(id: String, params: T.any(::Stripe::Forwarding::RequestService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Forwarding::Request)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/forwarding_service.rbi b/rbi/stripe/services/forwarding_service.rbi
new file mode 100644
index 00000000..a54c00a8
--- /dev/null
+++ b/rbi/stripe/services/forwarding_service.rbi
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ForwardingService < StripeService
+ attr_reader :requests
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/identity/verification_report_service.rbi b/rbi/stripe/services/identity/verification_report_service.rbi
new file mode 100644
index 00000000..2239b2b7
--- /dev/null
+++ b/rbi/stripe/services/identity/verification_report_service.rbi
@@ -0,0 +1,87 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Identity
+ class VerificationReportService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Only return VerificationReports that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Identity::VerificationReportService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return VerificationReports of this type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_session
+ sig {
+ params(client_reference_id: T.nilable(String), created: T.nilable(T.any(::Stripe::Identity::VerificationReportService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String), verification_session: T.nilable(String)).void
+ }
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil,
+ verification_session: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # List all verification reports.
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationReportService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an existing VerificationReport
+ sig {
+ params(report: String, params: T.any(::Stripe::Identity::VerificationReportService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationReport)
+ }
+ def retrieve(report, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/identity/verification_session_service.rbi b/rbi/stripe/services/identity/verification_session_service.rbi
new file mode 100644
index 00000000..534e3301
--- /dev/null
+++ b/rbi/stripe/services/identity/verification_session_service.rbi
@@ -0,0 +1,323 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Identity
+ class VerificationSessionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Only return VerificationSessions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Identity::VerificationSessionService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Attribute for param field related_customer
+ sig { returns(T.nilable(String)) }
+ attr_accessor :related_customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(client_reference_id: T.nilable(String), created: T.nilable(T.any(::Stripe::Identity::VerificationSessionService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), related_customer: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ client_reference_id: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ related_customer: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_matching_selfie
+ sig {
+ params(allowed_types: T.nilable(T::Array[String]), require_id_number: T.nilable(T::Boolean), require_live_capture: T.nilable(T::Boolean), require_matching_selfie: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ ); end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSessionService::CreateParams::Options::Document))))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSessionService::CreateParams::Options::Document)))).void
+ }
+ def initialize(document: nil); end
+ end
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Phone number of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig { params(email: T.nilable(String), phone: T.nilable(String)).void }
+ def initialize(email: nil, phone: nil); end
+ end
+ # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_reference_id
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ sig {
+ returns(T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options))
+ }
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ sig {
+ returns(T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails))
+ }
+ attr_accessor :provided_details
+ # Customer ID
+ sig { returns(T.nilable(String)) }
+ attr_accessor :related_customer
+ # The URL that the user will be redirected to upon completing the verification flow.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_flow
+ sig {
+ params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails), related_customer: T.nilable(String), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void
+ }
+ def initialize(
+ client_reference_id: nil,
+ expand: nil,
+ metadata: nil,
+ options: nil,
+ provided_details: nil,
+ related_customer: nil,
+ return_url: nil,
+ type: nil,
+ verification_flow: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Options < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_types
+ # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_id_number
+ # Disable image uploads, identity document images have to be captured using the device’s camera.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_live_capture
+ # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_matching_selfie
+ sig {
+ params(allowed_types: T.nilable(T::Array[String]), require_id_number: T.nilable(T::Boolean), require_live_capture: T.nilable(T::Boolean), require_matching_selfie: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ allowed_types: nil,
+ require_id_number: nil,
+ require_live_capture: nil,
+ require_matching_selfie: nil
+ ); end
+ end
+ # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSessionService::UpdateParams::Options::Document))))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(T.nilable(T.any(String, ::Stripe::Identity::VerificationSessionService::UpdateParams::Options::Document)))).void
+ }
+ def initialize(document: nil); end
+ end
+ class ProvidedDetails < Stripe::RequestParams
+ # Email of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Phone number of user being verified
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig { params(email: T.nilable(String), phone: T.nilable(String)).void }
+ def initialize(email: nil, phone: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A set of options for the session’s verification checks.
+ sig {
+ returns(T.nilable(::Stripe::Identity::VerificationSessionService::UpdateParams::Options))
+ }
+ attr_accessor :options
+ # Details provided about the user being verified. These details may be shown to the user.
+ sig {
+ returns(T.nilable(::Stripe::Identity::VerificationSessionService::UpdateParams::ProvidedDetails))
+ }
+ attr_accessor :provided_details
+ # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSessionService::UpdateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSessionService::UpdateParams::ProvidedDetails), type: T.nilable(String)).void
+ }
+ def initialize(
+ expand: nil,
+ metadata: nil,
+ options: nil,
+ provided_details: nil,
+ type: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RedactParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
+ #
+ # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def cancel(session, params = {}, opts = {}); end
+
+ # Creates a VerificationSession object.
+ #
+ # After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.
+ #
+ # If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.
+ #
+ # Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of VerificationSessions
+ sig {
+ params(params: T.any(::Stripe::Identity::VerificationSessionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Redact a VerificationSession to remove all collected information from Stripe. This will redact
+ # the VerificationSession and all objects related to it, including VerificationReports, Events,
+ # request logs, etc.
+ #
+ # A VerificationSession object can be redacted when it is in requires_input or verified
+ # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
+ # state will automatically cancel it.
+ #
+ # The redaction process may take up to four days. When the redaction process is in progress, the
+ # VerificationSession's redaction.status field will be set to processing; when the process is
+ # finished, it will change to redacted and an identity.verification_session.redacted event
+ # will be emitted.
+ #
+ # Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
+ # fields that contain personal data will be replaced by the string [redacted] or a similar
+ # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
+ # used for any purpose.
+ #
+ # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::RedactParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def redact(session, params = {}, opts = {}); end
+
+ # Retrieves the details of a VerificationSession that was previously created.
+ #
+ # When the session status is requires_input, you can use this method to retrieve a valid
+ # client_secret or url to allow re-submission.
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def retrieve(session, params = {}, opts = {}); end
+
+ # Updates a VerificationSession object.
+ #
+ # When the session status is requires_input, you can use this method to update the
+ # verification check and options.
+ sig {
+ params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession)
+ }
+ def update(session, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/identity_service.rbi b/rbi/stripe/services/identity_service.rbi
new file mode 100644
index 00000000..d88f2911
--- /dev/null
+++ b/rbi/stripe/services/identity_service.rbi
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class IdentityService < StripeService
+ attr_reader :verification_reports
+ attr_reader :verification_sessions
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/invoice_item_service.rbi b/rbi/stripe/services/invoice_item_service.rbi
new file mode 100644
index 00000000..c029dba5
--- /dev/null
+++ b/rbi/stripe/services/invoice_item_service.rbi
@@ -0,0 +1,368 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class InvoiceItemService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemService::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceItemService::UpdateParams::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceItemService::UpdateParams::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceItemService::UpdateParams::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceItemService::UpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemService::UpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemService::UpdateParams::Pricing), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return invoice items that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::InvoiceItemService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :pending
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::InvoiceItemService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), limit: T.nilable(Integer), pending: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ pending: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The ID of the customer who will be billed when this invoice item is billed.
+ sig { returns(String) }
+ attr_accessor :customer
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemService::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceItemService::CreateParams::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceItemService::CreateParams::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceItemService::CreateParams::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :tax_rates
+ # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), customer: String, description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceItemService::CreateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemService::CreateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemService::CreateParams::Pricing), quantity: T.nilable(Integer), subscription: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T::Array[String]), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ invoice: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
+ sig {
+ params(params: T.any(::Stripe::InvoiceItemService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.
+ sig {
+ params(invoiceitem: String, params: T.any(::Stripe::InvoiceItemService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def delete(invoiceitem, params = {}, opts = {}); end
+
+ # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
+ sig {
+ params(params: T.any(::Stripe::InvoiceItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the invoice item with the given ID.
+ sig {
+ params(invoiceitem: String, params: T.any(::Stripe::InvoiceItemService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def retrieve(invoiceitem, params = {}, opts = {}); end
+
+ # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed.
+ sig {
+ params(invoiceitem: String, params: T.any(::Stripe::InvoiceItemService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem)
+ }
+ def update(invoiceitem, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/invoice_line_item_service.rbi b/rbi/stripe/services/invoice_line_item_service.rbi
new file mode 100644
index 00000000..89bc5266
--- /dev/null
+++ b/rbi/stripe/services/invoice_line_item_service.rbi
@@ -0,0 +1,259 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class InvoiceLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ sig { returns(::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount::TaxRateData) }
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig {
+ params(amount: Integer, tax_rate_data: ::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
+ }
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItemService::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItemService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceLineItemService::UpdateParams::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ ); end
+ end
+ # When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(invoice, params = {}, opts = {}); end
+
+ # Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
+ # so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
+ # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
+ # Updating an invoice's line item is only possible before the invoice is finalized.
+ sig {
+ params(invoice: String, line_item_id: String, params: T.any(::Stripe::InvoiceLineItemService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceLineItem)
+ }
+ def update(invoice, line_item_id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/invoice_payment_service.rbi b/rbi/stripe/services/invoice_payment_service.rbi
new file mode 100644
index 00000000..a6eaa237
--- /dev/null
+++ b/rbi/stripe/services/invoice_payment_service.rbi
@@ -0,0 +1,71 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class InvoicePaymentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Payment < Stripe::RequestParams
+ # Attribute for param field payment_intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # Attribute for param field type
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(payment_intent: T.nilable(String), type: String).void }
+ def initialize(payment_intent: nil, type: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field invoice
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Attribute for param field payment
+ sig { returns(T.nilable(::Stripe::InvoicePaymentService::ListParams::Payment)) }
+ attr_accessor :payment
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Attribute for param field status
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), limit: T.nilable(Integer), payment: T.nilable(::Stripe::InvoicePaymentService::ListParams::Payment), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ invoice: nil,
+ limit: nil,
+ payment: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
+ sig {
+ params(params: T.any(::Stripe::InvoicePaymentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the invoice payment with the given ID.
+ sig {
+ params(invoice_payment: String, params: T.any(::Stripe::InvoicePaymentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoicePayment)
+ }
+ def retrieve(invoice_payment, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/invoice_rendering_template_service.rbi b/rbi/stripe/services/invoice_rendering_template_service.rbi
new file mode 100644
index 00000000..6844d579
--- /dev/null
+++ b/rbi/stripe/services/invoice_rendering_template_service.rbi
@@ -0,0 +1,82 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class InvoiceRenderingTemplateService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Attribute for param field status
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field version
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :version
+ sig { params(expand: T.nilable(T::Array[String]), version: T.nilable(Integer)).void }
+ def initialize(expand: nil, version: nil); end
+ end
+ class ArchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UnarchiveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
+ sig {
+ params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateService::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def archive(template, params = {}, opts = {}); end
+
+ # List all templates, ordered by creation date, with the most recently created template appearing first.
+ sig {
+ params(params: T.any(::Stripe::InvoiceRenderingTemplateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.
+ sig {
+ params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def retrieve(template, params = {}, opts = {}); end
+
+ # Unarchive an invoice rendering template so it can be used on new Stripe objects again.
+ sig {
+ params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateService::UnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate)
+ }
+ def unarchive(template, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/invoice_service.rbi b/rbi/stripe/services/invoice_service.rbi
new file mode 100644
index 00000000..97f5e7cf
--- /dev/null
+++ b/rbi/stripe/services/invoice_service.rbi
@@ -0,0 +1,2920 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class InvoiceService < StripeService
+ attr_reader :line_items
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(installments: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(installments: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ sig {
+ params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ default_mandate: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ ); end
+ end
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page_size
+ sig { params(page_size: T.nilable(String)).void }
+ def initialize(page_size: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering::Pdf)) }
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :template_version
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData))
+ }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address
+ sig { returns(::Stripe::InvoiceService::UpdateParams::ShippingDetails::Address) }
+ attr_accessor :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension)
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::InvoiceService::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::Issuer)) }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering)) }
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingCost))))
+ }
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingDetails))))
+ }
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::InvoiceService::UpdateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::CustomField]))), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(T.nilable(T.any(String, Integer))), expand: T.nilable(T::Array[String]), footer: T.nilable(String), issuer: T.nilable(::Stripe::InvoiceService::UpdateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(T.nilable(String)), on_behalf_of: T.nilable(T.nilable(String)), payment_settings: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings), rendering: T.nilable(::Stripe::InvoiceService::UpdateParams::Rendering), shipping_cost: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingCost))), shipping_details: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::ShippingDetails))), statement_descriptor: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::UpdateParams::TransferData)))).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ custom_fields: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class DueDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # Only return invoices that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::InvoiceService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return invoices for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Attribute for param field due_date
+ sig { returns(T.nilable(T.any(::Stripe::InvoiceService::ListParams::DueDate, Integer))) }
+ attr_accessor :due_date
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return invoices for the subscription specified by this subscription ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ sig {
+ params(collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::InvoiceService::ListParams::Created, Integer)), customer: T.nilable(String), due_date: T.nilable(T.any(::Stripe::InvoiceService::ListParams::DueDate, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), subscription: T.nilable(String)).void
+ }
+ def initialize(
+ collection_method: nil,
+ created: nil,
+ customer: nil,
+ due_date: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ subscription: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class FromInvoice < Stripe::RequestParams
+ # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
+ sig { returns(String) }
+ attr_accessor :action
+ # The `id` of the invoice that will be cloned.
+ sig { returns(String) }
+ attr_accessor :invoice
+ sig { params(action: String, invoice: String).void }
+ def initialize(action: nil, invoice: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this invoice.
+ # Setting to false will prevent any selected plan from applying to a payment.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ # Installment configuration for payments attempted on this invoice (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(installments: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(installments: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_mandate
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ sig {
+ params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ default_mandate: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ ); end
+ end
+ class Rendering < Stripe::RequestParams
+ class Pdf < Stripe::RequestParams
+ # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ # Japanese locale and `letter` for customers with other locales.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page_size
+ sig { params(page_size: T.nilable(String)).void }
+ def initialize(page_size: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ # Invoice pdf rendering options
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::Rendering::Pdf)) }
+ attr_accessor :pdf
+ # ID of the invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :template
+ # The specific version of invoice rendering template to use for this invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :template_version
+ sig {
+ params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::InvoiceService::CreateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ class ShippingRateData < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
+ }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount))
+ }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ # The ID of the shipping rate to use for this order.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Parameters to create a new ad-hoc shipping rate for this order.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData))
+ }
+ attr_accessor :shipping_rate_data
+ sig {
+ params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData)).void
+ }
+ def initialize(shipping_rate: nil, shipping_rate_data: nil); end
+ end
+ class ShippingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address
+ sig { returns(::Stripe::InvoiceService::CreateParams::ShippingDetails::Address) }
+ attr_accessor :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension)
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::InvoiceService::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :auto_advance
+ # Settings for automatic tax lookup for this invoice.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :automatically_finalizes_at
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # The currency to create this invoice in. Defaults to that of `customer` if not specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # A list of up to 4 custom fields to be displayed on the invoice.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # The ID of the customer who will be billed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_tax_rates
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :due_date
+ # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :effective_at
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Footer to be displayed on the invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::FromInvoice)) }
+ attr_accessor :from_invoice
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::Issuer)) }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :pending_invoice_items_behavior
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::Rendering)) }
+ attr_accessor :rendering
+ # Settings for the cost of shipping for this invoice.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::ShippingDetails)) }
+ attr_accessor :shipping_details
+ # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::InvoiceService::CreateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), currency: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::CustomField]))), customer: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(Integer), expand: T.nilable(T::Array[String]), footer: T.nilable(String), from_invoice: T.nilable(::Stripe::InvoiceService::CreateParams::FromInvoice), issuer: T.nilable(::Stripe::InvoiceService::CreateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings), pending_invoice_items_behavior: T.nilable(String), rendering: T.nilable(::Stripe::InvoiceService::CreateParams::Rendering), shipping_cost: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::InvoiceService::CreateParams::ShippingDetails), statement_descriptor: T.nilable(String), subscription: T.nilable(String), transfer_data: T.nilable(::Stripe::InvoiceService::CreateParams::TransferData)).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ application_fee_amount: nil,
+ auto_advance: nil,
+ automatic_tax: nil,
+ automatically_finalizes_at: nil,
+ collection_method: nil,
+ currency: nil,
+ custom_fields: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ due_date: nil,
+ effective_at: nil,
+ expand: nil,
+ footer: nil,
+ from_invoice: nil,
+ issuer: nil,
+ metadata: nil,
+ number: nil,
+ on_behalf_of: nil,
+ payment_settings: nil,
+ pending_invoice_items_behavior: nil,
+ rendering: nil,
+ shipping_cost: nil,
+ shipping_details: nil,
+ statement_descriptor: nil,
+ subscription: nil,
+ transfer_data: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class AddLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount::TaxRateData) }
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig {
+ params(amount: Integer, tax_rate_data: ::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
+ }
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::Discount]))))
+ }
+ attr_accessor :discounts
+ # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoice_item
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::Discount]))), invoice_item: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Period), price_data: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::InvoiceService::AddLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoice_item: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :invoice_metadata
+ # The line items to add.
+ sig { returns(T::Array[::Stripe::InvoiceService::AddLinesParams::Line]) }
+ attr_accessor :lines
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::InvoiceService::AddLinesParams::Line]).void
+ }
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
+ end
+ class FinalizeInvoiceParams < Stripe::RequestParams
+ # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :auto_advance
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(auto_advance: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
+ def initialize(auto_advance: nil, expand: nil); end
+ end
+ class MarkUncollectibleParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class PayParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
+ #
+ # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :forgive
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :mandate
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :paid_out_of_band
+ # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ sig {
+ params(expand: T.nilable(T::Array[String]), forgive: T.nilable(T::Boolean), mandate: T.nilable(T.nilable(String)), off_session: T.nilable(T::Boolean), paid_out_of_band: T.nilable(T::Boolean), payment_method: T.nilable(String), source: T.nilable(String)).void
+ }
+ def initialize(
+ expand: nil,
+ forgive: nil,
+ mandate: nil,
+ off_session: nil,
+ paid_out_of_band: nil,
+ payment_method: nil,
+ source: nil
+ ); end
+ end
+ class RemoveLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
+ sig { returns(String) }
+ attr_accessor :behavior
+ # ID of an existing line item to remove from this invoice.
+ sig { returns(String) }
+ attr_accessor :id
+ sig { params(behavior: String, id: String).void }
+ def initialize(behavior: nil, id: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :invoice_metadata
+ # The line items to remove.
+ sig { returns(T::Array[::Stripe::InvoiceService::RemoveLinesParams::Line]) }
+ attr_accessor :lines
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::InvoiceService::RemoveLinesParams::Line]).void
+ }
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
+ end
+ class SendInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateLinesParams < Stripe::RequestParams
+ class Line < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class ProductData < Stripe::RequestParams
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ images: nil,
+ metadata: nil,
+ name: nil,
+ tax_code: nil
+ ); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData::ProductData))
+ }
+ attr_accessor :product_data
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ product_data: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Pricing < Stripe::RequestParams
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ sig { params(price: T.nilable(String)).void }
+ def initialize(price: nil); end
+ end
+ class TaxAmount < Stripe::RequestParams
+ class TaxRateData < Stripe::RequestParams
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The level of the jurisdiction that imposes this tax rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction_level
+ # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ country: nil,
+ description: nil,
+ display_name: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ jurisdiction_level: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # The amount, in cents (or local equivalent), of the tax.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Data to find or create a TaxRate object.
+ #
+ # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount::TaxRateData) }
+ attr_accessor :tax_rate_data
+ # The reasoning behind this tax, for example, if the product is tax exempt.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_reason
+ # The amount on which tax is calculated, in cents (or local equivalent).
+ sig { returns(Integer) }
+ attr_accessor :taxable_amount
+ sig {
+ params(amount: Integer, tax_rate_data: ::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
+ }
+ def initialize(
+ amount: nil,
+ tax_rate_data: nil,
+ taxability_reason: nil,
+ taxable_amount: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::Discount]))))
+ }
+ attr_accessor :discounts
+ # ID of an existing line item on the invoice.
+ sig { returns(String) }
+ attr_accessor :id
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Period)) }
+ attr_accessor :period
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData)) }
+ attr_accessor :price_data
+ # The pricing information for the invoice item.
+ sig { returns(T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Pricing)) }
+ attr_accessor :pricing
+ # Non-negative integer. The quantity of units for the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount]))))
+ }
+ attr_accessor :tax_amounts
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::Discount]))), id: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Period), price_data: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::InvoiceService::UpdateLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ period: nil,
+ price_data: nil,
+ pricing: nil,
+ quantity: nil,
+ tax_amounts: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :invoice_metadata
+ # The line items to update.
+ sig { returns(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line]) }
+ attr_accessor :lines
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line]).void
+ }
+ def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
+ end
+ class VoidInvoiceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreatePreviewParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Customer shipping address.
+ sig {
+ returns(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping::Address)
+ }
+ attr_accessor :address
+ # Customer name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Customer phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :ip_address
+ sig { params(ip_address: T.nilable(T.nilable(String))).void }
+ def initialize(ip_address: nil); end
+ end
+ class TaxId < Stripe::RequestParams
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(type: String, value: String).void }
+ def initialize(type: nil, value: nil); end
+ end
+ # The customer's address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Address))))
+ }
+ attr_accessor :address
+ # The customer's shipping information. Appears on invoices emailed to this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping))))
+ }
+ attr_accessor :shipping
+ # Tax details about the customer.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Tax))
+ }
+ attr_accessor :tax
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :tax_exempt
+ # The customer's tax IDs.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::TaxId]))
+ }
+ attr_accessor :tax_ids
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Address))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping))), tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), tax_ids: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::TaxId])).void
+ }
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class Period < Stripe::RequestParams
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :end
+ # The start of the period. This value is inclusive.
+ sig { returns(Integer) }
+ attr_accessor :start
+ sig { params(end_: Integer, start: Integer).void }
+ def initialize(end_: nil, start: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :discountable
+ # The coupons to redeem into discounts for the invoice item in the preview.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount]))))
+ }
+ attr_accessor :discounts
+ # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :invoiceitem
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Period))
+ }
+ attr_accessor :period
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Non-negative integer. The quantity of units for the invoice item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount]))), invoiceitem: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ discountable: nil,
+ discounts: nil,
+ invoiceitem: nil,
+ metadata: nil,
+ period: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ tax_rates: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class ScheduleDetails < Stripe::RequestParams
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ sig {
+ returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item])
+ }
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData))
+ }
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :trial_end
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ ); end
+ end
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :end_behavior
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]))
+ }
+ attr_accessor :phases
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(end_behavior: nil, phases: nil, proration_behavior: nil); end
+ end
+ class SubscriptionDetails < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Subscription item to update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) }
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_at_period_end
+ # This simulates the subscription being canceled or expired immediately.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_now
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # A list of up to 20 subscription items, each with an attached price.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]))
+ }
+ attr_accessor :items
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :resume_at
+ # Date a subscription is intended to start (can be future or past).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :start_date
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :trial_end
+ sig {
+ params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
+ }
+ def initialize(
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancel_now: nil,
+ default_tax_rates: nil,
+ items: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ resume_at: nil,
+ start_date: nil,
+ trial_end: nil
+ ); end
+ end
+ # Settings for automatic tax lookup for this invoice preview.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails)) }
+ attr_accessor :customer_details
+ # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
+ sig {
+ returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem]))
+ }
+ attr_accessor :invoice_items
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::Issuer)) }
+ attr_accessor :issuer
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preview_mode
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :schedule
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails)) }
+ attr_accessor :schedule_details
+ # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :subscription
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
+ sig { returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails)) }
+ attr_accessor :subscription_details
+ sig {
+ params(automatic_tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax), currency: T.nilable(String), customer: T.nilable(String), customer_details: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem]), issuer: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::Issuer), on_behalf_of: T.nilable(T.nilable(String)), preview_mode: T.nilable(String), schedule: T.nilable(String), schedule_details: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails), subscription: T.nilable(String), subscription_details: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails)).void
+ }
+ def initialize(
+ automatic_tax: nil,
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_items: nil,
+ issuer: nil,
+ on_behalf_of: nil,
+ preview_mode: nil,
+ schedule: nil,
+ schedule_details: nil,
+ subscription: nil,
+ subscription_details: nil
+ ); end
+ end
+ # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def add_lines(invoice, params = {}, opts = {}); end
+
+ # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
+ sig {
+ params(params: T.any(::Stripe::InvoiceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def create(params = {}, opts = {}); end
+
+ # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
+ #
+ # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
+ #
+ # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
+ #
+ # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
+ sig {
+ params(params: T.any(::Stripe::InvoiceService::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def create_preview(params = {}, opts = {}); end
+
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def delete(invoice, params = {}, opts = {}); end
+
+ # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def finalize_invoice(invoice, params = {}, opts = {}); end
+
+ # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
+ sig {
+ params(params: T.any(::Stripe::InvoiceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def mark_uncollectible(invoice, params = {}, opts = {}); end
+
+ # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def pay(invoice, params = {}, opts = {}); end
+
+ # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def remove_lines(invoice, params = {}, opts = {}); end
+
+ # Retrieves the invoice with the given ID.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def retrieve(invoice, params = {}, opts = {}); end
+
+ # Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::InvoiceService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
+ #
+ # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def send_invoice(invoice, params = {}, opts = {}); end
+
+ # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
+ # monetary values, as well as collection_method, become uneditable.
+ #
+ # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
+ # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
+ # auto_advance=false.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def update(invoice, params = {}, opts = {}); end
+
+ # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def update_lines(invoice, params = {}, opts = {}); end
+
+ # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
+ #
+ # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
+ sig {
+ params(invoice: String, params: T.any(::Stripe::InvoiceService::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
+ }
+ def void_invoice(invoice, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/authorization_service.rbi b/rbi/stripe/services/issuing/authorization_service.rbi
new file mode 100644
index 00000000..d3f679e8
--- /dev/null
+++ b/rbi/stripe/services/issuing/authorization_service.rbi
@@ -0,0 +1,146 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class AuthorizationService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return authorizations that belong to the given card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :card
+ # Only return authorizations that belong to the given cardholder.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # Only return authorizations that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::AuthorizationService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(card: T.nilable(String), cardholder: T.nilable(String), created: T.nilable(T.any(::Stripe::Issuing::AuthorizationService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class ApproveParams < Stripe::RequestParams
+ # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(amount: nil, expand: nil, metadata: nil); end
+ end
+ class DeclineParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def approve(authorization, params = {}, opts = {}); end
+
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def decline(authorization, params = {}, opts = {}); end
+
+ # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::AuthorizationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an Issuing Authorization object.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def retrieve(authorization, params = {}, opts = {}); end
+
+ # Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def update(authorization, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/card_service.rbi b/rbi/stripe/services/issuing/card_service.rbi
new file mode 100644
index 00000000..a7a50765
--- /dev/null
+++ b/rbi/stripe/services/issuing/card_service.rbi
@@ -0,0 +1,495 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class CardService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return cards belonging to the Cardholder with the provided ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # Only return cards that were issued during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::CardService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Only return cards that have the given expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_month
+ # Only return cards that have the given expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_year
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return cards that have the given last four digits.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last4
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Attribute for param field personalization_design
+ sig { returns(T.nilable(String)) }
+ attr_accessor :personalization_design
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return cards that have the given type. One of `virtual` or `physical`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(cardholder: T.nilable(String), created: T.nilable(T.any(::Stripe::Issuing::CardService::ListParams::Created, Integer)), ending_before: T.nilable(String), exp_month: T.nilable(Integer), exp_year: T.nilable(Integer), expand: T.nilable(T::Array[String]), last4: T.nilable(String), limit: T.nilable(Integer), personalization_design: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ exp_month: nil,
+ exp_year: nil,
+ expand: nil,
+ last4: nil,
+ limit: nil,
+ personalization_design: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :encrypted_number
+ sig { params(encrypted_number: T.nilable(String)).void }
+ def initialize(encrypted_number: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ sig { returns(String) }
+ attr_accessor :mode
+ sig { params(mode: String).void }
+ def initialize(mode: nil); end
+ end
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :eori_number
+ sig { params(eori_number: T.nilable(String)).void }
+ def initialize(eori_number: nil); end
+ end
+ # The address that the card is shipped to.
+ sig { returns(::Stripe::Issuing::CardService::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # Address validation settings.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardService::CreateParams::Shipping::AddressValidation))
+ }
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardService::CreateParams::Shipping::Customs))
+ }
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ sig { returns(String) }
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_signature
+ # Shipment service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service
+ # Packaging options.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(address: ::Stripe::Issuing::CardService::CreateParams::Shipping::Address, address_validation: T.nilable(::Stripe::Issuing::CardService::CreateParams::Shipping::AddressValidation), customs: T.nilable(::Stripe::Issuing::CardService::CreateParams::Shipping::Customs), name: String, phone_number: T.nilable(String), require_signature: T.nilable(T::Boolean), service: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::CardService::CreateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::CardService::CreateParams::SpendingControls::SpendingLimit])).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ ); end
+ end
+ # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # The currency for the card.
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field financial_account
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The personalization design object belonging to this card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :personalization_design
+ # The desired PIN for this card.
+ sig { returns(T.nilable(::Stripe::Issuing::CardService::CreateParams::Pin)) }
+ attr_accessor :pin
+ # The card this is meant to be a replacement for (if any).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :replacement_for
+ # If `replacement_for` is specified, this should indicate why that card is being replaced.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :replacement_reason
+ # The second line to print on the card. Max length: 24 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :second_line
+ # The address where the card will be shipped.
+ sig { returns(T.nilable(::Stripe::Issuing::CardService::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(::Stripe::Issuing::CardService::CreateParams::SpendingControls)) }
+ attr_accessor :spending_controls
+ # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # The type of card to issue. Possible values are `physical` or `virtual`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cardholder: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), financial_account: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), personalization_design: T.nilable(String), pin: T.nilable(::Stripe::Issuing::CardService::CreateParams::Pin), replacement_for: T.nilable(String), replacement_reason: T.nilable(String), second_line: T.nilable(T.nilable(String)), shipping: T.nilable(::Stripe::Issuing::CardService::CreateParams::Shipping), spending_controls: T.nilable(::Stripe::Issuing::CardService::CreateParams::SpendingControls), status: T.nilable(String), type: String).void
+ }
+ def initialize(
+ cardholder: nil,
+ currency: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ replacement_for: nil,
+ replacement_reason: nil,
+ second_line: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Pin < Stripe::RequestParams
+ # The card's desired new PIN, encrypted under Stripe's public key.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :encrypted_number
+ sig { params(encrypted_number: T.nilable(String)).void }
+ def initialize(encrypted_number: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressValidation < Stripe::RequestParams
+ # The address validation capabilities to use.
+ sig { returns(String) }
+ attr_accessor :mode
+ sig { params(mode: String).void }
+ def initialize(mode: nil); end
+ end
+ class Customs < Stripe::RequestParams
+ # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :eori_number
+ sig { params(eori_number: T.nilable(String)).void }
+ def initialize(eori_number: nil); end
+ end
+ # The address that the card is shipped to.
+ sig { returns(::Stripe::Issuing::CardService::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # Address validation settings.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardService::UpdateParams::Shipping::AddressValidation))
+ }
+ attr_accessor :address_validation
+ # Customs information for the shipment.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardService::UpdateParams::Shipping::Customs))
+ }
+ attr_accessor :customs
+ # The name printed on the shipping label when shipping the card.
+ sig { returns(String) }
+ attr_accessor :name
+ # Phone number of the recipient of the shipment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # Whether a signature is required for card delivery.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_signature
+ # Shipment service.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service
+ # Packaging options.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(address: ::Stripe::Issuing::CardService::UpdateParams::Shipping::Address, address_validation: T.nilable(::Stripe::Issuing::CardService::UpdateParams::Shipping::AddressValidation), customs: T.nilable(::Stripe::Issuing::CardService::UpdateParams::Shipping::Customs), name: String, phone_number: T.nilable(String), require_signature: T.nilable(T::Boolean), service: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ address_validation: nil,
+ customs: nil,
+ name: nil,
+ phone_number: nil,
+ require_signature: nil,
+ service: nil,
+ type: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::CardService::UpdateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::CardService::UpdateParams::SpendingControls::SpendingLimit])).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil
+ ); end
+ end
+ # Reason why the `status` of this card is `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Attribute for param field personalization_design
+ sig { returns(T.nilable(String)) }
+ attr_accessor :personalization_design
+ # The desired new PIN for this card.
+ sig { returns(T.nilable(::Stripe::Issuing::CardService::UpdateParams::Pin)) }
+ attr_accessor :pin
+ # Updated shipping information for the card.
+ sig { returns(T.nilable(::Stripe::Issuing::CardService::UpdateParams::Shipping)) }
+ attr_accessor :shipping
+ # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig { returns(T.nilable(::Stripe::Issuing::CardService::UpdateParams::SpendingControls)) }
+ attr_accessor :spending_controls
+ # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(cancellation_reason: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), personalization_design: T.nilable(String), pin: T.nilable(::Stripe::Issuing::CardService::UpdateParams::Pin), shipping: T.nilable(::Stripe::Issuing::CardService::UpdateParams::Shipping), spending_controls: T.nilable(::Stripe::Issuing::CardService::UpdateParams::SpendingControls), status: T.nilable(String)).void
+ }
+ def initialize(
+ cancellation_reason: nil,
+ expand: nil,
+ metadata: nil,
+ personalization_design: nil,
+ pin: nil,
+ shipping: nil,
+ spending_controls: nil,
+ status: nil
+ ); end
+ end
+ # Creates an Issuing Card object.
+ sig {
+ params(params: T.any(::Stripe::Issuing::CardService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::CardService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an Issuing Card object.
+ sig {
+ params(card: String, params: T.any(::Stripe::Issuing::CardService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def retrieve(card, params = {}, opts = {}); end
+
+ # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(card: String, params: T.any(::Stripe::Issuing::CardService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def update(card, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/cardholder_service.rbi b/rbi/stripe/services/issuing/cardholder_service.rbi
new file mode 100644
index 00000000..b5fdfc8e
--- /dev/null
+++ b/rbi/stripe/services/issuing/cardholder_service.rbi
@@ -0,0 +1,587 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class CardholderService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return cardholders that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::CardholderService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return cardholders that have the given email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return cardholders that have the given phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return cardholders that have the given type. One of `individual` or `company`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Issuing::CardholderService::ListParams::Created, Integer)), email: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), phone_number: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ email: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ phone_number: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The cardholder’s billing address.
+ sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Billing::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Issuing::CardholderService::CreateParams::Billing::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ sig { params(tax_id: T.nilable(String)).void }
+ def initialize(tax_id: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing::UserTermsAcceptance))
+ }
+ attr_accessor :user_terms_acceptance
+ sig {
+ params(user_terms_acceptance: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing::UserTermsAcceptance)).void
+ }
+ def initialize(user_terms_acceptance: nil); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::Dob))
+ }
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing), dob: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::Dob), first_name: T.nilable(String), last_name: T.nilable(String), verification: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::CardholderService::CreateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :spending_limits_currency
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::CardholderService::CreateParams::SpendingControls::SpendingLimit]), spending_limits_currency: T.nilable(String)).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ ); end
+ end
+ # The cardholder's billing address.
+ sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Billing) }
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Company)) }
+ attr_accessor :company
+ # The cardholder's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
+ sig { returns(String) }
+ attr_accessor :name
+ # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::CreateParams::SpendingControls))
+ }
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(billing: ::Stripe::Issuing::CardholderService::CreateParams::Billing, company: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Company), email: T.nilable(String), expand: T.nilable(T::Array[String]), individual: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::Individual), metadata: T.nilable(T::Hash[String, String]), name: String, phone_number: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), spending_controls: T.nilable(::Stripe::Issuing::CardholderService::CreateParams::SpendingControls), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ name: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Billing < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(String) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(String) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: String, country: String, line1: String, line2: T.nilable(String), postal_code: String, state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The cardholder’s billing address.
+ sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::Billing::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Issuing::CardholderService::UpdateParams::Billing::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ class Company < Stripe::RequestParams
+ # The entity's business ID number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ sig { params(tax_id: T.nilable(String)).void }
+ def initialize(tax_id: nil); end
+ end
+ class Individual < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ class UserTermsAcceptance < Stripe::RequestParams
+ # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing::UserTermsAcceptance))
+ }
+ attr_accessor :user_terms_acceptance
+ sig {
+ params(user_terms_acceptance: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing::UserTermsAcceptance)).void
+ }
+ def initialize(user_terms_acceptance: nil); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # Information related to the card_issuing program for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Dob))
+ }
+ attr_accessor :dob
+ # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # Government-issued ID document for this cardholder.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing), dob: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Dob), first_name: T.nilable(String), last_name: T.nilable(String), verification: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ dob: nil,
+ first_name: nil,
+ last_name: nil,
+ verification: nil
+ ); end
+ end
+ class SpendingControls < Stripe::RequestParams
+ class SpendingLimit < Stripe::RequestParams
+ # Maximum amount allowed to spend per interval.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :categories
+ # Interval (or event) to which the amount applies.
+ sig { returns(String) }
+ attr_accessor :interval
+ sig {
+ params(amount: Integer, categories: T.nilable(T::Array[String]), interval: String).void
+ }
+ def initialize(amount: nil, categories: nil, interval: nil); end
+ end
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_categories
+ # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :allowed_merchant_countries
+ # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_categories
+ # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :blocked_merchant_countries
+ # Limit spending with amount-based rules that apply across this cardholder's cards.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls::SpendingLimit]))
+ }
+ attr_accessor :spending_limits
+ # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :spending_limits_currency
+ sig {
+ params(allowed_categories: T.nilable(T::Array[String]), allowed_merchant_countries: T.nilable(T::Array[String]), blocked_categories: T.nilable(T::Array[String]), blocked_merchant_countries: T.nilable(T::Array[String]), spending_limits: T.nilable(T::Array[::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls::SpendingLimit]), spending_limits_currency: T.nilable(String)).void
+ }
+ def initialize(
+ allowed_categories: nil,
+ allowed_merchant_countries: nil,
+ blocked_categories: nil,
+ blocked_merchant_countries: nil,
+ spending_limits: nil,
+ spending_limits_currency: nil
+ ); end
+ end
+ # The cardholder's billing address.
+ sig { returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Billing)) }
+ attr_accessor :billing
+ # Additional information about a `company` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Company)) }
+ attr_accessor :company
+ # The cardholder's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Additional information about an `individual` cardholder.
+ sig { returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual)) }
+ attr_accessor :individual
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone_number
+ # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :preferred_locales
+ # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls))
+ }
+ attr_accessor :spending_controls
+ # Specifies whether to permit authorizations on this cardholder's cards.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(billing: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Billing), company: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Company), email: T.nilable(String), expand: T.nilable(T::Array[String]), individual: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::Individual), metadata: T.nilable(T::Hash[String, String]), phone_number: T.nilable(String), preferred_locales: T.nilable(T::Array[String]), spending_controls: T.nilable(::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls), status: T.nilable(String)).void
+ }
+ def initialize(
+ billing: nil,
+ company: nil,
+ email: nil,
+ expand: nil,
+ individual: nil,
+ metadata: nil,
+ phone_number: nil,
+ preferred_locales: nil,
+ spending_controls: nil,
+ status: nil
+ ); end
+ end
+ # Creates a new Issuing Cardholder object that can be issued cards.
+ sig {
+ params(params: T.any(::Stripe::Issuing::CardholderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::CardholderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an Issuing Cardholder object.
+ sig {
+ params(cardholder: String, params: T.any(::Stripe::Issuing::CardholderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder)
+ }
+ def retrieve(cardholder, params = {}, opts = {}); end
+
+ # Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(cardholder: String, params: T.any(::Stripe::Issuing::CardholderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder)
+ }
+ def update(cardholder, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/dispute_service.rbi b/rbi/stripe/services/issuing/dispute_service.rbi
new file mode 100644
index 00000000..8b288676
--- /dev/null
+++ b/rbi/stripe/services/issuing/dispute_service.rbi
@@ -0,0 +1,707 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class DisputeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return Issuing disputes that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::DisputeService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Select Issuing disputes with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Select the Issuing dispute for the given transaction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Issuing::DisputeService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), transaction: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ transaction: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Boolean)))) }
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_policy_provided: T.nilable(T.nilable(T.any(String, T::Boolean))), cancellation_reason: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String))), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :original_transaction
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), card_statement: T.nilable(T.nilable(String)), cash_receipt: T.nilable(T.nilable(String)), check_image: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), original_transaction: T.nilable(String)).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ ); end
+ end
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer))), return_description: T.nilable(T.nilable(String)), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_reason: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ ); end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Canceled))))
+ }
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Duplicate))))
+ }
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Fraudulent))))
+ }
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::MerchandiseNotAsDescribed))))
+ }
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::NoValidAuthorization))))
+ }
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::NotReceived))))
+ }
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Other))))
+ }
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::ServiceNotAsDescribed))))
+ }
+ attr_accessor :service_not_as_described
+ sig {
+ params(canceled: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Canceled))), duplicate: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Duplicate))), fraudulent: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Fraudulent))), merchandise_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::MerchandiseNotAsDescribed))), no_valid_authorization: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::NoValidAuthorization))), not_received: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::NotReceived))), other: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::Other))), reason: T.nilable(String), service_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::CreateParams::Evidence::ServiceNotAsDescribed)))).void
+ }
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ ); end
+ end
+ class Treasury < Stripe::RequestParams
+ # The ID of the ReceivedDebit to initiate an Issuings dispute for.
+ sig { returns(String) }
+ attr_accessor :received_debit
+ sig { params(received_debit: String).void }
+ def initialize(received_debit: nil); end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ sig { returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence)) }
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction
+ # Params for disputes related to Treasury FinancialAccounts
+ sig { returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Treasury)) }
+ attr_accessor :treasury
+ sig {
+ params(amount: T.nilable(Integer), evidence: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), transaction: T.nilable(String), treasury: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Treasury)).void
+ }
+ def initialize(
+ amount: nil,
+ evidence: nil,
+ expand: nil,
+ metadata: nil,
+ transaction: nil,
+ treasury: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Evidence < Stripe::RequestParams
+ class Canceled < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Whether the cardholder was provided with a cancellation policy.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Boolean)))) }
+ attr_accessor :cancellation_policy_provided
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_policy_provided: T.nilable(T.nilable(T.any(String, T::Boolean))), cancellation_reason: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String))), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_policy_provided: nil,
+ cancellation_reason: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class Duplicate < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :card_statement
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cash_receipt
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :check_image
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :original_transaction
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), card_statement: T.nilable(T.nilable(String)), cash_receipt: T.nilable(T.nilable(String)), check_image: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), original_transaction: T.nilable(String)).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ card_statement: nil,
+ cash_receipt: nil,
+ check_image: nil,
+ explanation: nil,
+ original_transaction: nil
+ ); end
+ end
+ class Fraudulent < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class MerchandiseNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ # Description of the cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :return_description
+ # Result of cardholder's attempt to return the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :return_status
+ # Date when the product was returned or attempted to be returned.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :returned_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer))), return_description: T.nilable(T.nilable(String)), return_status: T.nilable(T.nilable(T.any(String, String))), returned_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ received_at: nil,
+ return_description: nil,
+ return_status: nil,
+ returned_at: nil
+ ); end
+ end
+ class NoValidAuthorization < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String))).void
+ }
+ def initialize(additional_documentation: nil, explanation: nil); end
+ end
+ class NotReceived < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when the cardholder expected to receive the product.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expected_at
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), expected_at: T.nilable(T.nilable(T.any(String, Integer))), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ expected_at: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class Other < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Description of the merchandise or service that was purchased.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Whether the product was a merchandise or service.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :product_type
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), product_description: T.nilable(T.nilable(String)), product_type: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ explanation: nil,
+ product_description: nil,
+ product_type: nil
+ ); end
+ end
+ class ServiceNotAsDescribed < Stripe::RequestParams
+ # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :additional_documentation
+ # Date when order was canceled.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :canceled_at
+ # Reason for canceling the order.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :cancellation_reason
+ # Explanation of why the cardholder is disputing this transaction.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :explanation
+ # Date when the product was received.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :received_at
+ sig {
+ params(additional_documentation: T.nilable(T.nilable(String)), canceled_at: T.nilable(T.nilable(T.any(String, Integer))), cancellation_reason: T.nilable(T.nilable(String)), explanation: T.nilable(T.nilable(String)), received_at: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ additional_documentation: nil,
+ canceled_at: nil,
+ cancellation_reason: nil,
+ explanation: nil,
+ received_at: nil
+ ); end
+ end
+ # Evidence provided when `reason` is 'canceled'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Canceled))))
+ }
+ attr_accessor :canceled
+ # Evidence provided when `reason` is 'duplicate'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Duplicate))))
+ }
+ attr_accessor :duplicate
+ # Evidence provided when `reason` is 'fraudulent'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Fraudulent))))
+ }
+ attr_accessor :fraudulent
+ # Evidence provided when `reason` is 'merchandise_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::MerchandiseNotAsDescribed))))
+ }
+ attr_accessor :merchandise_not_as_described
+ # Evidence provided when `reason` is 'no_valid_authorization'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NoValidAuthorization))))
+ }
+ attr_accessor :no_valid_authorization
+ # Evidence provided when `reason` is 'not_received'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NotReceived))))
+ }
+ attr_accessor :not_received
+ # Evidence provided when `reason` is 'other'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Other))))
+ }
+ attr_accessor :other
+ # The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # Evidence provided when `reason` is 'service_not_as_described'.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::ServiceNotAsDescribed))))
+ }
+ attr_accessor :service_not_as_described
+ sig {
+ params(canceled: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Canceled))), duplicate: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Duplicate))), fraudulent: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Fraudulent))), merchandise_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::MerchandiseNotAsDescribed))), no_valid_authorization: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NoValidAuthorization))), not_received: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NotReceived))), other: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Other))), reason: T.nilable(String), service_not_as_described: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::DisputeService::UpdateParams::Evidence::ServiceNotAsDescribed)))).void
+ }
+ def initialize(
+ canceled: nil,
+ duplicate: nil,
+ fraudulent: nil,
+ merchandise_not_as_described: nil,
+ no_valid_authorization: nil,
+ not_received: nil,
+ other: nil,
+ reason: nil,
+ service_not_as_described: nil
+ ); end
+ end
+ # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Evidence provided for the dispute.
+ sig { returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence)) }
+ attr_accessor :evidence
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(amount: T.nilable(Integer), evidence: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil); end
+ end
+ class SubmitParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
+ sig {
+ params(params: T.any(::Stripe::Issuing::DisputeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::DisputeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an Issuing Dispute object.
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def retrieve(dispute, params = {}, opts = {}); end
+
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def submit(dispute, params = {}, opts = {}); end
+
+ # Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
+ sig {
+ params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
+ }
+ def update(dispute, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/personalization_design_service.rbi b/rbi/stripe/services/issuing/personalization_design_service.rbi
new file mode 100644
index 00000000..ae13114f
--- /dev/null
+++ b/rbi/stripe/services/issuing/personalization_design_service.rbi
@@ -0,0 +1,243 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class PersonalizationDesignService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Preferences < Stripe::RequestParams
+ # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_default
+ # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_platform_default
+ sig {
+ params(is_default: T.nilable(T::Boolean), is_platform_default: T.nilable(T::Boolean)).void
+ }
+ def initialize(is_default: nil, is_platform_default: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return personalization designs with the given lookup keys.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :lookup_keys
+ # Only return personalization designs with the given preferences.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesignService::ListParams::Preferences))
+ }
+ attr_accessor :preferences
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return personalization designs with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), lookup_keys: T.nilable(T::Array[String]), preferences: T.nilable(::Stripe::Issuing::PersonalizationDesignService::ListParams::Preferences), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ preferences: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_title
+ sig {
+ params(footer_body: T.nilable(T.nilable(String)), footer_title: T.nilable(T.nilable(String)), header_body: T.nilable(T.nilable(String)), header_title: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ footer_body: nil,
+ footer_title: nil,
+ header_body: nil,
+ header_title: nil
+ ); end
+ end
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ sig { returns(T::Boolean) }
+ attr_accessor :is_default
+ sig { params(is_default: T::Boolean).void }
+ def initialize(is_default: nil); end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesignService::CreateParams::CarrierText))
+ }
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Friendly display name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ sig { returns(String) }
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesignService::CreateParams::Preferences))
+ }
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ sig {
+ params(card_logo: T.nilable(String), carrier_text: T.nilable(::Stripe::Issuing::PersonalizationDesignService::CreateParams::CarrierText), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(String), physical_bundle: String, preferences: T.nilable(::Stripe::Issuing::PersonalizationDesignService::CreateParams::Preferences), transfer_lookup_key: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CarrierText < Stripe::RequestParams
+ # The footer body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_body
+ # The footer title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer_title
+ # The header body text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_body
+ # The header title text of the carrier letter.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header_title
+ sig {
+ params(footer_body: T.nilable(T.nilable(String)), footer_title: T.nilable(T.nilable(String)), header_body: T.nilable(T.nilable(String)), header_title: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ footer_body: nil,
+ footer_title: nil,
+ header_body: nil,
+ header_title: nil
+ ); end
+ end
+ class Preferences < Stripe::RequestParams
+ # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ sig { returns(T::Boolean) }
+ attr_accessor :is_default
+ sig { params(is_default: T::Boolean).void }
+ def initialize(is_default: nil); end
+ end
+ # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :card_logo
+ # Hash containing carrier text, for use with physical bundles that support carrier text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::PersonalizationDesignService::UpdateParams::CarrierText))))
+ }
+ attr_accessor :carrier_text
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Friendly display name. Providing an empty string will set the field to null.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # The physical bundle object belonging to this personalization design.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :physical_bundle
+ # Information on whether this personalization design is used to create cards when one is not specified.
+ sig {
+ returns(T.nilable(::Stripe::Issuing::PersonalizationDesignService::UpdateParams::Preferences))
+ }
+ attr_accessor :preferences
+ # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ sig {
+ params(card_logo: T.nilable(T.nilable(String)), carrier_text: T.nilable(T.nilable(T.any(String, ::Stripe::Issuing::PersonalizationDesignService::UpdateParams::CarrierText))), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(T.nilable(String)), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(T.nilable(String)), physical_bundle: T.nilable(String), preferences: T.nilable(::Stripe::Issuing::PersonalizationDesignService::UpdateParams::Preferences), transfer_lookup_key: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ card_logo: nil,
+ carrier_text: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ name: nil,
+ physical_bundle: nil,
+ preferences: nil,
+ transfer_lookup_key: nil
+ ); end
+ end
+ # Creates a personalization design object.
+ sig {
+ params(params: T.any(::Stripe::Issuing::PersonalizationDesignService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::PersonalizationDesignService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a personalization design object.
+ sig {
+ params(personalization_design: String, params: T.any(::Stripe::Issuing::PersonalizationDesignService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def retrieve(personalization_design, params = {}, opts = {}); end
+
+ # Updates a card personalization object.
+ sig {
+ params(personalization_design: String, params: T.any(::Stripe::Issuing::PersonalizationDesignService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def update(personalization_design, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/physical_bundle_service.rbi b/rbi/stripe/services/issuing/physical_bundle_service.rbi
new file mode 100644
index 00000000..728cce97
--- /dev/null
+++ b/rbi/stripe/services/issuing/physical_bundle_service.rbi
@@ -0,0 +1,59 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class PhysicalBundleService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return physical bundles with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Only return physical bundles with the given type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::PhysicalBundleService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a physical bundle object.
+ sig {
+ params(physical_bundle: String, params: T.any(::Stripe::Issuing::PhysicalBundleService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PhysicalBundle)
+ }
+ def retrieve(physical_bundle, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/token_service.rbi b/rbi/stripe/services/issuing/token_service.rbi
new file mode 100644
index 00000000..06c8bacb
--- /dev/null
+++ b/rbi/stripe/services/issuing/token_service.rbi
@@ -0,0 +1,99 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class TokenService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # The Issuing card identifier to list tokens for.
+ sig { returns(String) }
+ attr_accessor :card
+ # Only return Issuing tokens that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::TokenService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Select Issuing tokens with the given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(card: String, created: T.nilable(T.any(::Stripe::Issuing::TokenService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ card: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Specifies which status the token should be updated to.
+ sig { returns(String) }
+ attr_accessor :status
+ sig { params(expand: T.nilable(T::Array[String]), status: String).void }
+ def initialize(expand: nil, status: nil); end
+ end
+ # Lists all Issuing Token objects for a given card.
+ sig {
+ params(params: T.any(::Stripe::Issuing::TokenService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an Issuing Token object.
+ sig {
+ params(token: String, params: T.any(::Stripe::Issuing::TokenService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Token)
+ }
+ def retrieve(token, params = {}, opts = {}); end
+
+ # Attempts to update the specified Issuing Token object to the status specified.
+ sig {
+ params(token: String, params: T.any(::Stripe::Issuing::TokenService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Token)
+ }
+ def update(token, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing/transaction_service.rbi b/rbi/stripe/services/issuing/transaction_service.rbi
new file mode 100644
index 00000000..aa56fd3a
--- /dev/null
+++ b/rbi/stripe/services/issuing/transaction_service.rbi
@@ -0,0 +1,105 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Issuing
+ class TransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return transactions that belong to the given card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :card
+ # Only return transactions that belong to the given cardholder.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cardholder
+ # Only return transactions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Issuing::TransactionService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return transactions that have the given type. One of `capture` or `refund`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(card: T.nilable(String), cardholder: T.nilable(String), created: T.nilable(T.any(::Stripe::Issuing::TransactionService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ card: nil,
+ cardholder: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Issuing::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an Issuing Transaction object.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::Issuing::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction)
+ }
+ def retrieve(transaction, params = {}, opts = {}); end
+
+ # Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::Issuing::TransactionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction)
+ }
+ def update(transaction, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/issuing_service.rbi b/rbi/stripe/services/issuing_service.rbi
new file mode 100644
index 00000000..bb057335
--- /dev/null
+++ b/rbi/stripe/services/issuing_service.rbi
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class IssuingService < StripeService
+ attr_reader :authorizations
+ attr_reader :cards
+ attr_reader :cardholders
+ attr_reader :disputes
+ attr_reader :personalization_designs
+ attr_reader :physical_bundles
+ attr_reader :tokens
+ attr_reader :transactions
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/mandate_service.rbi b/rbi/stripe/services/mandate_service.rbi
new file mode 100644
index 00000000..371baee3
--- /dev/null
+++ b/rbi/stripe/services/mandate_service.rbi
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class MandateService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieves a Mandate object.
+ sig {
+ params(mandate: String, params: T.any(::Stripe::MandateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Mandate)
+ }
+ def retrieve(mandate, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payment_intent_service.rbi b/rbi/stripe/services/payment_intent_service.rbi
new file mode 100644
index 00000000..4c7063a5
--- /dev/null
+++ b/rbi/stripe/services/payment_intent_service.rbi
@@ -0,0 +1,7759 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PaymentIntentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.
+ sig {
+ returns(T.nilable(T.any(::Stripe::PaymentIntentService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return PaymentIntents for the customer that this customer ID specifies.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::PaymentIntentService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this PaymentIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(allow_redirects: T.nilable(String), enabled: T::Boolean).void }
+ def initialize(allow_redirects: nil, enabled: nil); end
+ end
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :user_agent
+ sig { params(ip_address: String, user_agent: String).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig {
+ returns(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance)
+ }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: ::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), reference: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(code: T.nilable(String), setup_future_usage: T.nilable(T.nilable(String))).void
+ }
+ def initialize(code: nil, setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(String) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(String) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(String) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: String, electronic_commerce_indicator: T.nilable(String), exemption_indicator: T.nilable(String), network_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: String, version: String).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), cvc_token: T.nilable(String), installments: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments), mandate_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), require_cvc_recollection: T.nilable(T::Boolean), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), statement_descriptor_suffix_kana: T.nilable(T.nilable(String)), statement_descriptor_suffix_kanji: T.nilable(T.nilable(String)), three_d_secure: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requested_priority
+ sig { params(requested_priority: T.nilable(String)).void }
+ def initialize(requested_priority: nil); end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent::Routing))
+ }
+ attr_accessor :routing
+ sig {
+ params(request_extended_authorization: T.nilable(T::Boolean), request_incremental_authorization_support: T.nilable(T::Boolean), routing: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent::Routing)).void
+ }
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(confirmation_number: T.nilable(T.nilable(String)), expires_after_days: T.nilable(T.nilable(T.any(String, Integer))), expires_at: T.nilable(T.nilable(T.any(String, Integer))), product_description: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), persistent_token: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_seconds: T.nilable(Integer), expires_at: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(reference: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(reference: nil, setup_future_usage: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks), preferred_settlement_speed: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Affirm))))
+ }
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AfterpayClearpay))))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alipay))))
+ }
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alma))))
+ }
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AmazonPay))))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AuBecsDebit))))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit))))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Blik))))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Boleto))))
+ }
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent))))
+ }
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp))))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Eps))))
+ }
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Fpx))))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Giropay))))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Grabpay))))
+ }
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Ideal))))
+ }
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::InteracPresent))))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KakaoPay))))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna))))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KrCard))))
+ }
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Link))))
+ }
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Mobilepay))))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Multibanco))))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NaverPay))))
+ }
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NzBankAccount))))
+ }
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Oxxo))))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::P24))))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::PayByBank))))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payco))))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paynow))))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal))))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Pix))))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Promptpay))))
+ }
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::RevolutPay))))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SamsungPay))))
+ }
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Sofort))))
+ }
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Swish))))
+ }
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Twint))))
+ }
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::WechatPay))))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Zip))))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Bancontact))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SamsungPay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Zip)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::PaymentIntentService::CreateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::PaymentIntentService::CreateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ # The amount is capped at the total transaction amount and if no amount is set,
+ # the full amount is transferred.
+ #
+ # If you intend to collect a fee and you need a more robust reporting experience, using
+ # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount)
+ # might be a better fit for your integration.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::AutomaticPaymentMethods))
+ }
+ attr_accessor :automatic_payment_methods
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :confirm
+ # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mandate
+ # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(T.any(T::Boolean, String))) }
+ attr_accessor :off_session
+ # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent.
+ #
+ # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :receipt_email
+ # 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. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::Shipping)) }
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a Transfer.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(amount: Integer, application_fee_amount: T.nilable(Integer), automatic_payment_methods: T.nilable(::Stripe::PaymentIntentService::CreateParams::AutomaticPaymentMethods), capture_method: T.nilable(String), confirm: T.nilable(T::Boolean), confirmation_method: T.nilable(String), confirmation_token: T.nilable(String), currency: String, customer: T.nilable(String), description: T.nilable(String), error_on_requires_action: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), mandate: T.nilable(String), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::CreateParams::MandateData))), metadata: T.nilable(T::Hash[String, String]), off_session: T.nilable(T.any(T::Boolean, String)), on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), radar_options: T.nilable(::Stripe::PaymentIntentService::CreateParams::RadarOptions), receipt_email: T.nilable(String), return_url: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::PaymentIntentService::CreateParams::Shipping), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::CreateParams::TransferData), transfer_group: T.nilable(String), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ automatic_payment_methods: nil,
+ capture_method: nil,
+ confirm: nil,
+ confirmation_method: nil,
+ confirmation_token: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_secret
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(client_secret: T.nilable(String), expand: T.nilable(T::Array[String])).void }
+ def initialize(client_secret: nil, expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), reference: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(code: T.nilable(String), setup_future_usage: T.nilable(T.nilable(String))).void
+ }
+ def initialize(code: nil, setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(String) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(String) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(String) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: String, electronic_commerce_indicator: T.nilable(String), exemption_indicator: T.nilable(String), network_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: String, version: String).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), cvc_token: T.nilable(String), installments: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments), mandate_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), require_cvc_recollection: T.nilable(T::Boolean), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), statement_descriptor_suffix_kana: T.nilable(T.nilable(String)), statement_descriptor_suffix_kanji: T.nilable(T.nilable(String)), three_d_secure: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requested_priority
+ sig { params(requested_priority: T.nilable(String)).void }
+ def initialize(requested_priority: nil); end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent::Routing))
+ }
+ attr_accessor :routing
+ sig {
+ params(request_extended_authorization: T.nilable(T::Boolean), request_incremental_authorization_support: T.nilable(T::Boolean), routing: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent::Routing)).void
+ }
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(confirmation_number: T.nilable(T.nilable(String)), expires_after_days: T.nilable(T.nilable(T.any(String, Integer))), expires_at: T.nilable(T.nilable(T.any(String, Integer))), product_description: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), persistent_token: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_seconds: T.nilable(Integer), expires_at: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(reference: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(reference: nil, setup_future_usage: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks), preferred_settlement_speed: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Affirm))))
+ }
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AfterpayClearpay))))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alipay))))
+ }
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alma))))
+ }
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AmazonPay))))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AuBecsDebit))))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit))))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Blik))))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Boleto))))
+ }
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent))))
+ }
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp))))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Eps))))
+ }
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Fpx))))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Giropay))))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Grabpay))))
+ }
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Ideal))))
+ }
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::InteracPresent))))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KakaoPay))))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna))))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KrCard))))
+ }
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Link))))
+ }
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Mobilepay))))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Multibanco))))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NaverPay))))
+ }
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NzBankAccount))))
+ }
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Oxxo))))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::P24))))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::PayByBank))))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payco))))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paynow))))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal))))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Pix))))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Promptpay))))
+ }
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::RevolutPay))))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SamsungPay))))
+ }
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Sofort))))
+ }
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Swish))))
+ }
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Twint))))
+ }
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::WechatPay))))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Zip))))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Bancontact))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SamsungPay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Zip)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::PaymentIntentService::UpdateParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::PaymentIntentService::UpdateParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :application_fee_amount
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the Customer this PaymentIntent belongs to, if one exists.
+ #
+ # Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ #
+ # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment-method-specific configuration for this PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :receipt_email
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), capture_method: T.nilable(String), currency: T.nilable(String), customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), receipt_email: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::UpdateParams::Shipping))), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::UpdateParams::TransferData), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ capture_method: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ receipt_email: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil,
+ transfer_group: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class ApplyCustomerBalanceParams < Stripe::RequestParams
+ # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter.
+ #
+ # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent.
+ #
+ # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amount: nil, currency: nil, expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(cancellation_reason: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(cancellation_reason: nil, expand: nil); end
+ end
+ class CaptureParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_to_capture
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :final_capture
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # The parameters that you can use to automatically create a transfer after the payment
+ # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::CaptureParams::TransferData)) }
+ attr_accessor :transfer_data
+ sig {
+ params(amount_to_capture: T.nilable(Integer), application_fee_amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), final_capture: T.nilable(T::Boolean), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::CaptureParams::TransferData)).void
+ }
+ def initialize(
+ amount_to_capture: nil,
+ application_fee_amount: nil,
+ expand: nil,
+ final_capture: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_data: nil
+ ); end
+ end
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig { params(ip_address: T.nilable(String), user_agent: T.nilable(String)).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance))
+ }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance)).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class Affirm < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Affirm authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ # This field differs from the statement descriptor and item name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), reference: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(code: T.nilable(String), setup_future_usage: T.nilable(T.nilable(String))).void
+ }
+ def initialize(code: nil, setup_future_usage: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Installments < Stripe::RequestParams
+ class Plan < Stripe::RequestParams
+ # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :count
+ # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ # One of `month`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Type of installment plan, one of `fixed_count`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
+ }
+ def initialize(count: nil, interval: nil, type: nil); end
+ end
+ # Setting to true enables installments for this PaymentIntent.
+ # This will cause the response to contain a list of available installment plans.
+ # Setting to false will prevent any selected plan from applying to a charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # The selected installment plan to use for this payment attempt.
+ # This parameter can only be provided during confirmation.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan))))
+ }
+ attr_accessor :plan
+ sig {
+ params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan)))).void
+ }
+ def initialize(enabled: nil, plan: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(String) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :exemption_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(String) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(String) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: String, electronic_commerce_indicator: T.nilable(String), exemption_indicator: T.nilable(String), network_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: String, version: String).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ exemption_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_token
+ # Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ #
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments))
+ }
+ attr_accessor :installments
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter indicates that a transaction will be marked
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_incremental_authorization
+ # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_multicapture
+ # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_overcapture
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :require_cvc_recollection
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kana
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix_kanji
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this payment.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), cvc_token: T.nilable(String), installments: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments), mandate_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_extended_authorization: T.nilable(String), request_incremental_authorization: T.nilable(String), request_multicapture: T.nilable(String), request_overcapture: T.nilable(String), request_three_d_secure: T.nilable(String), require_cvc_recollection: T.nilable(T::Boolean), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), statement_descriptor_suffix_kana: T.nilable(T.nilable(String)), statement_descriptor_suffix_kanji: T.nilable(T.nilable(String)), three_d_secure: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ capture_method: nil,
+ cvc_token: nil,
+ installments: nil,
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_extended_authorization: nil,
+ request_incremental_authorization: nil,
+ request_multicapture: nil,
+ request_overcapture: nil,
+ request_three_d_secure: nil,
+ require_cvc_recollection: nil,
+ setup_future_usage: nil,
+ statement_descriptor_suffix_kana: nil,
+ statement_descriptor_suffix_kanji: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+ class Routing < Stripe::RequestParams
+ # Routing requested priority
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requested_priority
+ sig { params(requested_priority: T.nilable(String)).void }
+ def initialize(requested_priority: nil); end
+ end
+ # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_extended_authorization
+ # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :request_incremental_authorization_support
+ # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent::Routing))
+ }
+ attr_accessor :routing
+ sig {
+ params(request_extended_authorization: T.nilable(T::Boolean), request_incremental_authorization_support: T.nilable(T::Boolean), routing: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent::Routing)).void
+ }
+ def initialize(
+ request_extended_authorization: nil,
+ request_incremental_authorization_support: nil,
+ routing: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for the eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ #
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested_address_types
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), requested_address_types: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Preferred language of the Klarna authorization page that the customer is redirected to
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :confirmation_number
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_after_days
+ # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :expires_at
+ # A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :product_description
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(confirmation_number: T.nilable(T.nilable(String)), expires_after_days: T.nilable(T.nilable(T.any(String, Integer))), expires_at: T.nilable(T.nilable(T.any(String, Integer))), product_description: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(
+ confirmation_number: nil,
+ expires_after_days: nil,
+ expires_at: nil,
+ product_description: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class KrCard < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Link < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), persistent_token: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class NaverPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(setup_future_usage: nil, target_date: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_days
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_days: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_days: nil, setup_future_usage: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Confirm that the payer has accepted the P24 terms and conditions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(setup_future_usage: T.nilable(String), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_locale
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :risk_correlation_id
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), preferred_locale: T.nilable(String), reference: T.nilable(String), risk_correlation_id: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(
+ capture_method: nil,
+ preferred_locale: nil,
+ reference: nil,
+ risk_correlation_id: nil,
+ setup_future_usage: nil
+ ); end
+ end
+ class Pix < Stripe::RequestParams
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_after_seconds
+ # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(expires_after_seconds: T.nilable(Integer), expires_at: T.nilable(Integer), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(capture_method: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(capture_method: nil, setup_future_usage: nil); end
+ end
+ class SamsungPay < Stripe::RequestParams
+ # Controls when the funds are captured from the customer's account.
+ #
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ #
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :capture_method
+ sig { params(capture_method: T.nilable(T.nilable(String))).void }
+ def initialize(capture_method: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ sig {
+ params(mandate_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Language shown to the payer on redirect.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_language
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(preferred_language: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(preferred_language: nil, setup_future_usage: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ # A reference for this payment to be displayed in the Swish app.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(reference: T.nilable(T.nilable(String)), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(reference: nil, setup_future_usage: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Preferred transaction settlement speed
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred_settlement_speed
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :target_date
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), preferred_settlement_speed: T.nilable(T.nilable(T.any(String, String))), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), target_date: T.nilable(String), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ preferred_settlement_speed: nil,
+ setup_future_usage: nil,
+ target_date: nil,
+ verification_method: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :app_id
+ # The client type that the end customer will pay from
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig {
+ params(app_id: T.nilable(String), client: T.nilable(String), setup_future_usage: T.nilable(String)).void
+ }
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ sig { params(setup_future_usage: T.nilable(String)).void }
+ def initialize(setup_future_usage: nil); end
+ end
+ # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Affirm))))
+ }
+ attr_accessor :affirm
+ # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alipay))))
+ }
+ attr_accessor :alipay
+ # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alma))))
+ }
+ attr_accessor :alma
+ # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay))))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AuBecsDebit))))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit))))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Blik))))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Boleto))))
+ }
+ attr_accessor :boleto
+ # Configuration for any card payments attempted on this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent))))
+ }
+ attr_accessor :card_present
+ # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp))))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Eps))))
+ }
+ attr_accessor :eps
+ # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Fpx))))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Giropay))))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Grabpay))))
+ }
+ attr_accessor :grabpay
+ # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Ideal))))
+ }
+ attr_accessor :ideal
+ # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::InteracPresent))))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KakaoPay))))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna))))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KrCard))))
+ }
+ attr_accessor :kr_card
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Link))))
+ }
+ attr_accessor :link
+ # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Mobilepay))))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Multibanco))))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NaverPay))))
+ }
+ attr_accessor :naver_pay
+ # If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NzBankAccount))))
+ }
+ attr_accessor :nz_bank_account
+ # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Oxxo))))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::P24))))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::PayByBank))))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payco))))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paynow))))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal))))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Pix))))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Promptpay))))
+ }
+ attr_accessor :promptpay
+ # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::RevolutPay))))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SamsungPay))))
+ }
+ attr_accessor :samsung_pay
+ # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Sofort))))
+ }
+ attr_accessor :sofort
+ # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Swish))))
+ }
+ attr_accessor :swish
+ # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Twint))))
+ }
+ attr_accessor :twint
+ # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::WechatPay))))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Zip))))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit))), affirm: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Affirm))), afterpay_clearpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AfterpayClearpay))), alipay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alipay))), alma: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alma))), amazon_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay))), au_becs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AuBecsDebit))), bacs_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Bancontact))), blik: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Blik))), boleto: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Boleto))), card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card))), card_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent))), cashapp: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance))), eps: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Eps))), fpx: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Fpx))), giropay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Giropay))), grabpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Grabpay))), ideal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Ideal))), interac_present: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::InteracPresent))), kakao_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KakaoPay))), klarna: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Konbini))), kr_card: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KrCard))), link: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Link))), mobilepay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Mobilepay))), multibanco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Multibanco))), naver_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NaverPay))), nz_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NzBankAccount))), oxxo: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Oxxo))), p24: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::P24))), pay_by_bank: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::PayByBank))), payco: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payco))), paynow: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paynow))), paypal: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal))), pix: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Pix))), promptpay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Promptpay))), revolut_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::RevolutPay))), samsung_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SamsungPay))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit))), sofort: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Sofort))), swish: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Swish))), twint: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Twint))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount))), wechat_pay: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::WechatPay))), zip: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Zip)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ card_present: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::PaymentIntentService::ConfirmParams::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::PaymentIntentService::ConfirmParams::Shipping::Address, carrier: T.nilable(String), name: String, phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end
+ end
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # ID of the ConfirmationToken used to confirm this PaymentIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :error_on_requires_action
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of the mandate that's used for this payment.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :mandate
+ # Attribute for param field mandate_data
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
+ sig { returns(T.nilable(T.any(T::Boolean, String))) }
+ attr_accessor :off_session
+ # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ # property on the PaymentIntent.
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this PaymentIntent.
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ sig { returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :receipt_email
+ # 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ #
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
+ #
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
+ #
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
+ #
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::Shipping))))
+ }
+ attr_accessor :shipping
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(capture_method: T.nilable(String), confirmation_token: T.nilable(String), error_on_requires_action: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), mandate: T.nilable(String), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::MandateData))), off_session: T.nilable(T.any(T::Boolean, String)), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), radar_options: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::RadarOptions), receipt_email: T.nilable(T.nilable(String)), return_url: T.nilable(String), setup_future_usage: T.nilable(T.nilable(T.any(String, String))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::ConfirmParams::Shipping))), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ capture_method: nil,
+ confirmation_token: nil,
+ error_on_requires_action: nil,
+ expand: nil,
+ mandate: nil,
+ mandate_data: nil,
+ off_session: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ radar_options: nil,
+ receipt_email: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class IncrementAuthorizationParams < Stripe::RequestParams
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ sig { params(amount: T.nilable(Integer)).void }
+ def initialize(amount: nil); end
+ end
+ # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Text that appears on the customer's statement as the statement descriptor for a non-card or 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # The parameters used to automatically create a transfer after the payment is captured.
+ # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ sig {
+ returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(amount: Integer, application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData)).void
+ }
+ def initialize(
+ amount: nil,
+ application_fee_amount: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ transfer_data: nil
+ ); end
+ end
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amounts: T.nilable(T::Array[Integer]), descriptor_code: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil); end
+ end
+ # Manually reconcile the remaining amount for a customer_balance PaymentIntent.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::ApplyCustomerBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def apply_customer_balance(intent, params = {}, opts = {}); end
+
+ # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
+ #
+ # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
+ #
+ # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def cancel(intent, params = {}, opts = {}); end
+
+ # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
+ #
+ # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
+ #
+ # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def capture(intent, params = {}, opts = {}); end
+
+ # Confirm that your customer intends to pay with current or provided
+ # payment method. Upon confirmation, the PaymentIntent will attempt to initiate
+ # a payment.
+ # If the selected payment method requires additional authentication steps, the
+ # PaymentIntent will transition to the requires_action status and
+ # suggest additional actions via next_action. If payment fails,
+ # the PaymentIntent transitions to the requires_payment_method status or the
+ # canceled status if the confirmation limit is reached. If
+ # payment succeeds, the PaymentIntent will transition to the succeeded
+ # status (or requires_capture, if capture_method is set to manual).
+ # If the confirmation_method is automatic, payment may be attempted
+ # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
+ # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
+ # After next_actions are handled by the client, no additional
+ # confirmation is required to complete the payment.
+ # If the confirmation_method is manual, all payment attempts must be
+ # initiated using a secret key.
+ # If any actions are required for the payment, the PaymentIntent will
+ # return to the requires_confirmation state
+ # after those actions are completed. Your server needs to then
+ # explicitly re-confirm the PaymentIntent to initiate the next payment
+ # attempt.
+ # There is a variable upper limit on how many times a PaymentIntent can be confirmed.
+ # After this limit is reached, any further calls to this endpoint will
+ # transition the PaymentIntent to the canceled state.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def confirm(intent, params = {}, opts = {}); end
+
+ # Creates a PaymentIntent object.
+ #
+ # After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm)
+ # to continue the payment. Learn more about the available payment flows
+ # with the Payment Intents API.
+ #
+ # When you use confirm=true during creation, it's equivalent to creating
+ # and confirming the PaymentIntent in the same call. You can use any parameters
+ # available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply
+ # confirm=true.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Perform an incremental authorization on an eligible
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
+ # PaymentIntent's status must be requires_capture and
+ # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
+ # must be true.
+ #
+ # Incremental authorizations attempt to increase the authorized amount on
+ # your customer's card to the new, higher amount provided. Similar to the
+ # initial authorization, incremental authorizations can be declined. A
+ # single PaymentIntent can call this endpoint multiple times to further
+ # increase the authorized amount.
+ #
+ # If the incremental authorization succeeds, the PaymentIntent object
+ # returns with the updated
+ # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
+ # If the incremental authorization fails, a
+ # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
+ # fields on the PaymentIntent or Charge update. The PaymentIntent
+ # object remains capturable for the previously authorized amount.
+ #
+ # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
+ # After it's captured, a PaymentIntent can no longer be incremented.
+ #
+ # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::IncrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def increment_authorization(intent, params = {}, opts = {}); end
+
+ # Returns a list of PaymentIntents.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a PaymentIntent that has previously been created.
+ #
+ # You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string.
+ #
+ # If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://stripe.com/docs/api#payment_intent_object) object reference for more details.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def retrieve(intent, params = {}, opts = {}); end
+
+ # Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::PaymentIntentService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Updates properties on a PaymentIntent object without confirming.
+ #
+ # Depending on which properties you update, you might need to confirm the
+ # PaymentIntent again. For example, updating the payment_method
+ # always requires you to confirm the PaymentIntent again. If you prefer to
+ # update and confirm at the same time, we recommend updating properties through
+ # the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def update(intent, params = {}, opts = {}); end
+
+ # Verifies microdeposits on a PaymentIntent object.
+ sig {
+ params(intent: String, params: T.any(::Stripe::PaymentIntentService::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent)
+ }
+ def verify_microdeposits(intent, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payment_link_line_item_service.rbi b/rbi/stripe/services/payment_link_line_item_service.rbi
new file mode 100644
index 00000000..36205b4e
--- /dev/null
+++ b/rbi/stripe/services/payment_link_line_item_service.rbi
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PaymentLinkLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # 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.
+ sig {
+ params(payment_link: String, params: T.any(::Stripe::PaymentLinkLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(payment_link, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payment_link_service.rbi b/rbi/stripe/services/payment_link_service.rbi
new file mode 100644
index 00000000..aa9620e7
--- /dev/null
+++ b/rbi/stripe/services/payment_link_service.rbi
@@ -0,0 +1,1352 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PaymentLinkService < StripeService
+ attr_reader :line_items
+ class ListParams < Stripe::RequestParams
+ # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ 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
+ }
+ def initialize(
+ active: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :custom_message
+ sig { params(custom_message: T.nilable(String)).void }
+ def initialize(custom_message: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # 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.
+ sig { returns(String) }
+ attr_accessor :url
+ sig { params(url: String).void }
+ def initialize(url: nil); end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::AfterCompletion::HostedConfirmation))
+ }
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::AfterCompletion::Redirect))
+ }
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(hosted_confirmation: T.nilable(::Stripe::PaymentLinkService::CreateParams::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::PaymentLinkService::CreateParams::AfterCompletion::Redirect), type: String).void
+ }
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::PaymentLinkService::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class ConsentCollection < Stripe::RequestParams
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
+ sig { returns(String) }
+ attr_accessor :position
+ sig { params(position: String).void }
+ def initialize(position: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement))
+ }
+ attr_accessor :payment_method_reuse_agreement
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
+ # Session will determine whether to display an option to opt into promotional communication
+ # from the merchant depending on the customer's locale. Only available to US merchants.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotions
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terms_of_service
+ sig {
+ params(payment_method_reuse_agreement: T.nilable(::Stripe::PaymentLinkService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement), promotions: T.nilable(String), terms_of_service: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_reuse_agreement: nil,
+ promotions: nil,
+ terms_of_service: nil
+ ); end
+ end
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_accessor :label
+ # 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.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(label: String, value: String).void }
+ def initialize(label: nil, value: nil); end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig {
+ returns(T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown::Option])
+ }
+ attr_accessor :options
+ sig {
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown::Option]).void
+ }
+ def initialize(default_value: nil, options: nil); end
+ end
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(String) }
+ attr_accessor :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(custom: String, type: String).void }
+ def initialize(custom: nil, type: nil); end
+ end
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ # Configuration for `type=dropdown` fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown))
+ }
+ attr_accessor :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ sig { returns(::Stripe::PaymentLinkService::CreateParams::CustomField::Label) }
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomField::Numeric)) }
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomField::Text)) }
+ attr_accessor :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(dropdown: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown), key: String, label: ::Stripe::PaymentLinkService::CreateParams::CustomField::Label, numeric: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomField::Numeric), optional: T.nilable(T::Boolean), text: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomField::Text), type: String).void
+ }
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ ); end
+ end
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::AfterSubmit))))
+ }
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::ShippingAddress))))
+ }
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::Submit))))
+ }
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::TermsOfServiceAcceptance))))
+ }
+ attr_accessor :terms_of_service_acceptance
+ sig {
+ params(after_submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::AfterSubmit))), shipping_address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::ShippingAddress))), submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::Submit))), terms_of_service_acceptance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::CustomText::TermsOfServiceAcceptance)))).void
+ }
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ ); end
+ end
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ sig { params(amount_tax_display: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(amount_tax_display: nil); end
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::Issuer))
+ }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ 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::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::CustomField]))), description: T.nilable(String), footer: T.nilable(String), issuer: T.nilable(::Stripe::PaymentLinkService::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::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)))).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ ); end
+ end
+ # Whether the feature is enabled
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData))
+ }
+ attr_accessor :invoice_data
+ sig {
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData)).void
+ }
+ def initialize(enabled: nil, invoice_data: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::LineItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ sig { returns(String) }
+ attr_accessor :price
+ # The quantity of the line item being purchased.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLinkService::CreateParams::LineItem::AdjustableQuantity), price: String, quantity: Integer).void
+ }
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
+ end
+ class OptionalItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity of this item the customer can purchase. By default this value is 99.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::OptionalItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ sig { returns(String) }
+ attr_accessor :price
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLinkService::CreateParams::OptionalItem::AdjustableQuantity), price: String, quantity: Integer).void
+ }
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end
+ end
+ class PaymentIntentData < Stripe::RequestParams
+ # Controls when the funds will be captured from the customer's account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :capture_method
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # 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.
+ #
+ # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
+ #
+ # 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.
+ #
+ # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
+ #
+ # 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.
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ 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
+ }
+ def initialize(
+ capture_method: nil,
+ description: nil,
+ metadata: nil,
+ setup_future_usage: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ ); end
+ end
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ sig { returns(Integer) }
+ attr_accessor :limit
+ sig { params(limit: Integer).void }
+ def initialize(limit: nil); end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ sig { returns(::Stripe::PaymentLinkService::CreateParams::Restrictions::CompletedSessions) }
+ attr_accessor :completed_sessions
+ sig {
+ params(completed_sessions: ::Stripe::PaymentLinkService::CreateParams::Restrictions::CompletedSessions).void
+ }
+ def initialize(completed_sessions: nil); end
+ end
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ sig { returns(T::Array[String]) }
+ attr_accessor :allowed_countries
+ sig { params(allowed_countries: T::Array[String]).void }
+ def initialize(allowed_countries: nil); end
+ end
+ class ShippingOption < Stripe::RequestParams
+ # The ID of the Shipping Rate to use for this shipping option.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ sig { params(shipping_rate: T.nilable(String)).void }
+ def initialize(shipping_rate: nil); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(issuer: T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings::Issuer)).void
+ }
+ def initialize(issuer: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig {
+ returns(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings::EndBehavior)
+ }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings))
+ }
+ attr_accessor :trial_settings
+ sig {
+ params(description: T.nilable(String), invoice_settings: T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings)).void
+ }
+ def initialize(
+ description: nil,
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :required
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
+ def initialize(enabled: nil, required: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when a charge succeeds.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If specified, successful charges will be attributed to the destination
+ # account for tax reporting, and the funds from charges will be transferred
+ # to the destination account. The ID of the resulting transfer will be
+ # returned on the successful charge's `transfer` field.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount: T.nilable(Integer), destination: String).void }
+ def initialize(amount: nil, destination: nil); end
+ end
+ # Behavior after the purchase is complete.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::AfterCompletion)) }
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :application_fee_amount
+ # 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.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Configuration for automatic tax collection.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address_collection
+ # Configure fields to gather active consent from customers.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::ConsentCollection)) }
+ attr_accessor :consent_collection
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField])) }
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText)) }
+ attr_accessor :custom_text
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation)) }
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ sig { returns(T::Array[::Stripe::PaymentLinkService::CreateParams::LineItem]) }
+ attr_accessor :line_items
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # 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).
+ # 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.
+ # There is a maximum of 20 combined line items and optional items.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::OptionalItem])) }
+ attr_accessor :optional_items
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::PaymentIntentData)) }
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_collection
+ # 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)).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::PhoneNumberCollection)) }
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::Restrictions)) }
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::ShippingAddressCollection))
+ }
+ attr_accessor :shipping_address_collection
+ # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::ShippingOption]))
+ }
+ attr_accessor :shipping_options
+ # 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`).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :submit_type
+ # 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`.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::TaxIdCollection)) }
+ attr_accessor :tax_id_collection
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ sig {
+ params(after_completion: T.nilable(::Stripe::PaymentLinkService::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::PaymentLinkService::CreateParams::AutomaticTax), billing_address_collection: T.nilable(String), consent_collection: T.nilable(::Stripe::PaymentLinkService::CreateParams::ConsentCollection), currency: T.nilable(String), custom_fields: T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField]), custom_text: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText), customer_creation: T.nilable(String), expand: T.nilable(T::Array[String]), inactive_message: T.nilable(String), invoice_creation: T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation), line_items: T::Array[::Stripe::PaymentLinkService::CreateParams::LineItem], metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), optional_items: T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::OptionalItem]), payment_intent_data: T.nilable(::Stripe::PaymentLinkService::CreateParams::PaymentIntentData), payment_method_collection: T.nilable(String), payment_method_types: T.nilable(T::Array[String]), phone_number_collection: T.nilable(::Stripe::PaymentLinkService::CreateParams::PhoneNumberCollection), restrictions: T.nilable(::Stripe::PaymentLinkService::CreateParams::Restrictions), shipping_address_collection: T.nilable(::Stripe::PaymentLinkService::CreateParams::ShippingAddressCollection), shipping_options: T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::ShippingOption]), submit_type: T.nilable(String), subscription_data: T.nilable(::Stripe::PaymentLinkService::CreateParams::SubscriptionData), tax_id_collection: T.nilable(::Stripe::PaymentLinkService::CreateParams::TaxIdCollection), transfer_data: T.nilable(::Stripe::PaymentLinkService::CreateParams::TransferData)).void
+ }
+ def initialize(
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ consent_collection: nil,
+ currency: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ optional_items: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ shipping_options: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil,
+ transfer_data: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AfterCompletion < Stripe::RequestParams
+ class HostedConfirmation < Stripe::RequestParams
+ # A custom message to display to the customer after the purchase is complete.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :custom_message
+ sig { params(custom_message: T.nilable(String)).void }
+ def initialize(custom_message: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # 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.
+ sig { returns(String) }
+ attr_accessor :url
+ sig { params(url: String).void }
+ def initialize(url: nil); end
+ end
+ # Configuration when `type=hosted_confirmation`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::HostedConfirmation))
+ }
+ attr_accessor :hosted_confirmation
+ # Configuration when `type=redirect`.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::Redirect))
+ }
+ attr_accessor :redirect
+ # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(hosted_confirmation: T.nilable(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::HostedConfirmation), redirect: T.nilable(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::Redirect), type: String).void
+ }
+ def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ #
+ # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::PaymentLinkService::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CustomField < Stripe::RequestParams
+ class Dropdown < Stripe::RequestParams
+ class Option < Stripe::RequestParams
+ # The label for the option, displayed to the customer. Up to 100 characters.
+ sig { returns(String) }
+ attr_accessor :label
+ # 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.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(label: String, value: String).void }
+ def initialize(label: nil, value: nil); end
+ end
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The options available for the customer to select. Up to 200 options allowed.
+ sig {
+ returns(T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown::Option])
+ }
+ attr_accessor :options
+ sig {
+ params(default_value: T.nilable(String), options: T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown::Option]).void
+ }
+ def initialize(default_value: nil, options: nil); end
+ end
+ class Label < Stripe::RequestParams
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
+ sig { returns(String) }
+ attr_accessor :custom
+ # The type of the label.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(custom: String, type: String).void }
+ def initialize(custom: nil, type: nil); end
+ end
+ class Numeric < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ class Text < Stripe::RequestParams
+ # The value that will pre-fill the field on the payment page.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_value
+ # The maximum character length constraint for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum_length
+ # The minimum character length requirement for the customer's input.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_length
+ sig {
+ params(default_value: T.nilable(String), maximum_length: T.nilable(Integer), minimum_length: T.nilable(Integer)).void
+ }
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end
+ end
+ # Configuration for `type=dropdown` fields.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown))
+ }
+ attr_accessor :dropdown
+ # 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.
+ sig { returns(String) }
+ attr_accessor :key
+ # The label for the field, displayed to the customer.
+ sig { returns(::Stripe::PaymentLinkService::UpdateParams::CustomField::Label) }
+ attr_accessor :label
+ # Configuration for `type=numeric` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomField::Numeric)) }
+ attr_accessor :numeric
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :optional
+ # Configuration for `type=text` fields.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomField::Text)) }
+ attr_accessor :text
+ # The type of the field.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(dropdown: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown), key: String, label: ::Stripe::PaymentLinkService::UpdateParams::CustomField::Label, numeric: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomField::Numeric), optional: T.nilable(T::Boolean), text: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomField::Text), type: String).void
+ }
+ def initialize(
+ dropdown: nil,
+ key: nil,
+ label: nil,
+ numeric: nil,
+ optional: nil,
+ text: nil,
+ type: nil
+ ); end
+ end
+ class CustomText < Stripe::RequestParams
+ class AfterSubmit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class ShippingAddress < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class Submit < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ class TermsOfServiceAcceptance < Stripe::RequestParams
+ # Text may be up to 1200 characters in length.
+ sig { returns(String) }
+ attr_accessor :message
+ sig { params(message: String).void }
+ def initialize(message: nil); end
+ end
+ # Custom text that should be displayed after the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::AfterSubmit))))
+ }
+ attr_accessor :after_submit
+ # Custom text that should be displayed alongside shipping address collection.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::ShippingAddress))))
+ }
+ attr_accessor :shipping_address
+ # Custom text that should be displayed alongside the payment confirmation button.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::Submit))))
+ }
+ attr_accessor :submit
+ # Custom text that should be displayed in place of the default terms of service agreement text.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::TermsOfServiceAcceptance))))
+ }
+ attr_accessor :terms_of_service_acceptance
+ sig {
+ params(after_submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::AfterSubmit))), shipping_address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::ShippingAddress))), submit: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::Submit))), terms_of_service_acceptance: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::CustomText::TermsOfServiceAcceptance)))).void
+ }
+ def initialize(
+ after_submit: nil,
+ shipping_address: nil,
+ submit: nil,
+ terms_of_service_acceptance: nil
+ ); end
+ end
+ class InvoiceCreation < Stripe::RequestParams
+ class InvoiceData < Stripe::RequestParams
+ class CustomField < Stripe::RequestParams
+ # The name of the custom field. This may be up to 40 characters.
+ sig { returns(String) }
+ attr_accessor :name
+ # The value of the custom field. This may be up to 140 characters.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(name: String, value: String).void }
+ def initialize(name: nil, value: nil); end
+ end
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ class RenderingOptions < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :amount_tax_display
+ sig { params(amount_tax_display: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(amount_tax_display: nil); end
+ end
+ # The account tax IDs associated with the invoice.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Default custom fields to be displayed on invoices for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Default footer to be displayed on invoices for this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :footer
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::Issuer))
+ }
+ attr_accessor :issuer
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Default options for invoice PDF rendering for this customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions))))
+ }
+ attr_accessor :rendering_options
+ sig {
+ 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::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::CustomField]))), description: T.nilable(String), footer: T.nilable(String), issuer: T.nilable(::Stripe::PaymentLinkService::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::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions)))).void
+ }
+ def initialize(
+ account_tax_ids: nil,
+ custom_fields: nil,
+ description: nil,
+ footer: nil,
+ issuer: nil,
+ metadata: nil,
+ rendering_options: nil
+ ); end
+ end
+ # Whether the feature is enabled
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Invoice PDF configuration.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData))
+ }
+ attr_accessor :invoice_data
+ sig {
+ params(enabled: T::Boolean, invoice_data: T.nilable(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData)).void
+ }
+ def initialize(enabled: nil, invoice_data: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class AdjustableQuantity < Stripe::RequestParams
+ # Set to true if the quantity can be adjusted to any non-negative Integer.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # 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.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil); end
+ end
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::LineItem::AdjustableQuantity))
+ }
+ attr_accessor :adjustable_quantity
+ # The ID of an existing line item on the payment link.
+ sig { returns(String) }
+ attr_accessor :id
+ # The quantity of the line item being purchased.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ sig {
+ params(adjustable_quantity: T.nilable(::Stripe::PaymentLinkService::UpdateParams::LineItem::AdjustableQuantity), id: String, quantity: T.nilable(Integer)).void
+ }
+ def initialize(adjustable_quantity: nil, id: nil, quantity: nil); end
+ end
+ class PaymentIntentData < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # 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).
+ #
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :statement_descriptor_suffix
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :transfer_group
+ sig {
+ 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
+ }
+ def initialize(
+ description: nil,
+ metadata: nil,
+ statement_descriptor: nil,
+ statement_descriptor_suffix: nil,
+ transfer_group: nil
+ ); end
+ end
+ class PhoneNumberCollection < Stripe::RequestParams
+ # Set to `true` to enable phone number collection.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class Restrictions < Stripe::RequestParams
+ class CompletedSessions < Stripe::RequestParams
+ # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ sig { returns(Integer) }
+ attr_accessor :limit
+ sig { params(limit: Integer).void }
+ def initialize(limit: nil); end
+ end
+ # Configuration for the `completed_sessions` restriction type.
+ sig { returns(::Stripe::PaymentLinkService::UpdateParams::Restrictions::CompletedSessions) }
+ attr_accessor :completed_sessions
+ sig {
+ params(completed_sessions: ::Stripe::PaymentLinkService::UpdateParams::Restrictions::CompletedSessions).void
+ }
+ def initialize(completed_sessions: nil); end
+ end
+ class ShippingAddressCollection < Stripe::RequestParams
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
+ # shipping locations.
+ sig { returns(T::Array[String]) }
+ attr_accessor :allowed_countries
+ sig { params(allowed_countries: T::Array[String]).void }
+ def initialize(allowed_countries: nil); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(issuer: T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings::Issuer)).void
+ }
+ def initialize(issuer: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig {
+ returns(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings::EndBehavior)
+ }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings))))
+ }
+ attr_accessor :trial_settings
+ sig {
+ params(invoice_settings: T.nilable(::Stripe::PaymentLinkService::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::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings)))).void
+ }
+ def initialize(
+ invoice_settings: nil,
+ metadata: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class TaxIdCollection < Stripe::RequestParams
+ # Enable tax ID collection during checkout. Defaults to `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :required
+ sig { params(enabled: T::Boolean, required: T.nilable(String)).void }
+ def initialize(enabled: nil, required: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Behavior after the purchase is complete.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion)) }
+ attr_accessor :after_completion
+ # Enables user redeemable promotion codes.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :allow_promotion_codes
+ # Configuration for automatic tax collection.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Configuration for collecting the customer's billing address. Defaults to `auto`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_address_collection
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField]))))
+ }
+ attr_accessor :custom_fields
+ # Display additional text for your customers using custom text.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText)) }
+ attr_accessor :custom_text
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer_creation
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The custom message to be displayed to a customer when a payment link is no longer active.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :inactive_message
+ # Generate a post-purchase Invoice for one-time payments.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation)) }
+ attr_accessor :invoice_creation
+ # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ sig { returns(T.nilable(T::Array[::Stripe::PaymentLinkService::UpdateParams::LineItem])) }
+ attr_accessor :line_items
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::PaymentIntentData)) }
+ attr_accessor :payment_intent_data
+ # 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.
+ #
+ # Can only be set in `subscription` mode. Defaults to `always`.
+ #
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_collection
+ # 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).
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ # Controls phone number collection settings during checkout.
+ #
+ # We recommend that you review your privacy policy and check with your legal contacts.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::PhoneNumberCollection)) }
+ attr_accessor :phone_number_collection
+ # Settings that restrict the usage of a payment link.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::Restrictions))))
+ }
+ attr_accessor :restrictions
+ # Configuration for collecting the customer's shipping address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::ShippingAddressCollection))))
+ }
+ attr_accessor :shipping_address_collection
+ # 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`).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :submit_type
+ # 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`.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # Controls tax ID collection during checkout.
+ sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::TaxIdCollection)) }
+ attr_accessor :tax_id_collection
+ sig {
+ params(active: T.nilable(T::Boolean), after_completion: T.nilable(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion), allow_promotion_codes: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::PaymentLinkService::UpdateParams::AutomaticTax), billing_address_collection: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField]))), custom_text: T.nilable(::Stripe::PaymentLinkService::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::PaymentLinkService::UpdateParams::InvoiceCreation), line_items: T.nilable(T::Array[::Stripe::PaymentLinkService::UpdateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), payment_intent_data: T.nilable(::Stripe::PaymentLinkService::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::PaymentLinkService::UpdateParams::PhoneNumberCollection), restrictions: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::Restrictions))), shipping_address_collection: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentLinkService::UpdateParams::ShippingAddressCollection))), submit_type: T.nilable(String), subscription_data: T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData), tax_id_collection: T.nilable(::Stripe::PaymentLinkService::UpdateParams::TaxIdCollection)).void
+ }
+ def initialize(
+ active: nil,
+ after_completion: nil,
+ allow_promotion_codes: nil,
+ automatic_tax: nil,
+ billing_address_collection: nil,
+ custom_fields: nil,
+ custom_text: nil,
+ customer_creation: nil,
+ expand: nil,
+ inactive_message: nil,
+ invoice_creation: nil,
+ line_items: nil,
+ metadata: nil,
+ payment_intent_data: nil,
+ payment_method_collection: nil,
+ payment_method_types: nil,
+ phone_number_collection: nil,
+ restrictions: nil,
+ shipping_address_collection: nil,
+ submit_type: nil,
+ subscription_data: nil,
+ tax_id_collection: nil
+ ); end
+ end
+ # Creates a payment link.
+ sig {
+ params(params: T.any(::Stripe::PaymentLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of your payment links.
+ sig {
+ params(params: T.any(::Stripe::PaymentLinkService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieve a payment link.
+ sig {
+ params(payment_link: String, params: T.any(::Stripe::PaymentLinkService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
+ }
+ def retrieve(payment_link, params = {}, opts = {}); end
+
+ # Updates a payment link.
+ sig {
+ params(payment_link: String, params: T.any(::Stripe::PaymentLinkService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink)
+ }
+ def update(payment_link, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payment_method_configuration_service.rbi b/rbi/stripe/services/payment_method_configuration_service.rbi
new file mode 100644
index 00000000..7c9e63cb
--- /dev/null
+++ b/rbi/stripe/services/payment_method_configuration_service.rbi
@@ -0,0 +1,2211 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PaymentMethodConfigurationService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The Connect application to filter by.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :application
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(application: T.nilable(T.nilable(String)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ application: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alma::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alma::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Billie::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Billie::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Blik::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Blik::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Card::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Card::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Eps::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Eps::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Link::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Link::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::NzBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::NzBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::P24::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::P24::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::PayByBank::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::PayByBank::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Satispay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Satispay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Swish::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Swish::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Twint::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Twint::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Zip::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Zip::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm)) }
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay)) }
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alma)) }
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay))
+ }
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater))
+ }
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact))
+ }
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Billie)) }
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Blik)) }
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto)) }
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Card)) }
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp)) }
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Eps)) }
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx)) }
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay)) }
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay))
+ }
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay)) }
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal)) }
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb)) }
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna)) }
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini)) }
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Link)) }
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco))
+ }
+ attr_accessor :multibanco
+ # Configuration name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo)) }
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::P24)) }
+ attr_accessor :p24
+ # Configuration's parent configuration. Specify to create a child configuration.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :parent
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow)) }
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal)) }
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Satispay))
+ }
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort)) }
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Swish)) }
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Twint)) }
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay), alma: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay), apple_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay), apple_pay_later: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater), au_becs_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Billie), blik: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Card), cartes_bancaires: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires), cashapp: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp), customer_balance: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay), google_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay), grabpay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal), jcb: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb), klarna: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini), link: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Link), mobilepay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco), name: T.nilable(String), nz_bank_account: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::P24), parent: T.nilable(String), pay_by_bank: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::PayByBank), paynow: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal), promptpay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay), revolut_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay), satispay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Twint), us_bank_account: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodConfigurationService::CreateParams::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ parent: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alipay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Alma < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class ApplePayLater < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Billie < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Billie::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Billie::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Blik < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Boleto < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Card::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Card::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CartesBancaires < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Eps < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class GooglePay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Grabpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Ideal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Jcb < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Klarna < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Link < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Link::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Link::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Mobilepay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Multibanco < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::NzBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::NzBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Oxxo < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class P24 < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::P24::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::P24::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::PayByBank::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::PayByBank::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paynow < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Promptpay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Satispay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Satispay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Satispay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Swish < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Twint < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class WechatPay < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ class Zip < Stripe::RequestParams
+ class DisplayPreference < Stripe::RequestParams
+ # The account's preference for whether or not to display this payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preference
+ sig { params(preference: T.nilable(String)).void }
+ def initialize(preference: nil); end
+ end
+ # Whether or not the payment method should be displayed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip::DisplayPreference))
+ }
+ attr_accessor :display_preference
+ sig {
+ params(display_preference: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip::DisplayPreference)).void
+ }
+ def initialize(display_preference: nil); end
+ end
+ # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # Whether the configuration can be used for new payments.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm)) }
+ attr_accessor :affirm
+ # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay)) }
+ attr_accessor :alipay
+ # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma)) }
+ attr_accessor :alma
+ # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay))
+ }
+ attr_accessor :apple_pay
+ # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater))
+ }
+ attr_accessor :apple_pay_later
+ # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact))
+ }
+ attr_accessor :bancontact
+ # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Billie)) }
+ attr_accessor :billie
+ # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik)) }
+ attr_accessor :blik
+ # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto)) }
+ attr_accessor :boleto
+ # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Card)) }
+ attr_accessor :card
+ # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp)) }
+ attr_accessor :cashapp
+ # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps)) }
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx)) }
+ attr_accessor :fpx
+ # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay)) }
+ attr_accessor :giropay
+ # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay))
+ }
+ attr_accessor :google_pay
+ # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay)) }
+ attr_accessor :grabpay
+ # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal)) }
+ attr_accessor :ideal
+ # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb)) }
+ attr_accessor :jcb
+ # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna)) }
+ attr_accessor :klarna
+ # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini)) }
+ attr_accessor :konbini
+ # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Link)) }
+ attr_accessor :link
+ # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco))
+ }
+ attr_accessor :multibanco
+ # Configuration name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo)) }
+ attr_accessor :oxxo
+ # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::P24)) }
+ attr_accessor :p24
+ # Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow)) }
+ attr_accessor :paynow
+ # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal)) }
+ attr_accessor :paypal
+ # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Satispay))
+ }
+ attr_accessor :satispay
+ # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort)) }
+ attr_accessor :sofort
+ # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish)) }
+ attr_accessor :swish
+ # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint)) }
+ attr_accessor :twint
+ # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ sig {
+ returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ sig { returns(T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit), active: T.nilable(T::Boolean), affirm: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay), alma: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay), apple_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay), apple_pay_later: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater), au_becs_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Billie), blik: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Card), cartes_bancaires: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires), cashapp: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp), customer_balance: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay), google_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay), grabpay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal), jcb: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb), klarna: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini), link: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Link), mobilepay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco), name: T.nilable(String), nz_bank_account: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::PayByBank), paynow: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal), promptpay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay), revolut_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay), satispay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint), us_bank_account: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ active: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ apple_pay: nil,
+ apple_pay_later: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cartes_bancaires: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ google_pay: nil,
+ grabpay: nil,
+ ideal: nil,
+ jcb: nil,
+ klarna: nil,
+ konbini: nil,
+ link: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ name: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ paynow: nil,
+ paypal: nil,
+ promptpay: nil,
+ revolut_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ # Creates a payment method configuration
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodConfigurationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration)
+ }
+ def create(params = {}, opts = {}); end
+
+ # List payment method configurations
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodConfigurationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieve payment method configuration
+ sig {
+ params(configuration: String, params: T.any(::Stripe::PaymentMethodConfigurationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration)
+ }
+ def retrieve(configuration, params = {}, opts = {}); end
+
+ # Update payment method configuration
+ sig {
+ params(configuration: String, params: T.any(::Stripe::PaymentMethodConfigurationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration)
+ }
+ def update(configuration, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payment_method_domain_service.rbi b/rbi/stripe/services/payment_method_domain_service.rbi
new file mode 100644
index 00000000..ccd97652
--- /dev/null
+++ b/rbi/stripe/services/payment_method_domain_service.rbi
@@ -0,0 +1,112 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PaymentMethodDomainService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(domain_name: T.nilable(String), enabled: 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
+ }
+ def initialize(
+ domain_name: nil,
+ enabled: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The domain name that this payment method domain object represents.
+ sig { returns(String) }
+ attr_accessor :domain_name
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(domain_name: String, enabled: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(domain_name: nil, enabled: nil, expand: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enabled
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(enabled: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
+ def initialize(enabled: nil, expand: nil); end
+ end
+ class ValidateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a payment method domain.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodDomainService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Lists the details of existing payment method domains.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodDomainService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing payment method domain.
+ sig {
+ params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomainService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def retrieve(payment_method_domain, params = {}, opts = {}); end
+
+ # Updates an existing payment method domain.
+ sig {
+ params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomainService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def update(payment_method_domain, params = {}, opts = {}); end
+
+ # Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
+ # The payment method doesn't appear in Elements or Embedded Checkout for this domain until it is active.
+ #
+ # To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint.
+ #
+ # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
+ sig {
+ params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomainService::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain)
+ }
+ def validate(payment_method_domain, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payment_method_service.rbi b/rbi/stripe/services/payment_method_service.rbi
new file mode 100644
index 00000000..d898f6a0
--- /dev/null
+++ b/rbi/stripe/services/payment_method_service.rbi
@@ -0,0 +1,840 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PaymentMethodService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose PaymentMethods will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethodService::CreateParams::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethodService::CreateParams::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred
+ sig { params(preferred: T.nilable(String)).void }
+ def initialize(preferred: nil); end
+ end
+ # The card's CVC. It is highly recommended to always include this value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Card::Networks)) }
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :token
+ sig {
+ params(cvc: T.nilable(String), exp_month: T.nilable(Integer), exp_year: T.nilable(Integer), networks: T.nilable(::Stripe::PaymentMethodService::CreateParams::Card::Networks), number: T.nilable(String), token: T.nilable(String)).void
+ }
+ def initialize(
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ networks: nil,
+ number: nil,
+ token: nil
+ ); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Klarna::Dob)) }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::PaymentMethodService::CreateParams::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::AcssDebit)) }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Affirm)) }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::AfterpayClearpay)) }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Alipay)) }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Alma)) }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::AmazonPay)) }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::AuBecsDebit)) }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::BacsDebit)) }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Bancontact)) }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Billie)) }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::BillingDetails)) }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Blik)) }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Boleto)) }
+ attr_accessor :boleto
+ # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Card)) }
+ attr_accessor :card
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Cashapp)) }
+ attr_accessor :cashapp
+ # The `Customer` to whom the original PaymentMethod is attached.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::CustomerBalance)) }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Eps)) }
+ attr_accessor :eps
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Fpx)) }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Giropay)) }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Grabpay)) }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Ideal)) }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::InteracPresent)) }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::KakaoPay)) }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Klarna)) }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Konbini)) }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::KrCard)) }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Mobilepay)) }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Multibanco)) }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::NaverPay)) }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::NzBankAccount)) }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Oxxo)) }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::P24)) }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::PayByBank)) }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Payco)) }
+ attr_accessor :payco
+ # The PaymentMethod to share.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Paynow)) }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Paypal)) }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Pix)) }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Promptpay)) }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::RadarOptions)) }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::RevolutPay)) }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::SamsungPay)) }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Satispay)) }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::SepaDebit)) }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Sofort)) }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Swish)) }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Twint)) }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::UsBankAccount)) }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::WechatPay)) }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::Zip)) }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::AcssDebit), affirm: T.nilable(::Stripe::PaymentMethodService::CreateParams::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::PaymentMethodService::CreateParams::Alma), amazon_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::BacsDebit), bancontact: T.nilable(::Stripe::PaymentMethodService::CreateParams::Bancontact), billie: T.nilable(::Stripe::PaymentMethodService::CreateParams::Billie), billing_details: T.nilable(::Stripe::PaymentMethodService::CreateParams::BillingDetails), blik: T.nilable(::Stripe::PaymentMethodService::CreateParams::Blik), boleto: T.nilable(::Stripe::PaymentMethodService::CreateParams::Boleto), card: T.nilable(::Stripe::PaymentMethodService::CreateParams::Card), cashapp: T.nilable(::Stripe::PaymentMethodService::CreateParams::Cashapp), customer: T.nilable(String), customer_balance: T.nilable(::Stripe::PaymentMethodService::CreateParams::CustomerBalance), eps: T.nilable(::Stripe::PaymentMethodService::CreateParams::Eps), expand: T.nilable(T::Array[String]), fpx: T.nilable(::Stripe::PaymentMethodService::CreateParams::Fpx), giropay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Giropay), grabpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Grabpay), ideal: T.nilable(::Stripe::PaymentMethodService::CreateParams::Ideal), interac_present: T.nilable(::Stripe::PaymentMethodService::CreateParams::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::KakaoPay), klarna: T.nilable(::Stripe::PaymentMethodService::CreateParams::Klarna), konbini: T.nilable(::Stripe::PaymentMethodService::CreateParams::Konbini), kr_card: T.nilable(::Stripe::PaymentMethodService::CreateParams::KrCard), link: T.nilable(::Stripe::PaymentMethodService::CreateParams::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Mobilepay), multibanco: T.nilable(::Stripe::PaymentMethodService::CreateParams::Multibanco), naver_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::NaverPay), nz_bank_account: T.nilable(::Stripe::PaymentMethodService::CreateParams::NzBankAccount), oxxo: T.nilable(::Stripe::PaymentMethodService::CreateParams::Oxxo), p24: T.nilable(::Stripe::PaymentMethodService::CreateParams::P24), pay_by_bank: T.nilable(::Stripe::PaymentMethodService::CreateParams::PayByBank), payco: T.nilable(::Stripe::PaymentMethodService::CreateParams::Payco), payment_method: T.nilable(String), paynow: T.nilable(::Stripe::PaymentMethodService::CreateParams::Paynow), paypal: T.nilable(::Stripe::PaymentMethodService::CreateParams::Paypal), pix: T.nilable(::Stripe::PaymentMethodService::CreateParams::Pix), promptpay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Promptpay), radar_options: T.nilable(::Stripe::PaymentMethodService::CreateParams::RadarOptions), revolut_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::SamsungPay), satispay: T.nilable(::Stripe::PaymentMethodService::CreateParams::Satispay), sepa_debit: T.nilable(::Stripe::PaymentMethodService::CreateParams::SepaDebit), sofort: T.nilable(::Stripe::PaymentMethodService::CreateParams::Sofort), swish: T.nilable(::Stripe::PaymentMethodService::CreateParams::Swish), twint: T.nilable(::Stripe::PaymentMethodService::CreateParams::Twint), type: T.nilable(String), us_bank_account: T.nilable(::Stripe::PaymentMethodService::CreateParams::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentMethodService::CreateParams::WechatPay), zip: T.nilable(::Stripe::PaymentMethodService::CreateParams::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ card: nil,
+ cashapp: nil,
+ customer: nil,
+ customer_balance: nil,
+ eps: nil,
+ expand: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ payment_method: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethodService::UpdateParams::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentMethodService::UpdateParams::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :preferred
+ sig { params(preferred: T.nilable(T.nilable(T.any(String, String)))).void }
+ def initialize(preferred: nil); end
+ end
+ # Two-digit number representing the card's expiration month.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_month
+ # Four-digit number representing the card's expiration year.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :exp_year
+ # Contains information about card networks used to process the payment.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::Card::Networks)) }
+ attr_accessor :networks
+ sig {
+ params(exp_month: T.nilable(Integer), exp_year: T.nilable(Integer), networks: T.nilable(::Stripe::PaymentMethodService::UpdateParams::Card::Networks)).void
+ }
+ def initialize(exp_month: nil, exp_year: nil, networks: nil); end
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Bank account holder type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Bank account type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ sig { params(account_holder_type: T.nilable(String), account_type: T.nilable(String)).void }
+ def initialize(account_holder_type: nil, account_type: nil); end
+ end
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::BillingDetails)) }
+ attr_accessor :billing_details
+ # If this is a `card` PaymentMethod, this hash contains the user's card details.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::Card)) }
+ attr_accessor :card
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::Link)) }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::PayByBank)) }
+ attr_accessor :pay_by_bank
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig { returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::UsBankAccount)) }
+ attr_accessor :us_bank_account
+ sig {
+ params(allow_redisplay: T.nilable(String), billing_details: T.nilable(::Stripe::PaymentMethodService::UpdateParams::BillingDetails), card: T.nilable(::Stripe::PaymentMethodService::UpdateParams::Card), expand: T.nilable(T::Array[String]), link: T.nilable(::Stripe::PaymentMethodService::UpdateParams::Link), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), pay_by_bank: T.nilable(::Stripe::PaymentMethodService::UpdateParams::PayByBank), us_bank_account: T.nilable(::Stripe::PaymentMethodService::UpdateParams::UsBankAccount)).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ billing_details: nil,
+ card: nil,
+ expand: nil,
+ link: nil,
+ metadata: nil,
+ pay_by_bank: nil,
+ us_bank_account: nil
+ ); end
+ end
+ class AttachParams < Stripe::RequestParams
+ # The ID of the customer to which to attach the PaymentMethod.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(customer: String, expand: T.nilable(T::Array[String])).void }
+ def initialize(customer: nil, expand: nil); end
+ end
+ class DetachParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Attaches a PaymentMethod object to a Customer.
+ #
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
+ # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
+ # future use, which makes later declines and payment friction more likely.
+ # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
+ # future payments.
+ #
+ # To use this PaymentMethod as the default for invoice or subscription payments,
+ # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
+ # on the Customer to the PaymentMethod's ID.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::AttachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def attach(payment_method, params = {}, opts = {}); end
+
+ # Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
+ #
+ # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def detach(payment_method, params = {}, opts = {}); end
+
+ # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
+ sig {
+ params(params: T.any(::Stripe::PaymentMethodService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer)
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def retrieve(payment_method, params = {}, opts = {}); end
+
+ # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
+ sig {
+ params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod)
+ }
+ def update(payment_method, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/payout_service.rbi b/rbi/stripe/services/payout_service.rbi
new file mode 100644
index 00000000..8d43ee61
--- /dev/null
+++ b/rbi/stripe/services/payout_service.rbi
@@ -0,0 +1,205 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PayoutService < StripeService
+ class ListParams < Stripe::RequestParams
+ class ArrivalDate < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return payouts that are expected to arrive during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::PayoutService::ListParams::ArrivalDate, Integer))) }
+ attr_accessor :arrival_date
+ # Only return payouts that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::PayoutService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # The ID of an external account - only return payouts sent to this external account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(arrival_date: T.nilable(T.any(::Stripe::PayoutService::ListParams::ArrivalDate, Integer)), created: T.nilable(T.any(::Stripe::PayoutService::ListParams::Created, Integer)), destination: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ arrival_date: nil,
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents representing how much to payout.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :method
+ # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source_type
+ # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), destination: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), method: T.nilable(String), source_type: T.nilable(String), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ method: nil,
+ source_type: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String])).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
+ sig {
+ params(payout: String, params: T.any(::Stripe::PayoutService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def cancel(payout, params = {}, opts = {}); end
+
+ # To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
+ #
+ # If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode.
+ #
+ # If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type.
+ sig {
+ params(params: T.any(::Stripe::PayoutService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
+ sig {
+ params(params: T.any(::Stripe::PayoutService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.
+ sig {
+ params(payout: String, params: T.any(::Stripe::PayoutService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def retrieve(payout, params = {}, opts = {}); end
+
+ # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead.
+ #
+ # By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
+ sig {
+ params(payout: String, params: T.any(::Stripe::PayoutService::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def reverse(payout, params = {}, opts = {}); end
+
+ # Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments.
+ sig {
+ params(payout: String, params: T.any(::Stripe::PayoutService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout)
+ }
+ def update(payout, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/plan_service.rbi b/rbi/stripe/services/plan_service.rbi
new file mode 100644
index 00000000..6fb40703
--- /dev/null
+++ b/rbi/stripe/services/plan_service.rbi
@@ -0,0 +1,284 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PlanService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Whether the plan is currently available for new subscriptions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # A brief description of the plan, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nickname: T.nilable(String), product: T.nilable(String), trial_period_days: T.nilable(Integer)).void
+ }
+ def initialize(
+ active: nil,
+ expand: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ trial_period_days: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::PlanService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return plans for the given product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::PlanService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), product: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ product: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Product < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_label
+ sig {
+ params(active: T.nilable(T::Boolean), id: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: String, statement_descriptor: T.nilable(String), tax_code: T.nilable(String), unit_label: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ ); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ class TransformUsage < Stripe::RequestParams
+ # Divide usage by this number.
+ sig { returns(Integer) }
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ sig { returns(String) }
+ attr_accessor :round
+ sig { params(divide_by: Integer, round: String).void }
+ def initialize(divide_by: nil, round: nil); end
+ end
+ # Whether the plan is currently available for new subscriptions. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :amount_decimal
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_scheme
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The meter tracking the usage of a metered price
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # A brief description of the plan, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # Attribute for param field product
+ sig { returns(T.nilable(T.any(::Stripe::PlanService::CreateParams::Product, String))) }
+ attr_accessor :product
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T.nilable(T::Array[::Stripe::PlanService::CreateParams::Tier])) }
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tiers_mode
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ sig { returns(T.nilable(::Stripe::PlanService::CreateParams::TransformUsage)) }
+ attr_accessor :transform_usage
+ # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage_type
+ sig {
+ params(active: T.nilable(T::Boolean), amount: T.nilable(Integer), amount_decimal: T.nilable(String), billing_scheme: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), id: T.nilable(String), interval: String, interval_count: T.nilable(Integer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), meter: T.nilable(String), nickname: T.nilable(String), product: T.nilable(T.any(::Stripe::PlanService::CreateParams::Product, String)), tiers: T.nilable(T::Array[::Stripe::PlanService::CreateParams::Tier]), tiers_mode: T.nilable(String), transform_usage: T.nilable(::Stripe::PlanService::CreateParams::TransformUsage), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ amount: nil,
+ amount_decimal: nil,
+ billing_scheme: nil,
+ currency: nil,
+ expand: nil,
+ id: nil,
+ interval: nil,
+ interval_count: nil,
+ metadata: nil,
+ meter: nil,
+ nickname: nil,
+ product: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transform_usage: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ ); end
+ end
+ # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
+ sig {
+ params(params: T.any(::Stripe::PlanService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deleting plans means new subscribers can't be added. Existing subscribers aren't affected.
+ sig {
+ params(plan: String, params: T.any(::Stripe::PlanService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def delete(plan, params = {}, opts = {}); end
+
+ # Returns a list of your plans.
+ sig {
+ params(params: T.any(::Stripe::PlanService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the plan with the given ID.
+ sig {
+ params(plan: String, params: T.any(::Stripe::PlanService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def retrieve(plan, params = {}, opts = {}); end
+
+ # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle.
+ sig {
+ params(plan: String, params: T.any(::Stripe::PlanService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan)
+ }
+ def update(plan, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/price_service.rbi b/rbi/stripe/services/price_service.rbi
new file mode 100644
index 00000000..75c8c316
--- /dev/null
+++ b/rbi/stripe/services/price_service.rbi
@@ -0,0 +1,546 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PriceService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Filter by billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # Filter by the price's meter.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # Filter by the usage type for this price. Can be either `metered` or `licensed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage_type
+ sig {
+ params(interval: T.nilable(String), meter: T.nilable(String), usage_type: T.nilable(String)).void
+ }
+ def initialize(interval: nil, meter: nil, usage_type: nil); end
+ end
+ # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::PriceService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return prices for the given currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :lookup_keys
+ # Only return prices for the given product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # Only return prices with these recurring fields.
+ sig { returns(T.nilable(::Stripe::PriceService::ListParams::Recurring)) }
+ attr_accessor :recurring
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return prices of type `recurring` or `one_time`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::PriceService::ListParams::Created, Integer)), currency: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), lookup_keys: T.nilable(T::Array[String]), product: T.nilable(String), recurring: T.nilable(::Stripe::PriceService::ListParams::Recurring), starting_after: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ lookup_keys: nil,
+ product: nil,
+ recurring: nil,
+ starting_after: nil,
+ type: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig {
+ returns(T.nilable(::Stripe::PriceService::CreateParams::CurrencyOptions::CustomUnitAmount))
+ }
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::PriceService::CreateParams::CurrencyOptions::Tier]))
+ }
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(custom_unit_amount: T.nilable(::Stripe::PriceService::CreateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceService::CreateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class ProductData < Stripe::RequestParams
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_label
+ sig {
+ params(active: T.nilable(T::Boolean), id: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: String, statement_descriptor: T.nilable(String), tax_code: T.nilable(String), unit_label: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ id: nil,
+ metadata: nil,
+ name: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil
+ ); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # The meter tracking the usage of a metered price
+ sig { returns(T.nilable(String)) }
+ attr_accessor :meter
+ # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage_type
+ sig {
+ params(interval: String, interval_count: T.nilable(Integer), meter: T.nilable(String), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void
+ }
+ def initialize(
+ interval: nil,
+ interval_count: nil,
+ meter: nil,
+ trial_period_days: nil,
+ usage_type: nil
+ ); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ class TransformQuantity < Stripe::RequestParams
+ # Divide usage by this number.
+ sig { returns(Integer) }
+ attr_accessor :divide_by
+ # After division, either round the result `up` or `down`.
+ sig { returns(String) }
+ attr_accessor :round
+ sig { params(divide_by: Integer, round: String).void }
+ def initialize(divide_by: nil, round: nil); end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_scheme
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::PriceService::CreateParams::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig { returns(T.nilable(::Stripe::PriceService::CreateParams::CustomUnitAmount)) }
+ attr_accessor :custom_unit_amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # These fields can be used to create a new product that this price will belong to.
+ sig { returns(T.nilable(::Stripe::PriceService::CreateParams::ProductData)) }
+ attr_accessor :product_data
+ # The recurring components of a price such as `interval` and `usage_type`.
+ sig { returns(T.nilable(::Stripe::PriceService::CreateParams::Recurring)) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig { returns(T.nilable(T::Array[::Stripe::PriceService::CreateParams::Tier])) }
+ attr_accessor :tiers
+ # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tiers_mode
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ sig { returns(T.nilable(::Stripe::PriceService::CreateParams::TransformQuantity)) }
+ attr_accessor :transform_quantity
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(active: T.nilable(T::Boolean), billing_scheme: T.nilable(String), currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::PriceService::CreateParams::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::PriceService::CreateParams::CustomUnitAmount), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(String), product: T.nilable(String), product_data: T.nilable(::Stripe::PriceService::CreateParams::ProductData), recurring: T.nilable(::Stripe::PriceService::CreateParams::Recurring), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceService::CreateParams::Tier]), tiers_mode: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean), transform_quantity: T.nilable(::Stripe::PriceService::CreateParams::TransformQuantity), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ billing_scheme: nil,
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ product: nil,
+ product_data: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ tiers_mode: nil,
+ transfer_lookup_key: nil,
+ transform_quantity: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig {
+ returns(T.nilable(::Stripe::PriceService::UpdateParams::CurrencyOptions::CustomUnitAmount))
+ }
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::PriceService::UpdateParams::CurrencyOptions::Tier]))
+ }
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(custom_unit_amount: T.nilable(::Stripe::PriceService::UpdateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceService::UpdateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Whether the price can be used for new purchases. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Hash[String, ::Stripe::PriceService::UpdateParams::CurrencyOptions]))))
+ }
+ attr_accessor :currency_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :lookup_key
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # A brief description of the price, hidden from customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nickname
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :transfer_lookup_key
+ sig {
+ params(active: T.nilable(T::Boolean), currency_options: T.nilable(T.nilable(T.any(String, T::Hash[String, ::Stripe::PriceService::UpdateParams::CurrencyOptions]))), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nickname: T.nilable(String), tax_behavior: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ active: nil,
+ currency_options: nil,
+ expand: nil,
+ lookup_key: nil,
+ metadata: nil,
+ nickname: nil,
+ tax_behavior: nil,
+ transfer_lookup_key: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ # Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time.
+ sig {
+ params(params: T.any(::Stripe::PriceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
+ sig {
+ params(params: T.any(::Stripe::PriceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the price with the given ID.
+ sig {
+ params(price: String, params: T.any(::Stripe::PriceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price)
+ }
+ def retrieve(price, params = {}, opts = {}); end
+
+ # Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::PriceService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
+ sig {
+ params(price: String, params: T.any(::Stripe::PriceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price)
+ }
+ def update(price, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/product_feature_service.rbi b/rbi/stripe/services/product_feature_service.rbi
new file mode 100644
index 00000000..333ae38a
--- /dev/null
+++ b/rbi/stripe/services/product_feature_service.rbi
@@ -0,0 +1,69 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ProductFeatureService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.
+ sig { returns(String) }
+ attr_accessor :entitlement_feature
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(entitlement_feature: String, expand: T.nilable(T::Array[String])).void }
+ def initialize(entitlement_feature: nil, expand: nil); end
+ end
+ # Creates a product_feature, which represents a feature attachment to a product
+ sig {
+ params(product: String, params: T.any(::Stripe::ProductFeatureService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ProductFeature)
+ }
+ def create(product, params = {}, opts = {}); end
+
+ # Deletes the feature attachment to a product
+ sig {
+ params(product: String, id: String, params: T.any(::Stripe::ProductFeatureService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ProductFeature)
+ }
+ def delete(product, id, params = {}, opts = {}); end
+
+ # Retrieve a list of features for a product
+ sig {
+ params(product: String, params: T.any(::Stripe::ProductFeatureService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(product, params = {}, opts = {}); end
+
+ # Retrieves a product_feature, which represents a feature attachment to a product
+ sig {
+ params(product: String, id: String, params: T.any(::Stripe::ProductFeatureService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ProductFeature)
+ }
+ def retrieve(product, id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/product_service.rbi b/rbi/stripe/services/product_service.rbi
new file mode 100644
index 00000000..d5b5a837
--- /dev/null
+++ b/rbi/stripe/services/product_service.rbi
@@ -0,0 +1,479 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ProductService < StripeService
+ attr_reader :features
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ sig { returns(String) }
+ attr_accessor :name
+ sig { params(name: String).void }
+ def initialize(name: nil); end
+ end
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :width
+ sig { params(height: Float, length: Float, weight: Float, width: Float).void }
+ def initialize(height: nil, length: nil, weight: nil, width: nil); end
+ end
+ # Whether the product is available for purchase.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_price
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::ProductService::UpdateParams::MarketingFeature]))))
+ }
+ attr_accessor :marketing_features
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::ProductService::UpdateParams::PackageDimensions))))
+ }
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :tax_code
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :url
+ sig {
+ params(active: T.nilable(T::Boolean), default_price: T.nilable(String), description: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), images: T.nilable(T.nilable(T.any(String, T::Array[String]))), marketing_features: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::ProductService::UpdateParams::MarketingFeature]))), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), name: T.nilable(String), package_dimensions: T.nilable(T.nilable(T.any(String, ::Stripe::ProductService::UpdateParams::PackageDimensions))), shippable: T.nilable(T::Boolean), statement_descriptor: T.nilable(String), tax_code: T.nilable(T.nilable(String)), unit_label: T.nilable(T.nilable(String)), url: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ active: nil,
+ default_price: nil,
+ description: nil,
+ expand: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ unit_label: nil,
+ url: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return products that are active or inactive (e.g., pass `false` to list all inactive products).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Only return products that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::ProductService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :ids
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return products that can be shipped (i.e., physical, not digital products).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :shippable
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return products of this type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # Only return products with the given url.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::ProductService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), ids: T.nilable(T::Array[String]), limit: T.nilable(Integer), shippable: T.nilable(T::Boolean), starting_after: T.nilable(String), type: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ ids: nil,
+ limit: nil,
+ shippable: nil,
+ starting_after: nil,
+ type: nil,
+ url: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DefaultPriceData < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Tier < Stripe::RequestParams
+ # The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flat_amount_decimal
+ # The per unit billing amount for each individual unit for which this tier applies.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :up_to
+ sig {
+ params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void
+ }
+ def initialize(
+ flat_amount: nil,
+ flat_amount_decimal: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil,
+ up_to: nil
+ ); end
+ end
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig {
+ returns(T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount))
+ }
+ attr_accessor :custom_unit_amount
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::Tier]))
+ }
+ attr_accessor :tiers
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(custom_unit_amount: T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ custom_unit_amount: nil,
+ tax_behavior: nil,
+ tiers: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class CustomUnitAmount < Stripe::RequestParams
+ # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # The maximum unit amount the customer can specify for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :maximum
+ # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum
+ # The starting unit amount which can be updated by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :preset
+ sig {
+ params(enabled: T::Boolean, maximum: T.nilable(Integer), minimum: T.nilable(Integer), preset: T.nilable(Integer)).void
+ }
+ def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end
+ end
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ sig {
+ returns(T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount))
+ }
+ attr_accessor :custom_unit_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring))
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount), metadata: T.nilable(T::Hash[String, String]), recurring: T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ currency_options: nil,
+ custom_unit_amount: nil,
+ metadata: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ class MarketingFeature < Stripe::RequestParams
+ # The marketing feature name. Up to 80 characters long.
+ sig { returns(String) }
+ attr_accessor :name
+ sig { params(name: String).void }
+ def initialize(name: nil); end
+ end
+ class PackageDimensions < Stripe::RequestParams
+ # Height, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :height
+ # Length, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :length
+ # Weight, in ounces. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :weight
+ # Width, in inches. Maximum precision is 2 decimal places.
+ sig { returns(Float) }
+ attr_accessor :width
+ sig { params(height: Float, length: Float, weight: Float, width: Float).void }
+ def initialize(height: nil, length: nil, weight: nil, width: nil); end
+ end
+ # Whether the product is currently available for purchase. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
+ sig { returns(T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData)) }
+ attr_accessor :default_price_data
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :images
+ # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ sig { returns(T.nilable(T::Array[::Stripe::ProductService::CreateParams::MarketingFeature])) }
+ attr_accessor :marketing_features
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The product's name, meant to be displayable to the customer.
+ sig { returns(String) }
+ attr_accessor :name
+ # The dimensions of this product for shipping purposes.
+ sig { returns(T.nilable(::Stripe::ProductService::CreateParams::PackageDimensions)) }
+ attr_accessor :package_dimensions
+ # Whether this product is shipped (i.e., physical goods).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :shippable
+ # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ #
+ # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ # It must contain at least one letter. Only used for subscription payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_label
+ # A URL of a publicly-accessible webpage for this product.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(active: T.nilable(T::Boolean), default_price_data: T.nilable(::Stripe::ProductService::CreateParams::DefaultPriceData), description: T.nilable(String), expand: T.nilable(T::Array[String]), id: T.nilable(String), images: T.nilable(T::Array[String]), marketing_features: T.nilable(T::Array[::Stripe::ProductService::CreateParams::MarketingFeature]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::ProductService::CreateParams::PackageDimensions), shippable: T.nilable(T::Boolean), statement_descriptor: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String), unit_label: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ default_price_data: nil,
+ description: nil,
+ expand: nil,
+ id: nil,
+ images: nil,
+ marketing_features: nil,
+ metadata: nil,
+ name: nil,
+ package_dimensions: nil,
+ shippable: nil,
+ statement_descriptor: nil,
+ tax_code: nil,
+ type: nil,
+ unit_label: nil,
+ url: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ # Creates a new product object.
+ sig {
+ params(params: T.any(::Stripe::ProductService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
+ sig {
+ params(id: String, params: T.any(::Stripe::ProductService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def delete(id, params = {}, opts = {}); end
+
+ # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
+ sig {
+ params(params: T.any(::Stripe::ProductService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
+ sig {
+ params(id: String, params: T.any(::Stripe::ProductService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Search for products you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::ProductService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(id: String, params: T.any(::Stripe::ProductService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product)
+ }
+ def update(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/promotion_code_service.rbi b/rbi/stripe/services/promotion_code_service.rbi
new file mode 100644
index 00000000..28b56a41
--- /dev/null
+++ b/rbi/stripe/services/promotion_code_service.rbi
@@ -0,0 +1,214 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class PromotionCodeService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Filter promotion codes by whether they are active.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Only return promotion codes that have this case-insensitive code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # Only return promotion codes for this coupon.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig {
+ returns(T.nilable(T.any(::Stripe::PromotionCodeService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return promotion codes that are restricted to this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), code: T.nilable(String), coupon: T.nilable(String), created: T.nilable(T.any(::Stripe::PromotionCodeService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_amount
+ sig { params(minimum_amount: T.nilable(Integer)).void }
+ def initialize(minimum_amount: nil); end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::PromotionCodeService::CreateParams::Restrictions::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :first_time_transaction
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_amount
+ # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ sig { returns(T.nilable(String)) }
+ attr_accessor :minimum_amount_currency
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::PromotionCodeService::CreateParams::Restrictions::CurrencyOptions]), first_time_transaction: T.nilable(T::Boolean), minimum_amount: T.nilable(Integer), minimum_amount_currency: T.nilable(String)).void
+ }
+ def initialize(
+ currency_options: nil,
+ first_time_transaction: nil,
+ minimum_amount: nil,
+ minimum_amount_currency: nil
+ ); end
+ end
+ # Whether the promotion code is currently active.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ #
+ # If left blank, we will generate one automatically.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ # The coupon for this promotion code.
+ sig { returns(String) }
+ attr_accessor :coupon
+ # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :max_redemptions
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ sig { returns(T.nilable(::Stripe::PromotionCodeService::CreateParams::Restrictions)) }
+ attr_accessor :restrictions
+ sig {
+ params(active: T.nilable(T::Boolean), code: T.nilable(String), coupon: String, customer: T.nilable(String), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), max_redemptions: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), restrictions: T.nilable(::Stripe::PromotionCodeService::CreateParams::Restrictions)).void
+ }
+ def initialize(
+ active: nil,
+ code: nil,
+ coupon: nil,
+ customer: nil,
+ expand: nil,
+ expires_at: nil,
+ max_redemptions: nil,
+ metadata: nil,
+ restrictions: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Restrictions < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minimum_amount
+ sig { params(minimum_amount: T.nilable(Integer)).void }
+ def initialize(minimum_amount: nil); end
+ end
+ # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::PromotionCodeService::UpdateParams::Restrictions::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::PromotionCodeService::UpdateParams::Restrictions::CurrencyOptions])).void
+ }
+ def initialize(currency_options: nil); end
+ end
+ # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Settings that restrict the redemption of the promotion code.
+ sig { returns(T.nilable(::Stripe::PromotionCodeService::UpdateParams::Restrictions)) }
+ attr_accessor :restrictions
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), restrictions: T.nilable(::Stripe::PromotionCodeService::UpdateParams::Restrictions)).void
+ }
+ def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil); end
+ end
+ # A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
+ sig {
+ params(params: T.any(::Stripe::PromotionCodeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of your promotion codes.
+ sig {
+ params(params: T.any(::Stripe::PromotionCodeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
+ sig {
+ params(promotion_code: String, params: T.any(::Stripe::PromotionCodeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode)
+ }
+ def retrieve(promotion_code, params = {}, opts = {}); end
+
+ # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
+ sig {
+ params(promotion_code: String, params: T.any(::Stripe::PromotionCodeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode)
+ }
+ def update(promotion_code, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi b/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi
new file mode 100644
index 00000000..0c9814b6
--- /dev/null
+++ b/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class QuoteComputedUpfrontLineItemsService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteComputedUpfrontLineItemsService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(quote, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/quote_line_item_service.rbi b/rbi/stripe/services/quote_line_item_service.rbi
new file mode 100644
index 00000000..a89e9926
--- /dev/null
+++ b/rbi/stripe/services/quote_line_item_service.rbi
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class QuoteLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # When retrieving a quote, 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.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(quote, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/quote_service.rbi b/rbi/stripe/services/quote_service.rbi
new file mode 100644
index 00000000..5038bae3
--- /dev/null
+++ b/rbi/stripe/services/quote_service.rbi
@@ -0,0 +1,686 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class QuoteService < StripeService
+ attr_reader :line_items
+ attr_reader :computed_upfront_line_items
+ class ListParams < Stripe::RequestParams
+ # The ID of the customer whose quotes will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the quote.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ sig {
+ params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
+ }
+ def initialize(
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class FromQuote < Stripe::RequestParams
+ # Whether this quote is a revision of the previous quote.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_revision
+ # The `id` of the quote that will be cloned.
+ sig { returns(String) }
+ attr_accessor :quote
+ sig { params(is_revision: T.nilable(T::Boolean), quote: String).void }
+ def initialize(is_revision: nil, quote: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer)) }
+ attr_accessor :issuer
+ sig {
+ params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(days_until_due: nil, issuer: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring))
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The discounts applied to this line item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]))))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData)) }
+ attr_accessor :price_data
+ # The quantity of the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]))), price: T.nilable(String), price_data: T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :trial_period_days
+ sig {
+ params(description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ description: nil,
+ effective_date: nil,
+ metadata: nil,
+ trial_period_days: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig {
+ params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
+ }
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :application_fee_amount
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The discounts applied to the quote.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer
+ # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::FromQuote)) }
+ attr_accessor :from_quote
+ # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ sig { returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem])) }
+ attr_accessor :line_items
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # ID of the test clock to attach to the quote.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ # The data with which to automatically create a Transfer for each of the invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax), collection_method: T.nilable(String), customer: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), from_quote: T.nilable(::Stripe::QuoteService::CreateParams::FromQuote), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData), test_clock: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::TransferData)))).void
+ }
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ from_quote: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ test_clock: nil,
+ transfer_data: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability)) }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer)) }
+ attr_accessor :issuer
+ sig {
+ params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(days_until_due: nil, issuer: nil); end
+ end
+ class LineItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring))
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The discounts applied to this line item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]))))
+ }
+ attr_accessor :discounts
+ # The ID of an existing line item on the quote.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData)) }
+ attr_accessor :price_data
+ # The quantity of the line item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]))), id: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ id: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class SubscriptionData < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :effective_date
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Integer representing the number of trial period days before the customer is charged for the first time.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :trial_period_days
+ sig {
+ params(description: T.nilable(T.nilable(String)), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void
+ }
+ def initialize(
+ description: nil,
+ effective_date: nil,
+ metadata: nil,
+ trial_period_days: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig {
+ params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
+ }
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
+ end
+ # 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. There cannot be any line items with recurring prices when using this field.
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :application_fee_amount
+ # 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.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # A description that will be displayed on the quote PDF.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The discounts applied to the quote.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ # A footer that will be displayed on the quote PDF.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :footer
+ # A header that will be displayed on the quote PDF.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :header
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ sig { returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem])) }
+ attr_accessor :line_items
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData)) }
+ attr_accessor :subscription_data
+ # The data with which to automatically create a Transfer for each of the invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::UpdateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax), collection_method: T.nilable(String), customer: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::UpdateParams::TransferData)))).void
+ }
+ def initialize(
+ application_fee_amount: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ collection_method: nil,
+ customer: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ expires_at: nil,
+ footer: nil,
+ header: nil,
+ invoice_settings: nil,
+ line_items: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ subscription_data: nil,
+ transfer_data: nil
+ ); end
+ end
+ class AcceptParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FinalizeQuoteParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ sig { params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer)).void }
+ def initialize(expand: nil, expires_at: nil); end
+ end
+ class PdfParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Accepts the specified quote.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteService::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def accept(quote, params = {}, opts = {}); end
+
+ # Cancels the quote.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def cancel(quote, params = {}, opts = {}); end
+
+ # A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
+ sig {
+ params(params: T.any(::Stripe::QuoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Finalizes the quote.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteService::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def finalize_quote(quote, params = {}, opts = {}); end
+
+ # Returns a list of your quotes.
+ sig {
+ params(params: T.any(::Stripe::QuoteService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteService::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
+ }
+ def pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end
+
+ # Retrieves the quote with the given ID.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def retrieve(quote, params = {}, opts = {}); end
+
+ # A quote models prices and services for a customer.
+ sig {
+ params(quote: String, params: T.any(::Stripe::QuoteService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
+ }
+ def update(quote, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/radar/early_fraud_warning_service.rbi b/rbi/stripe/services/radar/early_fraud_warning_service.rbi
new file mode 100644
index 00000000..1090fcf1
--- /dev/null
+++ b/rbi/stripe/services/radar/early_fraud_warning_service.rbi
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Radar
+ class EarlyFraudWarningService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return early fraud warnings for the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return early fraud warnings that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Radar::EarlyFraudWarningService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::Radar::EarlyFraudWarningService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of early fraud warnings.
+ sig {
+ params(params: T.any(::Stripe::Radar::EarlyFraudWarningService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an early fraud warning that has previously been created.
+ #
+ # Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details.
+ sig {
+ params(early_fraud_warning: String, params: T.any(::Stripe::Radar::EarlyFraudWarningService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::EarlyFraudWarning)
+ }
+ def retrieve(early_fraud_warning, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/radar/value_list_item_service.rbi b/rbi/stripe/services/radar/value_list_item_service.rbi
new file mode 100644
index 00000000..dffd05bf
--- /dev/null
+++ b/rbi/stripe/services/radar/value_list_item_service.rbi
@@ -0,0 +1,111 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Radar
+ class ValueListItemService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return items that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Radar::ValueListItemService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Return items belonging to the parent list whose value matches the specified value (using an "is like" match).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :value
+ # Identifier for the parent value list this item belongs to.
+ sig { returns(String) }
+ attr_accessor :value_list
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Radar::ValueListItemService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), value: T.nilable(String), value_list: String).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ value: nil,
+ value_list: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The value of the item (whose type must match the type of the parent value list).
+ sig { returns(String) }
+ attr_accessor :value
+ # The identifier of the value list which the created item will be added to.
+ sig { returns(String) }
+ attr_accessor :value_list
+ sig { params(expand: T.nilable(T::Array[String]), value: String, value_list: String).void }
+ def initialize(expand: nil, value: nil, value_list: nil); end
+ end
+ # Creates a new ValueListItem object, which is added to the specified parent value list.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListItemService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a ValueListItem object, removing it from its parent value list.
+ sig {
+ params(item: String, params: T.any(::Stripe::Radar::ValueListItemService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem)
+ }
+ def delete(item, params = {}, opts = {}); end
+
+ # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a ValueListItem object.
+ sig {
+ params(item: String, params: T.any(::Stripe::Radar::ValueListItemService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem)
+ }
+ def retrieve(item, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/radar/value_list_service.rbi b/rbi/stripe/services/radar/value_list_service.rbi
new file mode 100644
index 00000000..95ef60ef
--- /dev/null
+++ b/rbi/stripe/services/radar/value_list_service.rbi
@@ -0,0 +1,143 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Radar
+ class ValueListService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(alias_: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: T.nilable(String)).void
+ }
+ def initialize(alias_: nil, expand: nil, metadata: nil, name: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # The alias used to reference the value list when writing rules.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :alias
+ # A value contained within a value list - returns all value lists containing this value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :contains
+ # Only return value lists that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Radar::ValueListService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(alias_: T.nilable(String), contains: T.nilable(String), created: T.nilable(T.any(::Stripe::Radar::ValueListService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ alias_: nil,
+ contains: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # The name of the value list for use in rules.
+ sig { returns(String) }
+ attr_accessor :alias
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :item_type
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The human-readable name of the value list.
+ sig { returns(String) }
+ attr_accessor :name
+ sig {
+ params(alias_: String, expand: T.nilable(T::Array[String]), item_type: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), name: String).void
+ }
+ def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil); end
+ end
+ # Creates a new ValueList object, which can then be referenced in rules.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
+ sig {
+ params(value_list: String, params: T.any(::Stripe::Radar::ValueListService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def delete(value_list, params = {}, opts = {}); end
+
+ # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::Radar::ValueListService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a ValueList object.
+ sig {
+ params(value_list: String, params: T.any(::Stripe::Radar::ValueListService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def retrieve(value_list, params = {}, opts = {}); end
+
+ # Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.
+ sig {
+ params(value_list: String, params: T.any(::Stripe::Radar::ValueListService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList)
+ }
+ def update(value_list, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/radar_service.rbi b/rbi/stripe/services/radar_service.rbi
new file mode 100644
index 00000000..0d749108
--- /dev/null
+++ b/rbi/stripe/services/radar_service.rbi
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class RadarService < StripeService
+ attr_reader :early_fraud_warnings
+ attr_reader :value_lists
+ attr_reader :value_list_items
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/refund_service.rbi b/rbi/stripe/services/refund_service.rbi
new file mode 100644
index 00000000..167b19f1
--- /dev/null
+++ b/rbi/stripe/services/refund_service.rbi
@@ -0,0 +1,185 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class RefundService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return refunds for the charge specified by this charge ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Only return refunds that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::RefundService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return refunds for the PaymentIntent specified by this ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(charge: T.nilable(String), created: T.nilable(T.any(::Stripe::RefundService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_intent: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ charge: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Attribute for param field amount
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # The identifier of the charge to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Customer whose customer balance to refund from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :instructions_email
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Origin of the refund
+ sig { returns(T.nilable(String)) }
+ attr_accessor :origin
+ # The identifier of the PaymentIntent to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reason
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_application_fee
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :reverse_transfer
+ sig {
+ params(amount: T.nilable(Integer), charge: T.nilable(String), currency: T.nilable(String), customer: T.nilable(String), expand: T.nilable(T::Array[String]), instructions_email: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), origin: T.nilable(String), payment_intent: T.nilable(String), reason: T.nilable(String), refund_application_fee: T.nilable(T::Boolean), reverse_transfer: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ charge: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ instructions_email: nil,
+ metadata: nil,
+ origin: nil,
+ payment_intent: nil,
+ reason: nil,
+ refund_application_fee: nil,
+ reverse_transfer: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels a refund with a status of requires_action.
+ #
+ # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
+ sig {
+ params(refund: String, params: T.any(::Stripe::RefundService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def cancel(refund, params = {}, opts = {}); end
+
+ # When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
+ #
+ # Creating a new refund will refund a charge that has previously been created but not yet refunded.
+ # Funds will be refunded to the credit or debit card that was originally charged.
+ #
+ # You can optionally refund only part of a charge.
+ # You can do so multiple times, until the entire charge has been refunded.
+ #
+ # Once entirely refunded, a charge can't be refunded again.
+ # This method will raise an error when called on an already-refunded charge,
+ # or when trying to refund more money than is left on a charge.
+ sig {
+ params(params: T.any(::Stripe::RefundService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.
+ sig {
+ params(params: T.any(::Stripe::RefundService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing refund.
+ sig {
+ params(refund: String, params: T.any(::Stripe::RefundService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def retrieve(refund, params = {}, opts = {}); end
+
+ # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged.
+ #
+ # This request only accepts metadata as an argument.
+ sig {
+ params(refund: String, params: T.any(::Stripe::RefundService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def update(refund, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/reporting/report_run_service.rbi b/rbi/stripe/services/reporting/report_run_service.rbi
new file mode 100644
index 00000000..c0e02d68
--- /dev/null
+++ b/rbi/stripe/services/reporting/report_run_service.rbi
@@ -0,0 +1,135 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Reporting
+ class ReportRunService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return Report Runs that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Reporting::ReportRunService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Reporting::ReportRunService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Parameters < Stripe::RequestParams
+ # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :columns
+ # Connected account ID to filter for in the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :connected_account
+ # Currency of objects to be included in the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Ending timestamp of data to be included in the report run (exclusive).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_end
+ # Starting timestamp of data to be included in the report run.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_start
+ # Payout ID by which to filter the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payout
+ # Category of balance transactions to be included in the report run.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reporting_category
+ # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :timezone
+ sig {
+ params(columns: T.nilable(T::Array[String]), connected_account: T.nilable(String), currency: T.nilable(String), interval_end: T.nilable(Integer), interval_start: T.nilable(Integer), payout: T.nilable(String), reporting_category: T.nilable(String), timezone: T.nilable(String)).void
+ }
+ def initialize(
+ columns: nil,
+ connected_account: nil,
+ currency: nil,
+ interval_end: nil,
+ interval_start: nil,
+ payout: nil,
+ reporting_category: nil,
+ timezone: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
+ sig { returns(T.nilable(::Stripe::Reporting::ReportRunService::CreateParams::Parameters)) }
+ attr_accessor :parameters
+ # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.
+ sig { returns(String) }
+ attr_accessor :report_type
+ sig {
+ params(expand: T.nilable(T::Array[String]), parameters: T.nilable(::Stripe::Reporting::ReportRunService::CreateParams::Parameters), report_type: String).void
+ }
+ def initialize(expand: nil, parameters: nil, report_type: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
+ sig {
+ params(params: T.any(::Stripe::Reporting::ReportRunService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportRun)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of Report Runs, with the most recent appearing first.
+ sig {
+ params(params: T.any(::Stripe::Reporting::ReportRunService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing Report Run.
+ sig {
+ params(report_run: String, params: T.any(::Stripe::Reporting::ReportRunService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportRun)
+ }
+ def retrieve(report_run, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/reporting/report_type_service.rbi b/rbi/stripe/services/reporting/report_type_service.rbi
new file mode 100644
index 00000000..b9382c4f
--- /dev/null
+++ b/rbi/stripe/services/reporting/report_type_service.rbi
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Reporting
+ class ReportTypeService < StripeService
+ class ListParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a full list of Report Types.
+ sig {
+ params(params: T.any(::Stripe::Reporting::ReportTypeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
+ sig {
+ params(report_type: String, params: T.any(::Stripe::Reporting::ReportTypeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportType)
+ }
+ def retrieve(report_type, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/reporting_service.rbi b/rbi/stripe/services/reporting_service.rbi
new file mode 100644
index 00000000..129278a4
--- /dev/null
+++ b/rbi/stripe/services/reporting_service.rbi
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ReportingService < StripeService
+ attr_reader :report_runs
+ attr_reader :report_types
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/review_service.rbi b/rbi/stripe/services/review_service.rbi
new file mode 100644
index 00000000..ec885e9b
--- /dev/null
+++ b/rbi/stripe/services/review_service.rbi
@@ -0,0 +1,84 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ReviewService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return reviews that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::ReviewService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::ReviewService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ApproveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Approves a Review object, closing it and removing it from the list of reviews.
+ sig {
+ params(review: String, params: T.any(::Stripe::ReviewService::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review)
+ }
+ def approve(review, params = {}, opts = {}); end
+
+ # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
+ sig {
+ params(params: T.any(::Stripe::ReviewService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a Review object.
+ sig {
+ params(review: String, params: T.any(::Stripe::ReviewService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review)
+ }
+ def retrieve(review, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/setup_attempt_service.rbi b/rbi/stripe/services/setup_attempt_service.rbi
new file mode 100644
index 00000000..3dce2ca7
--- /dev/null
+++ b/rbi/stripe/services/setup_attempt_service.rbi
@@ -0,0 +1,65 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SetupAttemptService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A filter on the list, based on the object `created` field. The value
+ # can be a string with an integer Unix timestamp or a
+ # dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::SetupAttemptService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return SetupAttempts created by the SetupIntent specified by
+ # this ID.
+ sig { returns(String) }
+ attr_accessor :setup_intent
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::SetupAttemptService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), setup_intent: String, starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ setup_intent: nil,
+ starting_after: nil
+ ); end
+ end
+ # Returns a list of SetupAttempts that associate with a provided SetupIntent.
+ sig {
+ params(params: T.any(::Stripe::SetupAttemptService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/setup_intent_service.rbi b/rbi/stripe/services/setup_intent_service.rbi
new file mode 100644
index 00000000..896cb164
--- /dev/null
+++ b/rbi/stripe/services/setup_intent_service.rbi
@@ -0,0 +1,3596 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SetupIntentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :attach_to_self
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::SetupIntentService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return SetupIntents for the customer specified by this customer ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return SetupIntents that associate with the specified payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(attach_to_self: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::SetupIntentService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), payment_method: T.nilable(String), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ attach_to_self: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ payment_method: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AutomaticPaymentMethods < Stripe::RequestParams
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
+ #
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redirects
+ # Whether this feature is enabled.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(allow_redirects: T.nilable(String), enabled: T::Boolean).void }
+ def initialize(allow_redirects: nil, enabled: nil); end
+ end
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(String) }
+ attr_accessor :user_agent
+ sig { params(ip_address: String, user_agent: String).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig { returns(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance) }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: ::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, currency: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: T.nilable(String), electronic_commerce_indicator: T.nilable(String), network_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: T.nilable(String), version: T.nilable(String)).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_three_d_secure: T.nilable(String), three_d_secure: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ sig { params(persistent_token: T.nilable(String)).void }
+ def initialize(persistent_token: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_agreement_id
+ sig { params(billing_agreement_id: T.nilable(String)).void }
+ def initialize(billing_agreement_id: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ ); end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent))
+ }
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link))
+ }
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ class SingleUse < Stripe::RequestParams
+ # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ sig { params(amount: Integer, currency: String).void }
+ def initialize(amount: nil, currency: nil); end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :attach_to_self
+ # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::CreateParams::AutomaticPaymentMethods))
+ }
+ attr_accessor :automatic_payment_methods
+ # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :confirm
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :flow_directions
+ # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::CreateParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Stripe account ID created for this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
+ #
+ # Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::SingleUse)) }
+ attr_accessor :single_use
+ # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(attach_to_self: T.nilable(T::Boolean), automatic_payment_methods: T.nilable(::Stripe::SetupIntentService::CreateParams::AutomaticPaymentMethods), confirm: T.nilable(T::Boolean), confirmation_token: T.nilable(String), customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), flow_directions: T.nilable(T::Array[String]), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::CreateParams::MandateData))), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String]), return_url: T.nilable(String), single_use: T.nilable(::Stripe::SetupIntentService::CreateParams::SingleUse), usage: T.nilable(String), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ attach_to_self: nil,
+ automatic_payment_methods: nil,
+ confirm: nil,
+ confirmation_token: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ mandate_data: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil,
+ return_url: nil,
+ single_use: nil,
+ usage: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_secret
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(client_secret: T.nilable(String), expand: T.nilable(T::Array[String])).void }
+ def initialize(client_secret: nil, expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, currency: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: T.nilable(String), electronic_commerce_indicator: T.nilable(String), network_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: T.nilable(String), version: T.nilable(String)).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_three_d_secure: T.nilable(String), three_d_secure: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ sig { params(persistent_token: T.nilable(String)).void }
+ def initialize(persistent_token: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_agreement_id
+ sig { params(billing_agreement_id: T.nilable(String)).void }
+ def initialize(billing_agreement_id: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ ); end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent))
+ }
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link))
+ }
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ #
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :attach_to_self
+ # ID of the Customer this SetupIntent belongs to, if one exists.
+ #
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Indicates the directions of money movement for which this payment method is intended to be used.
+ #
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :flow_directions
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method_configuration
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :payment_method_types
+ sig {
+ params(attach_to_self: T.nilable(T::Boolean), customer: T.nilable(String), description: T.nilable(String), expand: T.nilable(T::Array[String]), flow_directions: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), payment_method: T.nilable(String), payment_method_configuration: T.nilable(String), payment_method_data: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions), payment_method_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ attach_to_self: nil,
+ customer: nil,
+ description: nil,
+ expand: nil,
+ flow_directions: nil,
+ metadata: nil,
+ payment_method: nil,
+ payment_method_configuration: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ payment_method_types: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cancellation_reason
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(cancellation_reason: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(cancellation_reason: nil, expand: nil); end
+ end
+ class ConfirmParams < Stripe::RequestParams
+ class MandateData < Stripe::RequestParams
+ class CustomerAcceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+
+ end
+ class Online < Stripe::RequestParams
+ # The IP address from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # The user agent of the browser from which the Mandate was accepted by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig { params(ip_address: T.nilable(String), user_agent: T.nilable(String)).void }
+ def initialize(ip_address: nil, user_agent: nil); end
+ end
+ # The time at which the customer accepted the Mandate.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :accepted_at
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline))
+ }
+ attr_accessor :offline
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online))
+ }
+ attr_accessor :online
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(accepted_at: T.nilable(Integer), offline: T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline), online: T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online), type: String).void
+ }
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end
+ end
+ # This hash contains details about the customer acceptance of the Mandate.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance))
+ }
+ attr_accessor :customer_acceptance
+ sig {
+ params(customer_acceptance: T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance)).void
+ }
+ def initialize(customer_acceptance: nil); end
+ end
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # A URL for custom mandate text to render during confirmation step.
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :custom_mandate_url
+ # List of Stripe products where this mandate can be selected automatically.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :default_for
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval_description
+ # Payment schedule for the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_schedule
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig {
+ params(custom_mandate_url: T.nilable(T.nilable(String)), default_for: T.nilable(T::Array[String]), interval_description: T.nilable(String), payment_schedule: T.nilable(String), transaction_type: T.nilable(String)).void
+ }
+ def initialize(
+ custom_mandate_url: nil,
+ default_for: nil,
+ interval_description: nil,
+ payment_schedule: nil,
+ transaction_type: nil
+ ); end
+ end
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(currency: T.nilable(String), mandate_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil); end
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class BacsDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(String) }
+ attr_accessor :amount_type
+ # Currency in which future payments will be charged. 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ # Unique identifier for the mandate or subscription.
+ sig { returns(String) }
+ attr_accessor :reference
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ sig { returns(Integer) }
+ attr_accessor :start_date
+ # Specifies the type of mandates supported. Possible values are `india`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :supported_types
+ sig {
+ params(amount: Integer, amount_type: String, currency: String, description: T.nilable(String), end_date: T.nilable(Integer), interval: String, interval_count: T.nilable(Integer), reference: String, start_date: Integer, supported_types: T.nilable(T::Array[String])).void
+ }
+ def initialize(
+ amount: nil,
+ amount_type: nil,
+ currency: nil,
+ description: nil,
+ end_date: nil,
+ interval: nil,
+ interval_count: nil,
+ reference: nil,
+ start_date: nil,
+ supported_types: nil
+ ); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ class NetworkOptions < Stripe::RequestParams
+ class CartesBancaires < Stripe::RequestParams
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ # messageExtension: CB-AVALGO
+ sig { returns(String) }
+ attr_accessor :cb_avalgo
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
+ # message extension: CB-EXEMPTION; string (4 characters)
+ # This is a 3 byte bitmap (low significant byte first and most significant
+ # bit first) that has been Base64 encoded
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cb_exemption
+ # The risk score returned from Cartes Bancaires in the ARes.
+ # message extension: CB-SCORE; numeric value 0-99
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cb_score
+ sig {
+ params(cb_avalgo: String, cb_exemption: T.nilable(String), cb_score: T.nilable(Integer)).void
+ }
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end
+ end
+ # Cartes Bancaires-specific 3DS fields.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires))
+ }
+ attr_accessor :cartes_bancaires
+ sig {
+ params(cartes_bancaires: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires)).void
+ }
+ def initialize(cartes_bancaires: nil); end
+ end
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ares_trans_status
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ # (Most 3D Secure providers will return the base64-encoded version, which
+ # is what you should specify here.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cryptogram
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ # provider and indicates what degree of authentication was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :electronic_commerce_indicator
+ # Network specific 3DS fields. Network specific arguments require an
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
+ # must be populated accordingly
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions))
+ }
+ attr_accessor :network_options
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :requestor_challenge_indicator
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ # Transaction ID (dsTransID).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_id
+ # The version of 3D Secure that was performed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :version
+ sig {
+ params(ares_trans_status: T.nilable(String), cryptogram: T.nilable(String), electronic_commerce_indicator: T.nilable(String), network_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions), requestor_challenge_indicator: T.nilable(String), transaction_id: T.nilable(String), version: T.nilable(String)).void
+ }
+ def initialize(
+ ares_trans_status: nil,
+ cryptogram: nil,
+ electronic_commerce_indicator: nil,
+ network_options: nil,
+ requestor_challenge_indicator: nil,
+ transaction_id: nil,
+ version: nil
+ ); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # When specified, this parameter signals that a card has been collected
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ # parameter can only be provided during confirmation.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :moto
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ # If 3D Secure authentication was performed with a third-party provider,
+ # the authentication details to use for this setup.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions), moto: T.nilable(T::Boolean), network: T.nilable(String), request_three_d_secure: T.nilable(String), three_d_secure: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure)).void
+ }
+ def initialize(
+ mandate_options: nil,
+ moto: nil,
+ network: nil,
+ request_three_d_secure: nil,
+ three_d_secure: nil
+ ); end
+ end
+ class CardPresent < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+ # [Deprecated] This is a legacy parameter that no longer has any function.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :persistent_token
+ sig { params(persistent_token: T.nilable(String)).void }
+ def initialize(persistent_token: nil); end
+ end
+ class Paypal < Stripe::RequestParams
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_agreement_id
+ sig { params(billing_agreement_id: T.nilable(String)).void }
+ def initialize(billing_agreement_id: nil); end
+ end
+ class SepaDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :reference_prefix
+ sig { params(reference_prefix: T.nilable(T.nilable(String))).void }
+ def initialize(reference_prefix: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions)).void
+ }
+ def initialize(mandate_options: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ sig {
+ params(filters: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String]), return_url: T.nilable(String)).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil); end
+ end
+ class MandateOptions < Stripe::RequestParams
+ # The method used to collect offline mandate customer acceptance.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :collection_method
+ sig { params(collection_method: T.nilable(T.nilable(String))).void }
+ def initialize(collection_method: nil); end
+ end
+ class Networks < Stripe::RequestParams
+ # Triggers validations to run across the selected networks
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :requested
+ sig { params(requested: T.nilable(T::Array[String])).void }
+ def initialize(requested: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Additional fields for network related functions
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks))
+ }
+ attr_accessor :networks
+ # Bank account verification method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), verification_method: T.nilable(String)).void
+ }
+ def initialize(
+ financial_connections: nil,
+ mandate_options: nil,
+ networks: nil,
+ verification_method: nil
+ ); end
+ end
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # Configuration for any card setup attempted on this SetupIntent.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card))
+ }
+ attr_accessor :card
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent))
+ }
+ attr_accessor :card_present
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link))
+ }
+ attr_accessor :link
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ sig {
+ returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit), amazon_pay: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay), bacs_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit), card: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent), link: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link), paypal: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ amazon_pay: nil,
+ bacs_debit: nil,
+ card: nil,
+ card_present: nil,
+ link: nil,
+ paypal: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
+ #
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :confirmation_token
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Attribute for param field mandate_data
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::ConfirmParams::MandateData))))
+ }
+ attr_accessor :mandate_data
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ # value in the SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData)) }
+ attr_accessor :payment_method_data
+ # Payment method-specific configuration for this SetupIntent.
+ sig { returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions)) }
+ attr_accessor :payment_method_options
+ # The URL to redirect your customer back to after they authenticate 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.
+ # This parameter is only used for cards and other redirect-based payment methods.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :use_stripe_sdk
+ sig {
+ params(confirmation_token: T.nilable(String), expand: T.nilable(T::Array[String]), mandate_data: T.nilable(T.nilable(T.any(String, ::Stripe::SetupIntentService::ConfirmParams::MandateData))), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions), return_url: T.nilable(String), use_stripe_sdk: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ confirmation_token: nil,
+ expand: nil,
+ mandate_data: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ payment_method_options: nil,
+ return_url: nil,
+ use_stripe_sdk: nil
+ ); end
+ end
+ class VerifyMicrodepositsParams < Stripe::RequestParams
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :amounts
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :descriptor_code
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig {
+ params(amounts: T.nilable(T::Array[Integer]), descriptor_code: T.nilable(String), expand: T.nilable(T::Array[String])).void
+ }
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil); end
+ end
+ # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
+ #
+ # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def cancel(intent, params = {}, opts = {}); end
+
+ # Confirm that your customer intends to set up the current or
+ # provided payment method. For example, you would confirm a SetupIntent
+ # when a customer hits the “Save” button on a payment method management
+ # page on your website.
+ #
+ # If the selected payment method does not require any additional
+ # steps from the customer, the SetupIntent will transition to the
+ # succeeded status.
+ #
+ # Otherwise, it will transition to the requires_action status and
+ # suggest additional actions via next_action. If setup fails,
+ # the SetupIntent will transition to the
+ # requires_payment_method status or the canceled status if the
+ # confirmation limit is reached.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntentService::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def confirm(intent, params = {}, opts = {}); end
+
+ # Creates a SetupIntent object.
+ #
+ # After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm)
+ # it to collect any required permissions to charge the payment method later.
+ sig {
+ params(params: T.any(::Stripe::SetupIntentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of SetupIntents.
+ sig {
+ params(params: T.any(::Stripe::SetupIntentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a SetupIntent that has previously been created.
+ #
+ # Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
+ #
+ # When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def retrieve(intent, params = {}, opts = {}); end
+
+ # Updates a SetupIntent object.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntentService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def update(intent, params = {}, opts = {}); end
+
+ # Verifies microdeposits on a SetupIntent object.
+ sig {
+ params(intent: String, params: T.any(::Stripe::SetupIntentService::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent)
+ }
+ def verify_microdeposits(intent, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/shipping_rate_service.rbi b/rbi/stripe/services/shipping_rate_service.rbi
new file mode 100644
index 00000000..fc3176db
--- /dev/null
+++ b/rbi/stripe/services/shipping_rate_service.rbi
@@ -0,0 +1,241 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class ShippingRateService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return shipping rates that are active or inactive.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::ShippingRateService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return shipping rates for the given currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::ShippingRateService::ListParams::Created, Integer)), currency: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ currency: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DeliveryEstimate < Stripe::RequestParams
+ class Maximum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ class Minimum < Stripe::RequestParams
+ # A unit of time.
+ sig { returns(String) }
+ attr_accessor :unit
+ # Must be greater than 0.
+ sig { returns(Integer) }
+ attr_accessor :value
+ sig { params(unit: String, value: Integer).void }
+ def initialize(unit: nil, value: nil); end
+ end
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ sig {
+ returns(T.nilable(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Maximum))
+ }
+ attr_accessor :maximum
+ # The lower bound of the estimated range. If empty, represents no lower bound.
+ sig {
+ returns(T.nilable(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Minimum))
+ }
+ attr_accessor :minimum
+ sig {
+ params(maximum: T.nilable(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Minimum)).void
+ }
+ def initialize(maximum: nil, minimum: nil); end
+ end
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::ShippingRateService::CreateParams::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ShippingRateService::CreateParams::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(amount: nil, currency: nil, currency_options: nil); end
+ end
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(T.nilable(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate)) }
+ attr_accessor :delivery_estimate
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig { returns(T.nilable(::Stripe::ShippingRateService::CreateParams::FixedAmount)) }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ # The type of calculation to use on the shipping rate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(delivery_estimate: T.nilable(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate), display_name: String, expand: T.nilable(T::Array[String]), fixed_amount: T.nilable(::Stripe::ShippingRateService::CreateParams::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
+ }
+ def initialize(
+ delivery_estimate: nil,
+ display_name: nil,
+ expand: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil,
+ tax_code: nil,
+ type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class FixedAmount < Stripe::RequestParams
+ class CurrencyOptions < Stripe::RequestParams
+ # A non-negative integer in cents representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig { params(amount: T.nilable(Integer), tax_behavior: T.nilable(String)).void }
+ def initialize(amount: nil, tax_behavior: nil); end
+ end
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ sig {
+ returns(T.nilable(T::Hash[String, ::Stripe::ShippingRateService::UpdateParams::FixedAmount::CurrencyOptions]))
+ }
+ attr_accessor :currency_options
+ sig {
+ params(currency_options: T.nilable(T::Hash[String, ::Stripe::ShippingRateService::UpdateParams::FixedAmount::CurrencyOptions])).void
+ }
+ def initialize(currency_options: nil); end
+ end
+ # Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ sig { returns(T.nilable(::Stripe::ShippingRateService::UpdateParams::FixedAmount)) }
+ attr_accessor :fixed_amount
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ sig {
+ params(active: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), fixed_amount: T.nilable(::Stripe::ShippingRateService::UpdateParams::FixedAmount), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), tax_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ expand: nil,
+ fixed_amount: nil,
+ metadata: nil,
+ tax_behavior: nil
+ ); end
+ end
+ # Creates a new shipping rate object.
+ sig {
+ params(params: T.any(::Stripe::ShippingRateService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of your shipping rates.
+ sig {
+ params(params: T.any(::Stripe::ShippingRateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Returns the shipping rate object with the given ID.
+ sig {
+ params(shipping_rate_token: String, params: T.any(::Stripe::ShippingRateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate)
+ }
+ def retrieve(shipping_rate_token, params = {}, opts = {}); end
+
+ # Updates an existing shipping rate object.
+ sig {
+ params(shipping_rate_token: String, params: T.any(::Stripe::ShippingRateService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate)
+ }
+ def update(shipping_rate_token, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/sigma/scheduled_query_run_service.rbi b/rbi/stripe/services/sigma/scheduled_query_run_service.rbi
new file mode 100644
index 00000000..b87ed88c
--- /dev/null
+++ b/rbi/stripe/services/sigma/scheduled_query_run_service.rbi
@@ -0,0 +1,46 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Sigma
+ class ScheduledQueryRunService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of scheduled query runs.
+ sig {
+ params(params: T.any(::Stripe::Sigma::ScheduledQueryRunService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an scheduled query run.
+ sig {
+ params(scheduled_query_run: String, params: T.any(::Stripe::Sigma::ScheduledQueryRunService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Sigma::ScheduledQueryRun)
+ }
+ def retrieve(scheduled_query_run, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/sigma_service.rbi b/rbi/stripe/services/sigma_service.rbi
new file mode 100644
index 00000000..f95d00d8
--- /dev/null
+++ b/rbi/stripe/services/sigma_service.rbi
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SigmaService < StripeService
+ attr_reader :scheduled_query_runs
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/source_service.rbi b/rbi/stripe/services/source_service.rbi
new file mode 100644
index 00000000..d927df7f
--- /dev/null
+++ b/rbi/stripe/services/source_service.rbi
@@ -0,0 +1,663 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SourceService < StripeService
+ attr_reader :transactions
+ class DetachParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # The client secret of the source. Required if a publishable key is used to retrieve the source.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :client_secret
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(client_secret: T.nilable(String), expand: T.nilable(T::Array[String])).void }
+ def initialize(client_secret: nil, expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ sig { returns(String) }
+ attr_accessor :contact_email
+ sig { params(contact_email: String).void }
+ def initialize(contact_email: nil); end
+ end
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ sig {
+ returns(T.nilable(::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Offline))
+ }
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ sig {
+ returns(T.nilable(::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Online))
+ }
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ sig { returns(String) }
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), offline: T.nilable(::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Offline), online: T.nilable(::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Online), status: String, type: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ ); end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ sig { returns(T.nilable(::Stripe::SourceService::UpdateParams::Mandate::Acceptance)) }
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :notification_method
+ sig {
+ params(acceptance: T.nilable(::Stripe::SourceService::UpdateParams::Mandate::Acceptance), amount: T.nilable(T.nilable(T.any(String, Integer))), currency: T.nilable(String), interval: T.nilable(String), notification_method: T.nilable(String)).void
+ }
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ ); end
+ end
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Owner's address.
+ sig { returns(T.nilable(::Stripe::SourceService::UpdateParams::Owner::Address)) }
+ attr_accessor :address
+ # Owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Owner's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Owner's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(::Stripe::SourceService::UpdateParams::Owner::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Attribute for param field type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), parent: T.nilable(String), quantity: T.nilable(Integer), type: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::SourceService::UpdateParams::SourceOrder::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::SourceService::UpdateParams::SourceOrder::Shipping::Address, carrier: T.nilable(String), name: T.nilable(String), phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ carrier: nil,
+ name: nil,
+ phone: nil,
+ tracking_number: nil
+ ); end
+ end
+ # List of items constituting the order.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SourceService::UpdateParams::SourceOrder::Item]))
+ }
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ sig { returns(T.nilable(::Stripe::SourceService::UpdateParams::SourceOrder::Shipping)) }
+ attr_accessor :shipping
+ sig {
+ params(items: T.nilable(T::Array[::Stripe::SourceService::UpdateParams::SourceOrder::Item]), shipping: T.nilable(::Stripe::SourceService::UpdateParams::SourceOrder::Shipping)).void
+ }
+ def initialize(items: nil, shipping: nil); end
+ end
+ # Amount associated with the source.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ sig { returns(T.nilable(::Stripe::SourceService::UpdateParams::Mandate)) }
+ attr_accessor :mandate
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ sig { returns(T.nilable(::Stripe::SourceService::UpdateParams::Owner)) }
+ attr_accessor :owner
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ sig { returns(T.nilable(::Stripe::SourceService::UpdateParams::SourceOrder)) }
+ attr_accessor :source_order
+ sig {
+ params(amount: T.nilable(Integer), expand: T.nilable(T::Array[String]), mandate: T.nilable(::Stripe::SourceService::UpdateParams::Mandate), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), owner: T.nilable(::Stripe::SourceService::UpdateParams::Owner), source_order: T.nilable(::Stripe::SourceService::UpdateParams::SourceOrder)).void
+ }
+ def initialize(
+ amount: nil,
+ expand: nil,
+ mandate: nil,
+ metadata: nil,
+ owner: nil,
+ source_order: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Mandate < Stripe::RequestParams
+ class Acceptance < Stripe::RequestParams
+ class Offline < Stripe::RequestParams
+ # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ sig { returns(String) }
+ attr_accessor :contact_email
+ sig { params(contact_email: String).void }
+ def initialize(contact_email: nil); end
+ end
+ class Online < Stripe::RequestParams
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ sig {
+ returns(T.nilable(::Stripe::SourceService::CreateParams::Mandate::Acceptance::Offline))
+ }
+ attr_accessor :offline
+ # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ sig {
+ returns(T.nilable(::Stripe::SourceService::CreateParams::Mandate::Acceptance::Online))
+ }
+ attr_accessor :online
+ # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ sig { returns(String) }
+ attr_accessor :status
+ # The type of acceptance information included with the mandate. Either `online` or `offline`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The user agent of the browser from which the mandate was accepted or refused by the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), offline: T.nilable(::Stripe::SourceService::CreateParams::Mandate::Acceptance::Offline), online: T.nilable(::Stripe::SourceService::CreateParams::Mandate::Acceptance::Online), status: String, type: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(
+ date: nil,
+ ip: nil,
+ offline: nil,
+ online: nil,
+ status: nil,
+ type: nil,
+ user_agent: nil
+ ); end
+ end
+ # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::Mandate::Acceptance)) }
+ attr_accessor :acceptance
+ # The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
+ attr_accessor :amount
+ # The currency specified by the mandate. (Must match `currency` of the source)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :interval
+ # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :notification_method
+ sig {
+ params(acceptance: T.nilable(::Stripe::SourceService::CreateParams::Mandate::Acceptance), amount: T.nilable(T.nilable(T.any(String, Integer))), currency: T.nilable(String), interval: T.nilable(String), notification_method: T.nilable(String)).void
+ }
+ def initialize(
+ acceptance: nil,
+ amount: nil,
+ currency: nil,
+ interval: nil,
+ notification_method: nil
+ ); end
+ end
+ class Owner < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Owner's address.
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::Owner::Address)) }
+ attr_accessor :address
+ # Owner's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # Owner's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Owner's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(::Stripe::SourceService::CreateParams::Owner::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Receiver < Stripe::RequestParams
+ # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :refund_attributes_method
+ sig { params(refund_attributes_method: T.nilable(String)).void }
+ def initialize(refund_attributes_method: nil); end
+ end
+ class Redirect < Stripe::RequestParams
+ # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
+ sig { returns(String) }
+ attr_accessor :return_url
+ sig { params(return_url: String).void }
+ def initialize(return_url: nil); end
+ end
+ class SourceOrder < Stripe::RequestParams
+ class Item < Stripe::RequestParams
+ # Attribute for param field amount
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Attribute for param field currency
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of the SKU being ordered.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :parent
+ # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # Attribute for param field type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), parent: T.nilable(String), quantity: T.nilable(Integer), type: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ parent: nil,
+ quantity: nil,
+ type: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(String) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: String, line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address.
+ sig { returns(::Stripe::SourceService::CreateParams::SourceOrder::Shipping::Address) }
+ attr_accessor :address
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # Recipient name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Recipient phone (including extension).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tracking_number
+ sig {
+ params(address: ::Stripe::SourceService::CreateParams::SourceOrder::Shipping::Address, carrier: T.nilable(String), name: T.nilable(String), phone: T.nilable(String), tracking_number: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ carrier: nil,
+ name: nil,
+ phone: nil,
+ tracking_number: nil
+ ); end
+ end
+ # List of items constituting the order.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SourceService::CreateParams::SourceOrder::Item]))
+ }
+ attr_accessor :items
+ # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::SourceOrder::Shipping)) }
+ attr_accessor :shipping
+ sig {
+ params(items: T.nilable(T::Array[::Stripe::SourceService::CreateParams::SourceOrder::Item]), shipping: T.nilable(::Stripe::SourceService::CreateParams::SourceOrder::Shipping)).void
+ }
+ def initialize(items: nil, shipping: nil); end
+ end
+ # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flow
+ # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::Mandate)) }
+ attr_accessor :mandate
+ # Attribute for param field metadata
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The source to share.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :original_source
+ # Information about the owner of the payment instrument that may be used or required by particular source types.
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::Owner)) }
+ attr_accessor :owner
+ # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::Receiver)) }
+ attr_accessor :receiver
+ # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::Redirect)) }
+ attr_accessor :redirect
+ # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ sig { returns(T.nilable(::Stripe::SourceService::CreateParams::SourceOrder)) }
+ attr_accessor :source_order
+ # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # An optional token used to create the source. When passed, token properties will override source parameters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :token
+ # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # Attribute for param field usage
+ sig { returns(T.nilable(String)) }
+ attr_accessor :usage
+ sig {
+ params(amount: T.nilable(Integer), currency: T.nilable(String), customer: T.nilable(String), expand: T.nilable(T::Array[String]), flow: T.nilable(String), mandate: T.nilable(::Stripe::SourceService::CreateParams::Mandate), metadata: T.nilable(T::Hash[String, String]), original_source: T.nilable(String), owner: T.nilable(::Stripe::SourceService::CreateParams::Owner), receiver: T.nilable(::Stripe::SourceService::CreateParams::Receiver), redirect: T.nilable(::Stripe::SourceService::CreateParams::Redirect), source_order: T.nilable(::Stripe::SourceService::CreateParams::SourceOrder), statement_descriptor: T.nilable(String), token: T.nilable(String), type: T.nilable(String), usage: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ expand: nil,
+ flow: nil,
+ mandate: nil,
+ metadata: nil,
+ original_source: nil,
+ owner: nil,
+ receiver: nil,
+ redirect: nil,
+ source_order: nil,
+ statement_descriptor: nil,
+ token: nil,
+ type: nil,
+ usage: nil
+ ); end
+ end
+ class VerifyParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The values needed to verify the source.
+ sig { returns(T::Array[String]) }
+ attr_accessor :values
+ sig { params(expand: T.nilable(T::Array[String]), values: T::Array[String]).void }
+ def initialize(expand: nil, values: nil); end
+ end
+ # Creates a new source object.
+ sig {
+ params(params: T.any(::Stripe::SourceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Delete a specified source for a given customer.
+ sig {
+ params(customer: String, id: String, params: T.any(::Stripe::SourceService::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))
+ }
+ def detach(customer, id, params = {}, opts = {}); end
+
+ # Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.
+ sig {
+ params(source: String, params: T.any(::Stripe::SourceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def retrieve(source, params = {}, opts = {}); end
+
+ # Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ #
+ # This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail.
+ sig {
+ params(source: String, params: T.any(::Stripe::SourceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def update(source, params = {}, opts = {}); end
+
+ # Verify a given source.
+ sig {
+ params(source: String, params: T.any(::Stripe::SourceService::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source)
+ }
+ def verify(source, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/source_transaction_service.rbi b/rbi/stripe/services/source_transaction_service.rbi
new file mode 100644
index 00000000..0bab5017
--- /dev/null
+++ b/rbi/stripe/services/source_transaction_service.rbi
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SourceTransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # List source transactions for a given source.
+ sig {
+ params(source: String, params: T.any(::Stripe::SourceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(source, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/subscription_item_service.rbi b/rbi/stripe/services/subscription_item_service.rbi
new file mode 100644
index 00000000..723d6f8f
--- /dev/null
+++ b/rbi/stripe/services/subscription_item_service.rbi
@@ -0,0 +1,324 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SubscriptionItemService < StripeService
+ class DeleteParams < Stripe::RequestParams
+ # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :clear_usage
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ sig {
+ params(clear_usage: T.nilable(T::Boolean), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
+ }
+ def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::SubscriptionItemService::UpdateParams::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemService::UpdateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItemService::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # The identifier of the new plan for this subscription item.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::SubscriptionItemService::UpdateParams::PriceData)) }
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItemService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), payment_behavior: T.nilable(String), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionItemService::UpdateParams::PriceData), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ off_session: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The ID of the subscription whose items will be retrieved.
+ sig { returns(String) }
+ attr_accessor :subscription
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), subscription: String).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ subscription: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::SubscriptionItemService::CreateParams::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemService::CreateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItemService::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # The identifier of the plan to add to the subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::SubscriptionItemService::CreateParams::PriceData)) }
+ attr_accessor :price_data
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # The quantity you'd like to apply to the subscription item you're creating.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The identifier of the subscription to modify.
+ sig { returns(String) }
+ attr_accessor :subscription
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionItemService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), payment_behavior: T.nilable(String), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionItemService::CreateParams::PriceData), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), quantity: T.nilable(Integer), subscription: String, tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ expand: nil,
+ metadata: nil,
+ payment_behavior: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ quantity: nil,
+ subscription: nil,
+ tax_rates: nil
+ ); end
+ end
+ # Adds a new item to an existing subscription. No existing items will be changed or replaced.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionItemService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
+ sig {
+ params(item: String, params: T.any(::Stripe::SubscriptionItemService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def delete(item, params = {}, opts = {}); end
+
+ # Returns a list of your subscription items for a given subscription.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the subscription item with the given ID.
+ sig {
+ params(item: String, params: T.any(::Stripe::SubscriptionItemService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def retrieve(item, params = {}, opts = {}); end
+
+ # Updates the plan or quantity of an item on a current subscription.
+ sig {
+ params(item: String, params: T.any(::Stripe::SubscriptionItemService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem)
+ }
+ def update(item, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/subscription_schedule_service.rbi b/rbi/stripe/services/subscription_schedule_service.rbi
new file mode 100644
index 00000000..0b374bbb
--- /dev/null
+++ b/rbi/stripe/services/subscription_schedule_service.rbi
@@ -0,0 +1,1192 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SubscriptionScheduleService < StripeService
+ class ListParams < Stripe::RequestParams
+ class CanceledAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CompletedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class ReleasedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return subscription schedules that were created canceled the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)))
+ }
+ attr_accessor :canceled_at
+ # Only return subscription schedules that completed during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer)))
+ }
+ attr_accessor :completed_at
+ # Only return subscription schedules that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return subscription schedules for the given customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return subscription schedules that were released during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)))
+ }
+ attr_accessor :released_at
+ # Only return subscription schedules that have not started yet.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :scheduled
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(canceled_at: T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)), completed_at: T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer)), created: T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), released_at: T.nilable(T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)), scheduled: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ canceled_at: nil,
+ completed_at: nil,
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ released_at: nil,
+ scheduled: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData)))).void
+ }
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ ); end
+ end
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item]) }
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData))
+ }
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_end
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ ); end
+ end
+ # The identifier of the customer to create the subscription schedule for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Object representing the subscription schedule's default settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings))
+ }
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :from_subscription
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]))
+ }
+ attr_accessor :phases
+ # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :start_date
+ sig {
+ params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
+ }
+ def initialize(
+ customer: nil,
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ from_subscription: nil,
+ metadata: nil,
+ phases: nil,
+ start_date: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class DefaultSettings < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Default settings for automatic tax computation.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData))))
+ }
+ attr_accessor :transfer_data
+ sig {
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData)))).void
+ }
+ def initialize(
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ default_payment_method: nil,
+ description: nil,
+ invoice_settings: nil,
+ on_behalf_of: nil,
+ transfer_data: nil
+ ); end
+ end
+ class Phase < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig {
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring)
+ }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this phase.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax))
+ }
+ attr_accessor :automatic_tax
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))))
+ }
+ attr_accessor :discounts
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :end_date
+ # All invoices will be billed using the specified settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings))
+ }
+ attr_accessor :invoice_settings
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item]) }
+ attr_accessor :items
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :iterations
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :on_behalf_of
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :start_date
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData))
+ }
+ attr_accessor :transfer_data
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :trial_end
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ collection_method: nil,
+ currency: nil,
+ default_payment_method: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ end_date: nil,
+ invoice_settings: nil,
+ items: nil,
+ iterations: nil,
+ metadata: nil,
+ on_behalf_of: nil,
+ proration_behavior: nil,
+ start_date: nil,
+ transfer_data: nil,
+ trial: nil,
+ trial_end: nil
+ ); end
+ end
+ # Object representing the subscription schedule's default settings.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings))
+ }
+ attr_accessor :default_settings
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :end_behavior
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]))
+ }
+ attr_accessor :phases
+ # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ sig {
+ params(default_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]), proration_behavior: T.nilable(String)).void
+ }
+ def initialize(
+ default_settings: nil,
+ end_behavior: nil,
+ expand: nil,
+ metadata: nil,
+ phases: nil,
+ proration_behavior: nil
+ ); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :invoice_now
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :prorate
+ sig {
+ params(expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, invoice_now: nil, prorate: nil); end
+ end
+ class ReleaseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Keep any cancellation on the subscription that the schedule has set
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :preserve_cancel_date
+ sig {
+ params(expand: T.nilable(T::Array[String]), preserve_cancel_date: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, preserve_cancel_date: nil); end
+ end
+ # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def cancel(schedule, params = {}, opts = {}); end
+
+ # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionScheduleService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Retrieves the list of your subscription schedules.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionScheduleService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def release(schedule, params = {}, opts = {}); end
+
+ # Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def retrieve(schedule, params = {}, opts = {}); end
+
+ # Updates an existing subscription schedule.
+ sig {
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
+ }
+ def update(schedule, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/subscription_service.rbi b/rbi/stripe/services/subscription_service.rbi
new file mode 100644
index 00000000..a5431150
--- /dev/null
+++ b/rbi/stripe/services/subscription_service.rbi
@@ -0,0 +1,1596 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class SubscriptionService < StripeService
+ class CancelParams < Stripe::RequestParams
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :feedback
+ sig {
+ params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(comment: nil, feedback: nil); end
+ end
+ # Details about why this subscription was cancelled
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CancelParams::CancellationDetails)) }
+ attr_accessor :cancellation_details
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :invoice_now
+ # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :prorate
+ sig {
+ params(cancellation_details: T.nilable(::Stripe::SubscriptionService::CancelParams::CancellationDetails), expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
+ }
+ def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class CancellationDetails < Stripe::RequestParams
+ # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :comment
+ # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :feedback
+ sig {
+ params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
+ }
+ def initialize(comment: nil, feedback: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :clear_usage
+ # A flag that, if set to `true`, will delete the specified item.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :deleted
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # Subscription item to update.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::PriceData)) }
+ attr_accessor :price_data
+ # Quantity for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ clear_usage: nil,
+ deleted: nil,
+ discounts: nil,
+ id: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class PauseCollection < Stripe::RequestParams
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ sig { returns(String) }
+ attr_accessor :behavior
+ # The time after which the subscription will resume collecting payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :resumes_at
+ sig { params(behavior: String, resumes_at: T.nilable(Integer)).void }
+ def initialize(behavior: nil, resumes_at: nil); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ sig {
+ params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
+ }
+ def initialize(amount: nil, amount_type: nil, description: nil); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :save_default_payment_method
+ sig {
+ params(payment_method_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ ); end
+ end
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig { returns(::Stripe::SubscriptionService::UpdateParams::TrialSettings::EndBehavior) }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::SubscriptionService::UpdateParams::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) }
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_at_period_end
+ # Details about why this subscription was cancelled
+ sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails)) }
+ attr_accessor :cancellation_details
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # 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.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item])) }
+ attr_accessor :items
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))))
+ }
+ attr_accessor :pause_collection
+ # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ #
+ # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))))
+ }
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))))
+ }
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial_from_plan
+ # Settings related to subscription trials.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)) }
+ attr_accessor :trial_settings
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), pause_collection: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ billing_cycle_anchor: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ cancellation_details: nil,
+ collection_method: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ pause_collection: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ proration_date: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_settings: nil
+ ); end
+ end
+ class DeleteDiscountParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ class AutomaticTax < Stripe::RequestParams
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CurrentPeriodEnd < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class CurrentPeriodStart < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Filter subscriptions by their automatic tax settings.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::ListParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # Only return subscriptions that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return subscriptions whose current_period_end falls within the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)))
+ }
+ attr_accessor :current_period_end
+ # Only return subscriptions whose current_period_start falls within the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer)))
+ }
+ attr_accessor :current_period_start
+ # The ID of the customer whose subscriptions will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The ID of the plan whose subscriptions will be retrieved.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # Filter for subscriptions that contain this recurring price ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :test_clock
+ sig {
+ params(automatic_tax: T.nilable(::Stripe::SubscriptionService::ListParams::AutomaticTax), collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer)), current_period_end: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)), current_period_start: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), plan: T.nilable(String), price: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
+ }
+ def initialize(
+ automatic_tax: nil,
+ collection_method: nil,
+ created: nil,
+ current_period_end: nil,
+ current_period_start: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ plan: nil,
+ price: nil,
+ starting_after: nil,
+ status: nil,
+ test_clock: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class AddInvoiceItem < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the item.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]))
+ }
+ attr_accessor :discounts
+ # The ID of the price object. One of `price` or `price_data` is required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData))
+ }
+ attr_accessor :price_data
+ # Quantity for this item. Defaults to 1.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class AutomaticTax < Stripe::RequestParams
+ class Liability < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ # 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.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability))
+ }
+ attr_accessor :liability
+ sig {
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability)).void
+ }
+ def initialize(enabled: nil, liability: nil); end
+ end
+ class BillingCycleAnchorConfig < Stripe::RequestParams
+ # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
+ sig { returns(Integer) }
+ attr_accessor :day_of_month
+ # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :hour
+ # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :minute
+ # The month to start full cycle billing periods. Ranges from 1 to 12.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :month
+ # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :second
+ sig {
+ params(day_of_month: Integer, hour: T.nilable(Integer), minute: T.nilable(Integer), month: T.nilable(Integer), second: T.nilable(Integer)).void
+ }
+ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
+ end
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class InvoiceSettings < Stripe::RequestParams
+ class Issuer < Stripe::RequestParams
+ # The connected account being referenced when `type` is `account`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Type of the account referenced in the request.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), type: String).void }
+ def initialize(account: nil, type: nil); end
+ end
+ # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :account_tax_ids
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer))
+ }
+ attr_accessor :issuer
+ sig {
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer)).void
+ }
+ def initialize(account_tax_ids: nil, issuer: nil); end
+ end
+ class Item < Stripe::RequestParams
+ class Discount < Stripe::RequestParams
+ # ID of the coupon to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :coupon
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :discount
+ # ID of the promotion code to create a new discount for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :promotion_code
+ sig {
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
+ }
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
+ end
+ class PriceData < Stripe::RequestParams
+ class Recurring < Stripe::RequestParams
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ sig { returns(String) }
+ attr_accessor :product
+ # The recurring components of a price such as `interval` and `interval_count`.
+ sig { returns(::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring) }
+ attr_accessor :recurring
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_amount
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_amount_decimal
+ sig {
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ currency: nil,
+ product: nil,
+ recurring: nil,
+ tax_behavior: nil,
+ unit_amount: nil,
+ unit_amount_decimal: nil
+ ); end
+ end
+ # The coupons to redeem into discounts for the subscription item.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))))
+ }
+ attr_accessor :discounts
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Plan ID for this item, as a string.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :plan
+ # The ID of the price object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :price
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::Item::PriceData)) }
+ attr_accessor :price_data
+ # Quantity for this item.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :tax_rates
+ sig {
+ params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::CreateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
+ }
+ def initialize(
+ discounts: nil,
+ metadata: nil,
+ plan: nil,
+ price: nil,
+ price_data: nil,
+ quantity: nil,
+ tax_rates: nil
+ ); end
+ end
+ class PaymentSettings < Stripe::RequestParams
+ class PaymentMethodOptions < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Transaction type of the mandate.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction_type
+ sig { params(transaction_type: T.nilable(String)).void }
+ def initialize(transaction_type: nil); end
+ end
+ # Additional fields for Mandate creation
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, verification_method: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred_language
+ sig { params(preferred_language: T.nilable(String)).void }
+ def initialize(preferred_language: nil); end
+ end
+ class Card < Stripe::RequestParams
+ class MandateOptions < Stripe::RequestParams
+ # Amount to be charged for future payments.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :amount_type
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ sig {
+ params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
+ }
+ def initialize(amount: nil, amount_type: nil, description: nil); end
+ end
+ # Configuration options for setting up an eMandate for cards issued in India.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
+ }
+ attr_accessor :mandate_options
+ # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :request_three_d_secure
+ sig {
+ params(mandate_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
+ }
+ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
+ end
+ class CustomerBalance < Stripe::RequestParams
+ class BankTransfer < Stripe::RequestParams
+ class EuBankTransfer < Stripe::RequestParams
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ # Configuration for eu_bank_transfer funding type.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
+ }
+ attr_accessor :eu_bank_transfer
+ # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(eu_bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
+ }
+ def initialize(eu_bank_transfer: nil, type: nil); end
+ end
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
+ }
+ attr_accessor :bank_transfer
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding_type
+ sig {
+ params(bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
+ }
+ def initialize(bank_transfer: nil, funding_type: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ class FinancialConnections < Stripe::RequestParams
+ class Filters < Stripe::RequestParams
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :account_subcategories
+ sig { params(account_subcategories: T.nilable(T::Array[String])).void }
+ def initialize(account_subcategories: nil); end
+ end
+ # Provide filters for the linked accounts that the customer can select for the payment method.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
+ }
+ attr_accessor :filters
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :permissions
+ # List of data features that you would like to retrieve upon account creation.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :prefetch
+ sig {
+ params(filters: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
+ }
+ def initialize(filters: nil, permissions: nil, prefetch: nil); end
+ end
+ # Additional fields for Financial Connections Session creation
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
+ }
+ attr_accessor :financial_connections
+ # Verification method for the intent
+ sig { returns(T.nilable(String)) }
+ attr_accessor :verification_method
+ sig {
+ params(financial_connections: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
+ }
+ def initialize(financial_connections: nil, verification_method: nil); end
+ end
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
+ }
+ attr_accessor :acss_debit
+ # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
+ }
+ attr_accessor :bancontact
+ # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
+ }
+ attr_accessor :card
+ # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
+ }
+ attr_accessor :customer_balance
+ # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
+ }
+ attr_accessor :konbini
+ # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
+ }
+ attr_accessor :sepa_debit
+ # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(
+ acss_debit: nil,
+ bancontact: nil,
+ card: nil,
+ customer_balance: nil,
+ konbini: nil,
+ sepa_debit: nil,
+ us_bank_account: nil
+ ); end
+ end
+ # Payment-method-specific configuration to provide to invoices created by the subscription.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions))
+ }
+ attr_accessor :payment_method_options
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :payment_method_types
+ # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :save_default_payment_method
+ sig {
+ params(payment_method_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
+ }
+ def initialize(
+ payment_method_options: nil,
+ payment_method_types: nil,
+ save_default_payment_method: nil
+ ); end
+ end
+ class PendingInvoiceItemInterval < Stripe::RequestParams
+ # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ sig { returns(String) }
+ attr_accessor :interval
+ # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :interval_count
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
+ def initialize(interval: nil, interval_count: nil); end
+ end
+ class TransferData < Stripe::RequestParams
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
+ sig { returns(T.nilable(Float)) }
+ attr_accessor :amount_percent
+ # ID of an existing, connected Stripe account.
+ sig { returns(String) }
+ attr_accessor :destination
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
+ def initialize(amount_percent: nil, destination: nil); end
+ end
+ class TrialSettings < Stripe::RequestParams
+ class EndBehavior < Stripe::RequestParams
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
+ sig { returns(String) }
+ attr_accessor :missing_payment_method
+ sig { params(missing_payment_method: String).void }
+ def initialize(missing_payment_method: nil); end
+ end
+ # Defines how the subscription should behave when the user's free trial ends.
+ sig { returns(::Stripe::SubscriptionService::CreateParams::TrialSettings::EndBehavior) }
+ attr_accessor :end_behavior
+ sig {
+ params(end_behavior: ::Stripe::SubscriptionService::CreateParams::TrialSettings::EndBehavior).void
+ }
+ def initialize(end_behavior: nil); end
+ end
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]))
+ }
+ attr_accessor :add_invoice_items
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :application_fee_percent
+ # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax)) }
+ attr_accessor :automatic_tax
+ # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :backdate_start_date
+ # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :billing_cycle_anchor
+ # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
+ sig {
+ returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig))
+ }
+ attr_accessor :billing_cycle_anchor_config
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ sig { returns(T.nilable(T.any(Integer, String))) }
+ attr_accessor :cancel_at
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :cancel_at_period_end
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :collection_method
+ # 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The identifier of the customer to subscribe.
+ sig { returns(String) }
+ attr_accessor :customer
+ # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :days_until_due
+ # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_payment_method
+ # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :default_source
+ # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :default_tax_rates
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))))
+ }
+ attr_accessor :discounts
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # All invoices will be billed using the specified settings.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings)) }
+ attr_accessor :invoice_settings
+ # A list of up to 20 subscription items, each with an attached price.
+ sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item])) }
+ attr_accessor :items
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :off_session
+ # The account on behalf of which to charge, for each of the subscription's invoices.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :on_behalf_of
+ # Only applies to subscriptions with `collection_method=charge_automatically`.
+ #
+ # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ #
+ # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
+ #
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ #
+ # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
+ #
+ # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_behavior
+ # Payment settings to pass to invoices created by the subscription.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings)) }
+ attr_accessor :payment_settings
+ # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))))
+ }
+ attr_accessor :pending_invoice_item_interval
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TransferData)) }
+ attr_accessor :transfer_data
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :trial_end
+ # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :trial_from_plan
+ # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :trial_period_days
+ # Settings related to subscription trials.
+ sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) }
+ attr_accessor :trial_settings
+ sig {
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig), cancel_at: T.nilable(T.any(Integer, String)), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)).void
+ }
+ def initialize(
+ add_invoice_items: nil,
+ application_fee_percent: nil,
+ automatic_tax: nil,
+ backdate_start_date: nil,
+ billing_cycle_anchor: nil,
+ billing_cycle_anchor_config: nil,
+ cancel_at: nil,
+ cancel_at_period_end: nil,
+ collection_method: nil,
+ currency: nil,
+ customer: nil,
+ days_until_due: nil,
+ default_payment_method: nil,
+ default_source: nil,
+ default_tax_rates: nil,
+ description: nil,
+ discounts: nil,
+ expand: nil,
+ invoice_settings: nil,
+ items: nil,
+ metadata: nil,
+ off_session: nil,
+ on_behalf_of: nil,
+ payment_behavior: nil,
+ payment_settings: nil,
+ pending_invoice_item_interval: nil,
+ proration_behavior: nil,
+ transfer_data: nil,
+ trial_end: nil,
+ trial_from_plan: nil,
+ trial_period_days: nil,
+ trial_settings: nil
+ ); end
+ end
+ class SearchParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :page
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).
+ sig { returns(String) }
+ attr_accessor :query
+ sig {
+ params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
+ }
+ def initialize(expand: nil, limit: nil, page: nil, query: nil); end
+ end
+ class ResumeParams < Stripe::RequestParams
+ # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :billing_cycle_anchor
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :proration_behavior
+ # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :proration_date
+ sig {
+ params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
+ }
+ def initialize(
+ billing_cycle_anchor: nil,
+ expand: nil,
+ proration_behavior: nil,
+ proration_date: nil
+ ); end
+ end
+ # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
+ #
+ # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
+ #
+ # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def cancel(subscription_exposed_id, params = {}, opts = {}); end
+
+ # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
+ #
+ # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
+ # The payment_behavior parameter determines the exact behavior of the initial payment.
+ #
+ # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead.
+ # Schedules provide the flexibility to model more complex billing configurations that change over time.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Removes the currently applied discount on a subscription.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
+ }
+ def delete_discount(subscription_exposed_id, params = {}, opts = {}); end
+
+ # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
+ sig {
+ params(subscription: String, params: T.any(::Stripe::SubscriptionService::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def resume(subscription, params = {}, opts = {}); end
+
+ # Retrieves the subscription with the given ID.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def retrieve(subscription_exposed_id, params = {}, opts = {}); end
+
+ # Search for subscriptions you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
+ # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
+ # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
+ # to an hour behind during outages. Search functionality is not available to merchants in India.
+ sig {
+ params(params: T.any(::Stripe::SubscriptionService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
+ }
+ def search(params = {}, opts = {}); end
+
+ # Updates an existing subscription to match the specified parameters.
+ # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
+ # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
+ #
+ # By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
+ #
+ # Switching prices does not normally change the billing date or generate an immediate charge unless:
+ #
+ #
+ # The billing interval is changed (for example, from monthly to yearly).
+ # The subscription moves from free to paid.
+ # A trial starts or ends.
+ #
+ #
+ # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
+ #
+ # If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
+ #
+ # If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription.
+ #
+ # Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing](https://stripe.com/docs/rate-limits) instead.
+ sig {
+ params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
+ }
+ def update(subscription_exposed_id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax/calculation_line_item_service.rbi b/rbi/stripe/services/tax/calculation_line_item_service.rbi
new file mode 100644
index 00000000..29d5da0c
--- /dev/null
+++ b/rbi/stripe/services/tax/calculation_line_item_service.rbi
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class CalculationLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
+ sig {
+ params(calculation: String, params: T.any(::Stripe::Tax::CalculationLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(calculation, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax/calculation_service.rbi b/rbi/stripe/services/tax/calculation_service.rbi
new file mode 100644
index 00000000..7f04bd72
--- /dev/null
+++ b/rbi/stripe/services/tax/calculation_service.rbi
@@ -0,0 +1,230 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class CalculationService < StripeService
+ attr_reader :line_items
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CustomerDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: String, line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class TaxId < Stripe::RequestParams
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig { params(type: String, value: String).void }
+ def initialize(type: nil, value: nil); end
+ end
+ # The customer's postal address (for example, home or business location).
+ sig {
+ returns(T.nilable(::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::Address))
+ }
+ attr_accessor :address
+ # The type of customer address provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_source
+ # The customer's IP address (IPv4 or IPv6).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::TaxId]))
+ }
+ attr_accessor :tax_ids
+ # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :taxability_override
+ sig {
+ params(address: T.nilable(::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::Address), address_source: T.nilable(String), ip_address: T.nilable(String), tax_ids: T.nilable(T::Array[::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::TaxId]), taxability_override: T.nilable(String)).void
+ }
+ def initialize(
+ address: nil,
+ address_source: nil,
+ ip_address: nil,
+ tax_ids: nil,
+ taxability_override: nil
+ ); end
+ end
+ class LineItem < Stripe::RequestParams
+ # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # If provided, the product's `tax_code` will be used as the line item's `tax_code`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :product
+ # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(amount: Integer, product: T.nilable(String), quantity: T.nilable(Integer), reference: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ product: nil,
+ quantity: nil,
+ reference: nil,
+ tax_behavior: nil,
+ tax_code: nil
+ ); end
+ end
+ class ShipFromDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(T.nilable(String)), country: String, line1: T.nilable(T.nilable(String)), line2: T.nilable(T.nilable(String)), postal_code: T.nilable(T.nilable(String)), state: T.nilable(T.nilable(String))).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The address from which the goods are being shipped from.
+ sig { returns(::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :shipping_rate
+ # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig {
+ params(amount: T.nilable(Integer), shipping_rate: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
+ }
+ def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Details about the customer, including address and tax IDs.
+ sig { returns(T.nilable(::Stripe::Tax::CalculationService::CreateParams::CustomerDetails)) }
+ attr_accessor :customer_details
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A list of items the customer is purchasing.
+ sig { returns(T::Array[::Stripe::Tax::CalculationService::CreateParams::LineItem]) }
+ attr_accessor :line_items
+ # Details about the address from which the goods are being shipped.
+ sig { returns(T.nilable(::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails)) }
+ attr_accessor :ship_from_details
+ # Shipping cost details to be used for the calculation.
+ sig { returns(T.nilable(::Stripe::Tax::CalculationService::CreateParams::ShippingCost)) }
+ attr_accessor :shipping_cost
+ # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :tax_date
+ sig {
+ params(currency: String, customer: T.nilable(String), customer_details: T.nilable(::Stripe::Tax::CalculationService::CreateParams::CustomerDetails), expand: T.nilable(T::Array[String]), line_items: T::Array[::Stripe::Tax::CalculationService::CreateParams::LineItem], ship_from_details: T.nilable(::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails), shipping_cost: T.nilable(::Stripe::Tax::CalculationService::CreateParams::ShippingCost), tax_date: T.nilable(Integer)).void
+ }
+ def initialize(
+ currency: nil,
+ customer: nil,
+ customer_details: nil,
+ expand: nil,
+ line_items: nil,
+ ship_from_details: nil,
+ shipping_cost: nil,
+ tax_date: nil
+ ); end
+ end
+ # Calculates tax based on the input and returns a Tax Calculation object.
+ sig {
+ params(params: T.any(::Stripe::Tax::CalculationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Calculation)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Retrieves a Tax Calculation object, if the calculation hasn't expired.
+ sig {
+ params(calculation: String, params: T.any(::Stripe::Tax::CalculationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Calculation)
+ }
+ def retrieve(calculation, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax/registration_service.rbi b/rbi/stripe/services/tax/registration_service.rbi
new file mode 100644
index 00000000..aaa8ccdd
--- /dev/null
+++ b/rbi/stripe/services/tax/registration_service.rbi
@@ -0,0 +1,1689 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class RegistrationService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # The status of the Tax Registration.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class CountryOptions < Stripe::RequestParams
+ class Ae < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Al < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Am < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ao < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class At < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Au < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ba < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Bb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Be < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Bg < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Bh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Bs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class By < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ca < Stripe::RequestParams
+ class ProvinceStandard < Stripe::RequestParams
+ # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ sig { returns(String) }
+ attr_accessor :province
+ sig { params(province: String).void }
+ def initialize(province: nil); end
+ end
+ # Options for the provincial tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca::ProvinceStandard))
+ }
+ attr_accessor :province_standard
+ # Type of registration to be created in Canada.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(province_standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca::ProvinceStandard), type: String).void
+ }
+ def initialize(province_standard: nil, type: nil); end
+ end
+ class Cd < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ch < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Cl < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Co < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Cr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Cy < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Cz < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class De < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Dk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Ec < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ee < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Eg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Es < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Fi < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Fr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Gb < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ge < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Gn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Gr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Hr < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Hu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Id < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ie < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Is < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class It < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Jp < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ke < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Kh < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Kr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Kz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Lt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Lu < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Lv < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Ma < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Md < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Me < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Mk < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Mr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Mt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Mx < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class My < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ng < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Nl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class No < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Np < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Nz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Om < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Pe < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Pl < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Pt < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Ro < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Rs < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ru < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Sa < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Se < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Sg < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Si < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Sk < Stripe::RequestParams
+ class Standard < Stripe::RequestParams
+ # Place of supply scheme used in an EU standard registration.
+ sig { returns(String) }
+ attr_accessor :place_of_supply_scheme
+ sig { params(place_of_supply_scheme: String).void }
+ def initialize(place_of_supply_scheme: nil); end
+ end
+ # Options for the standard registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk::Standard))
+ }
+ attr_accessor :standard
+ # Type of registration to be created in an EU country.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(standard: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk::Standard), type: String).void
+ }
+ def initialize(standard: nil, type: nil); end
+ end
+ class Sn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Sr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Th < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Tj < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Tr < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Tz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Ug < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Us < Stripe::RequestParams
+ class LocalAmusementTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `64343` (River Grove), and `68081` (Schiller Park).
+ sig { returns(String) }
+ attr_accessor :jurisdiction
+ sig { params(jurisdiction: String).void }
+ def initialize(jurisdiction: nil); end
+ end
+ class LocalLeaseTax < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
+ sig { returns(String) }
+ attr_accessor :jurisdiction
+ sig { params(jurisdiction: String).void }
+ def initialize(jurisdiction: nil); end
+ end
+ class StateSalesTax < Stripe::RequestParams
+ class Election < Stripe::RequestParams
+ # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # The type of the election for the state sales tax registration.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(jurisdiction: T.nilable(String), type: String).void }
+ def initialize(jurisdiction: nil, type: nil); end
+ end
+ # Elections for the state sales tax registration.
+ sig {
+ returns(T::Array[::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax::Election])
+ }
+ attr_accessor :elections
+ sig {
+ params(elections: T::Array[::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax::Election]).void
+ }
+ def initialize(elections: nil); end
+ end
+ # Options for the local amusement tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalAmusementTax))
+ }
+ attr_accessor :local_amusement_tax
+ # Options for the local lease tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalLeaseTax))
+ }
+ attr_accessor :local_lease_tax
+ # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ sig { returns(String) }
+ attr_accessor :state
+ # Options for the state sales tax registration.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax))
+ }
+ attr_accessor :state_sales_tax
+ # Type of registration to be created in the US.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(local_amusement_tax: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalAmusementTax), local_lease_tax: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalLeaseTax), state: String, state_sales_tax: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax), type: String).void
+ }
+ def initialize(
+ local_amusement_tax: nil,
+ local_lease_tax: nil,
+ state: nil,
+ state_sales_tax: nil,
+ type: nil
+ ); end
+ end
+ class Uy < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Uz < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Vn < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Za < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Zm < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ class Zw < Stripe::RequestParams
+ # Type of registration to be created in `country`.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(type: String).void }
+ def initialize(type: nil); end
+ end
+ # Options for the registration in AE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ae))
+ }
+ attr_accessor :ae
+ # Options for the registration in AL.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Al))
+ }
+ attr_accessor :al
+ # Options for the registration in AM.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Am))
+ }
+ attr_accessor :am
+ # Options for the registration in AO.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ao))
+ }
+ attr_accessor :ao
+ # Options for the registration in AT.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At))
+ }
+ attr_accessor :at
+ # Options for the registration in AU.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Au))
+ }
+ attr_accessor :au
+ # Options for the registration in BA.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ba))
+ }
+ attr_accessor :ba
+ # Options for the registration in BB.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bb))
+ }
+ attr_accessor :bb
+ # Options for the registration in BE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be))
+ }
+ attr_accessor :be
+ # Options for the registration in BG.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg))
+ }
+ attr_accessor :bg
+ # Options for the registration in BH.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bh))
+ }
+ attr_accessor :bh
+ # Options for the registration in BS.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bs))
+ }
+ attr_accessor :bs
+ # Options for the registration in BY.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::By))
+ }
+ attr_accessor :by
+ # Options for the registration in CA.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca))
+ }
+ attr_accessor :ca
+ # Options for the registration in CD.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cd))
+ }
+ attr_accessor :cd
+ # Options for the registration in CH.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ch))
+ }
+ attr_accessor :ch
+ # Options for the registration in CL.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cl))
+ }
+ attr_accessor :cl
+ # Options for the registration in CO.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Co))
+ }
+ attr_accessor :co
+ # Options for the registration in CR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cr))
+ }
+ attr_accessor :cr
+ # Options for the registration in CY.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy))
+ }
+ attr_accessor :cy
+ # Options for the registration in CZ.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz))
+ }
+ attr_accessor :cz
+ # Options for the registration in DE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De))
+ }
+ attr_accessor :de
+ # Options for the registration in DK.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk))
+ }
+ attr_accessor :dk
+ # Options for the registration in EC.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ec))
+ }
+ attr_accessor :ec
+ # Options for the registration in EE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee))
+ }
+ attr_accessor :ee
+ # Options for the registration in EG.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Eg))
+ }
+ attr_accessor :eg
+ # Options for the registration in ES.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es))
+ }
+ attr_accessor :es
+ # Options for the registration in FI.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi))
+ }
+ attr_accessor :fi
+ # Options for the registration in FR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr))
+ }
+ attr_accessor :fr
+ # Options for the registration in GB.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gb))
+ }
+ attr_accessor :gb
+ # Options for the registration in GE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ge))
+ }
+ attr_accessor :ge
+ # Options for the registration in GN.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gn))
+ }
+ attr_accessor :gn
+ # Options for the registration in GR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr))
+ }
+ attr_accessor :gr
+ # Options for the registration in HR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr))
+ }
+ attr_accessor :hr
+ # Options for the registration in HU.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu))
+ }
+ attr_accessor :hu
+ # Options for the registration in ID.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Id))
+ }
+ attr_accessor :id
+ # Options for the registration in IE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie))
+ }
+ attr_accessor :ie
+ # Options for the registration in IS.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Is))
+ }
+ attr_accessor :is
+ # Options for the registration in IT.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It))
+ }
+ attr_accessor :it
+ # Options for the registration in JP.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Jp))
+ }
+ attr_accessor :jp
+ # Options for the registration in KE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ke))
+ }
+ attr_accessor :ke
+ # Options for the registration in KH.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kh))
+ }
+ attr_accessor :kh
+ # Options for the registration in KR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kr))
+ }
+ attr_accessor :kr
+ # Options for the registration in KZ.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kz))
+ }
+ attr_accessor :kz
+ # Options for the registration in LT.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt))
+ }
+ attr_accessor :lt
+ # Options for the registration in LU.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu))
+ }
+ attr_accessor :lu
+ # Options for the registration in LV.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv))
+ }
+ attr_accessor :lv
+ # Options for the registration in MA.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ma))
+ }
+ attr_accessor :ma
+ # Options for the registration in MD.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Md))
+ }
+ attr_accessor :md
+ # Options for the registration in ME.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Me))
+ }
+ attr_accessor :me
+ # Options for the registration in MK.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mk))
+ }
+ attr_accessor :mk
+ # Options for the registration in MR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mr))
+ }
+ attr_accessor :mr
+ # Options for the registration in MT.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt))
+ }
+ attr_accessor :mt
+ # Options for the registration in MX.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mx))
+ }
+ attr_accessor :mx
+ # Options for the registration in MY.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::My))
+ }
+ attr_accessor :my
+ # Options for the registration in NG.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ng))
+ }
+ attr_accessor :ng
+ # Options for the registration in NL.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl))
+ }
+ attr_accessor :nl
+ # Options for the registration in NO.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::No))
+ }
+ attr_accessor :no
+ # Options for the registration in NP.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Np))
+ }
+ attr_accessor :np
+ # Options for the registration in NZ.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nz))
+ }
+ attr_accessor :nz
+ # Options for the registration in OM.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Om))
+ }
+ attr_accessor :om
+ # Options for the registration in PE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pe))
+ }
+ attr_accessor :pe
+ # Options for the registration in PL.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl))
+ }
+ attr_accessor :pl
+ # Options for the registration in PT.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt))
+ }
+ attr_accessor :pt
+ # Options for the registration in RO.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro))
+ }
+ attr_accessor :ro
+ # Options for the registration in RS.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Rs))
+ }
+ attr_accessor :rs
+ # Options for the registration in RU.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ru))
+ }
+ attr_accessor :ru
+ # Options for the registration in SA.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sa))
+ }
+ attr_accessor :sa
+ # Options for the registration in SE.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se))
+ }
+ attr_accessor :se
+ # Options for the registration in SG.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sg))
+ }
+ attr_accessor :sg
+ # Options for the registration in SI.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si))
+ }
+ attr_accessor :si
+ # Options for the registration in SK.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk))
+ }
+ attr_accessor :sk
+ # Options for the registration in SN.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sn))
+ }
+ attr_accessor :sn
+ # Options for the registration in SR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sr))
+ }
+ attr_accessor :sr
+ # Options for the registration in TH.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Th))
+ }
+ attr_accessor :th
+ # Options for the registration in TJ.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tj))
+ }
+ attr_accessor :tj
+ # Options for the registration in TR.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tr))
+ }
+ attr_accessor :tr
+ # Options for the registration in TZ.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz))
+ }
+ attr_accessor :tz
+ # Options for the registration in UG.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ug))
+ }
+ attr_accessor :ug
+ # Options for the registration in US.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us))
+ }
+ attr_accessor :us
+ # Options for the registration in UY.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uy))
+ }
+ attr_accessor :uy
+ # Options for the registration in UZ.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uz))
+ }
+ attr_accessor :uz
+ # Options for the registration in VN.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Vn))
+ }
+ attr_accessor :vn
+ # Options for the registration in ZA.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Za))
+ }
+ attr_accessor :za
+ # Options for the registration in ZM.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zm))
+ }
+ attr_accessor :zm
+ # Options for the registration in ZW.
+ sig {
+ returns(T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zw))
+ }
+ attr_accessor :zw
+ sig {
+ params(ae: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Au), ba: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bb), be: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be), bg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bh), bs: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cl), co: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cr), cy: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es), fi: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie), is: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ke), kh: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kz), lt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pe), pl: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz), ug: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Zw)).void
+ }
+ def initialize(
+ ae: nil,
+ al: nil,
+ am: nil,
+ ao: nil,
+ at: nil,
+ au: nil,
+ ba: nil,
+ bb: nil,
+ be: nil,
+ bg: nil,
+ bh: nil,
+ bs: nil,
+ by: nil,
+ ca: nil,
+ cd: nil,
+ ch: nil,
+ cl: nil,
+ co: nil,
+ cr: nil,
+ cy: nil,
+ cz: nil,
+ de: nil,
+ dk: nil,
+ ec: nil,
+ ee: nil,
+ eg: nil,
+ es: nil,
+ fi: nil,
+ fr: nil,
+ gb: nil,
+ ge: nil,
+ gn: nil,
+ gr: nil,
+ hr: nil,
+ hu: nil,
+ id: nil,
+ ie: nil,
+ is: nil,
+ it: nil,
+ jp: nil,
+ ke: nil,
+ kh: nil,
+ kr: nil,
+ kz: nil,
+ lt: nil,
+ lu: nil,
+ lv: nil,
+ ma: nil,
+ md: nil,
+ me: nil,
+ mk: nil,
+ mr: nil,
+ mt: nil,
+ mx: nil,
+ my: nil,
+ ng: nil,
+ nl: nil,
+ no: nil,
+ np: nil,
+ nz: nil,
+ om: nil,
+ pe: nil,
+ pl: nil,
+ pt: nil,
+ ro: nil,
+ rs: nil,
+ ru: nil,
+ sa: nil,
+ se: nil,
+ sg: nil,
+ si: nil,
+ sk: nil,
+ sn: nil,
+ sr: nil,
+ th: nil,
+ tj: nil,
+ tr: nil,
+ tz: nil,
+ ug: nil,
+ us: nil,
+ uy: nil,
+ uz: nil,
+ vn: nil,
+ za: nil,
+ zm: nil,
+ zw: nil
+ ); end
+ end
+ # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.any(String, Integer)) }
+ attr_accessor :active_from
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Specific options for a registration in the specified `country`.
+ sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions) }
+ attr_accessor :country_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :expires_at
+ sig {
+ params(active_from: T.any(String, Integer), country: String, country_options: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions, expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer)).void
+ }
+ def initialize(
+ active_from: nil,
+ country: nil,
+ country_options: nil,
+ expand: nil,
+ expires_at: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(T.any(String, Integer))) }
+ attr_accessor :active_from
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
+ attr_accessor :expires_at
+ sig {
+ params(active_from: T.nilable(T.any(String, Integer)), expand: T.nilable(T::Array[String]), expires_at: T.nilable(T.nilable(T.any(String, T.any(String, Integer))))).void
+ }
+ def initialize(active_from: nil, expand: nil, expires_at: nil); end
+ end
+ # Creates a new Tax Registration object.
+ sig {
+ params(params: T.any(::Stripe::Tax::RegistrationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of Tax Registration objects.
+ sig {
+ params(params: T.any(::Stripe::Tax::RegistrationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Returns a Tax Registration object.
+ sig {
+ params(id: String, params: T.any(::Stripe::Tax::RegistrationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Updates an existing Tax Registration object.
+ #
+ # A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.
+ sig {
+ params(id: String, params: T.any(::Stripe::Tax::RegistrationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration)
+ }
+ def update(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax/settings_service.rbi b/rbi/stripe/services/tax/settings_service.rbi
new file mode 100644
index 00000000..aa73494a
--- /dev/null
+++ b/rbi/stripe/services/tax/settings_service.rbi
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class SettingsService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Defaults < Stripe::RequestParams
+ # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_behavior
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_code
+ sig { params(tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void }
+ def initialize(tax_behavior: nil, tax_code: nil); end
+ end
+ class HeadOffice < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The location of the business for tax purposes.
+ sig { returns(::Stripe::Tax::SettingsService::UpdateParams::HeadOffice::Address) }
+ attr_accessor :address
+ sig {
+ params(address: ::Stripe::Tax::SettingsService::UpdateParams::HeadOffice::Address).void
+ }
+ def initialize(address: nil); end
+ end
+ # Default configuration to be used on Stripe Tax calculations.
+ sig { returns(T.nilable(::Stripe::Tax::SettingsService::UpdateParams::Defaults)) }
+ attr_accessor :defaults
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The place where your business is located.
+ sig { returns(T.nilable(::Stripe::Tax::SettingsService::UpdateParams::HeadOffice)) }
+ attr_accessor :head_office
+ sig {
+ params(defaults: T.nilable(::Stripe::Tax::SettingsService::UpdateParams::Defaults), expand: T.nilable(T::Array[String]), head_office: T.nilable(::Stripe::Tax::SettingsService::UpdateParams::HeadOffice)).void
+ }
+ def initialize(defaults: nil, expand: nil, head_office: nil); end
+ end
+ # Retrieves Tax Settings for a merchant.
+ sig {
+ params(params: T.any(::Stripe::Tax::SettingsService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Settings)
+ }
+ def retrieve(params = {}, opts = {}); end
+
+ # Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.
+ sig {
+ params(params: T.any(::Stripe::Tax::SettingsService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Settings)
+ }
+ def update(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax/transaction_line_item_service.rbi b/rbi/stripe/services/tax/transaction_line_item_service.rbi
new file mode 100644
index 00000000..0e98a49d
--- /dev/null
+++ b/rbi/stripe/services/tax/transaction_line_item_service.rbi
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class TransactionLineItemService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ # Retrieves the line items of a committed standalone transaction as a collection.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::Tax::TransactionLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(transaction, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax/transaction_service.rbi b/rbi/stripe/services/tax/transaction_service.rbi
new file mode 100644
index 00000000..91a3c40e
--- /dev/null
+++ b/rbi/stripe/services/tax/transaction_service.rbi
@@ -0,0 +1,146 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Tax
+ class TransactionService < StripeService
+ attr_reader :line_items
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreateFromCalculationParams < Stripe::RequestParams
+ # Tax Calculation ID to be used as input when creating the transaction.
+ sig { returns(String) }
+ attr_accessor :calculation
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :posted_at
+ # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.
+ sig { returns(String) }
+ attr_accessor :reference
+ sig {
+ params(calculation: String, expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), posted_at: T.nilable(Integer), reference: String).void
+ }
+ def initialize(
+ calculation: nil,
+ expand: nil,
+ metadata: nil,
+ posted_at: nil,
+ reference: nil
+ ); end
+ end
+ class CreateReversalParams < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount_tax
+ # 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.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The `id` of the line item to reverse in the original transaction.
+ sig { returns(String) }
+ attr_accessor :original_line_item
+ # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :quantity
+ # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.
+ sig { returns(String) }
+ attr_accessor :reference
+ sig {
+ params(amount: Integer, amount_tax: Integer, metadata: T.nilable(T::Hash[String, String]), original_line_item: String, quantity: T.nilable(Integer), reference: String).void
+ }
+ def initialize(
+ amount: nil,
+ amount_tax: nil,
+ metadata: nil,
+ original_line_item: nil,
+ quantity: nil,
+ reference: nil
+ ); end
+ end
+ class ShippingCost < Stripe::RequestParams
+ # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative.
+ sig { returns(Integer) }
+ attr_accessor :amount_tax
+ sig { params(amount: Integer, amount_tax: Integer).void }
+ def initialize(amount: nil, amount_tax: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :flat_amount
+ # The line item amounts to reverse.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::Tax::TransactionService::CreateReversalParams::LineItem]))
+ }
+ attr_accessor :line_items
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
+ sig { returns(String) }
+ attr_accessor :mode
+ # The ID of the Transaction to partially or fully reverse.
+ sig { returns(String) }
+ attr_accessor :original_transaction
+ # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports).
+ sig { returns(String) }
+ attr_accessor :reference
+ # The shipping cost to reverse.
+ sig {
+ returns(T.nilable(::Stripe::Tax::TransactionService::CreateReversalParams::ShippingCost))
+ }
+ attr_accessor :shipping_cost
+ sig {
+ params(expand: T.nilable(T::Array[String]), flat_amount: T.nilable(Integer), line_items: T.nilable(T::Array[::Stripe::Tax::TransactionService::CreateReversalParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), mode: String, original_transaction: String, reference: String, shipping_cost: T.nilable(::Stripe::Tax::TransactionService::CreateReversalParams::ShippingCost)).void
+ }
+ def initialize(
+ expand: nil,
+ flat_amount: nil,
+ line_items: nil,
+ metadata: nil,
+ mode: nil,
+ original_transaction: nil,
+ reference: nil,
+ shipping_cost: nil
+ ); end
+ end
+ # Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
+ sig {
+ params(params: T.any(::Stripe::Tax::TransactionService::CreateFromCalculationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction)
+ }
+ def create_from_calculation(params = {}, opts = {}); end
+
+ # Partially or fully reverses a previously created Transaction.
+ sig {
+ params(params: T.any(::Stripe::Tax::TransactionService::CreateReversalParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction)
+ }
+ def create_reversal(params = {}, opts = {}); end
+
+ # Retrieves a Tax Transaction object.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::Tax::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction)
+ }
+ def retrieve(transaction, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax_code_service.rbi b/rbi/stripe/services/tax_code_service.rbi
new file mode 100644
index 00000000..dfcbd789
--- /dev/null
+++ b/rbi/stripe/services/tax_code_service.rbi
@@ -0,0 +1,44 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TaxCodeService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
+ sig {
+ params(params: T.any(::Stripe::TaxCodeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.
+ sig {
+ params(id: String, params: T.any(::Stripe::TaxCodeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxCode)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax_id_service.rbi b/rbi/stripe/services/tax_id_service.rbi
new file mode 100644
index 00000000..41c9385a
--- /dev/null
+++ b/rbi/stripe/services/tax_id_service.rbi
@@ -0,0 +1,112 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TaxIdService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Type of owner referenced.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), customer: T.nilable(String), type: String).void }
+ def initialize(account: nil, customer: nil, type: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ sig { returns(T.nilable(::Stripe::TaxIdService::ListParams::Owner)) }
+ attr_accessor :owner
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), owner: T.nilable(::Stripe::TaxIdService::ListParams::Owner), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ owner: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Owner < Stripe::RequestParams
+ # Account the tax ID belongs to. Required when `type=account`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account
+ # Customer the tax ID belongs to. Required when `type=customer`
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # Type of owner referenced.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(account: T.nilable(String), customer: T.nilable(String), type: String).void }
+ def initialize(account: nil, customer: nil, type: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`.
+ sig { returns(T.nilable(::Stripe::TaxIdService::CreateParams::Owner)) }
+ attr_accessor :owner
+ # 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`
+ sig { returns(String) }
+ attr_accessor :type
+ # Value of the tax ID.
+ sig { returns(String) }
+ attr_accessor :value
+ sig {
+ params(expand: T.nilable(T::Array[String]), owner: T.nilable(::Stripe::TaxIdService::CreateParams::Owner), type: String, value: String).void
+ }
+ def initialize(expand: nil, owner: nil, type: nil, value: nil); end
+ end
+ # Creates a new account or customer tax_id object.
+ sig {
+ params(params: T.any(::Stripe::TaxIdService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes an existing account or customer tax_id object.
+ sig {
+ params(id: String, params: T.any(::Stripe::TaxIdService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def delete(id, params = {}, opts = {}); end
+
+ # Returns a list of tax IDs.
+ sig {
+ params(params: T.any(::Stripe::TaxIdService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves an account or customer tax_id object.
+ sig {
+ params(id: String, params: T.any(::Stripe::TaxIdService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax_rate_service.rbi b/rbi/stripe/services/tax_rate_service.rbi
new file mode 100644
index 00000000..a9ace1eb
--- /dev/null
+++ b/rbi/stripe/services/tax_rate_service.rbi
@@ -0,0 +1,185 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TaxRateService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Optional flag to filter by tax rates that are either active or inactive (archived).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Optional range for filtering created date.
+ sig { returns(T.nilable(T.any(::Stripe::TaxRateService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :inclusive
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(active: T.nilable(T::Boolean), created: T.nilable(T.any(::Stripe::TaxRateService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), inclusive: T.nilable(T::Boolean), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ inclusive: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # This specifies if the tax rate is inclusive or exclusive.
+ sig { returns(T::Boolean) }
+ attr_accessor :inclusive
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # This represents the tax rate percent out of 100.
+ sig { returns(Float) }
+ attr_accessor :percentage
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(active: T.nilable(T::Boolean), country: T.nilable(String), description: T.nilable(String), display_name: String, expand: T.nilable(T::Array[String]), inclusive: T::Boolean, jurisdiction: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ inclusive: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ percentage: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :active
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The display name of the tax rate, which will be shown to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :jurisdiction
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # The high-level tax type, such as `vat` or `sales_tax`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_type
+ sig {
+ params(active: T.nilable(T::Boolean), country: T.nilable(String), description: T.nilable(String), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), jurisdiction: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), state: T.nilable(String), tax_type: T.nilable(String)).void
+ }
+ def initialize(
+ active: nil,
+ country: nil,
+ description: nil,
+ display_name: nil,
+ expand: nil,
+ jurisdiction: nil,
+ metadata: nil,
+ state: nil,
+ tax_type: nil
+ ); end
+ end
+ # Creates a new tax rate.
+ sig {
+ params(params: T.any(::Stripe::TaxRateService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
+ sig {
+ params(params: T.any(::Stripe::TaxRateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a tax rate with the given ID
+ sig {
+ params(tax_rate: String, params: T.any(::Stripe::TaxRateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate)
+ }
+ def retrieve(tax_rate, params = {}, opts = {}); end
+
+ # Updates an existing tax rate.
+ sig {
+ params(tax_rate: String, params: T.any(::Stripe::TaxRateService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate)
+ }
+ def update(tax_rate, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/tax_service.rbi b/rbi/stripe/services/tax_service.rbi
new file mode 100644
index 00000000..73a73d6f
--- /dev/null
+++ b/rbi/stripe/services/tax_service.rbi
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TaxService < StripeService
+ attr_reader :calculations
+ attr_reader :registrations
+ attr_reader :settings
+ attr_reader :transactions
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/terminal/configuration_service.rbi b/rbi/stripe/services/terminal/configuration_service.rbi
new file mode 100644
index 00000000..199fd218
--- /dev/null
+++ b/rbi/stripe/services/terminal/configuration_service.rbi
@@ -0,0 +1,1120 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ class ConfigurationService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ sig { returns(Integer) }
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ sig { returns(Integer) }
+ attr_accessor :start_hour
+ sig { params(end_hour: Integer, start_hour: Integer).void }
+ def initialize(end_hour: nil, start_hour: nil); end
+ end
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ # Tipping configuration for AUD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Aud))
+ }
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Cad))
+ }
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Chf))
+ }
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Czk))
+ }
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Dkk))
+ }
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Eur))
+ }
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Gbp))
+ }
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Hkd))
+ }
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Jpy))
+ }
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Myr))
+ }
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nok))
+ }
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nzd))
+ }
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Pln))
+ }
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sek))
+ }
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sgd))
+ }
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Usd))
+ }
+ attr_accessor :usd
+ sig {
+ params(aud: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Aud), cad: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Cad), chf: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Chf), czk: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Czk), dkk: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Dkk), eur: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Eur), gbp: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Gbp), hkd: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Hkd), jpy: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Jpy), myr: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Myr), nok: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nok), nzd: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nzd), pln: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Pln), sek: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sek), sgd: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sgd), usd: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Usd)).void
+ }
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ ); end
+ end
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :username
+ sig {
+ params(ca_certificate_file: T.nilable(String), password: String, ssid: String, username: String).void
+ }
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil); end
+ end
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ sig { returns(String) }
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ sig { returns(String) }
+ attr_accessor :private_key_file
+ # Password for the private key file
+ sig { returns(T.nilable(String)) }
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig {
+ params(ca_certificate_file: T.nilable(String), client_certificate_file: String, private_key_file: String, private_key_file_password: T.nilable(String), ssid: String).void
+ }
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ ); end
+ end
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig { params(password: String, ssid: String).void }
+ def initialize(password: nil, ssid: nil); end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi::EnterpriseEapPeap))
+ }
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi::EnterpriseEapTls))
+ }
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi::PersonalPsk))
+ }
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(enterprise_eap_peap: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi::EnterpriseEapPeap), enterprise_eap_tls: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi::EnterpriseEapTls), personal_psk: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi::PersonalPsk), type: String).void
+ }
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ ); end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::BbposWiseposE))))
+ }
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Name of the configuration
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::Offline))))
+ }
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::RebootWindow))))
+ }
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::StripeS700))))
+ }
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping))))
+ }
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::VerifoneP400))))
+ }
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi))))
+ }
+ attr_accessor :wifi
+ sig {
+ params(bbpos_wisepos_e: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::BbposWiseposE))), expand: T.nilable(T::Array[String]), name: T.nilable(String), offline: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::Offline))), reboot_window: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::RebootWindow))), stripe_s700: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::StripeS700))), tipping: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping))), verifone_p400: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::VerifoneP400))), wifi: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::UpdateParams::Wifi)))).void
+ }
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # if present, only return the account default or non-default configurations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_account_default
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), is_account_default: T.nilable(T::Boolean), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ is_account_default: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class BbposWiseposE < Stripe::RequestParams
+ # A File ID representing an image to display on the reader
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Offline < Stripe::RequestParams
+ # Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ sig { returns(T::Boolean) }
+ attr_accessor :enabled
+ sig { params(enabled: T::Boolean).void }
+ def initialize(enabled: nil); end
+ end
+ class RebootWindow < Stripe::RequestParams
+ # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ sig { returns(Integer) }
+ attr_accessor :end_hour
+ # Integer between 0 to 23 that represents the start hour of the reboot time window.
+ sig { returns(Integer) }
+ attr_accessor :start_hour
+ sig { params(end_hour: Integer, start_hour: Integer).void }
+ def initialize(end_hour: nil, start_hour: nil); end
+ end
+ class StripeS700 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Tipping < Stripe::RequestParams
+ class Aud < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Cad < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Chf < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Czk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Dkk < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Eur < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Gbp < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Hkd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Jpy < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Myr < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nok < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Nzd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Pln < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sek < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Sgd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ class Usd < Stripe::RequestParams
+ # Fixed amounts displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :fixed_amounts
+ # Percentages displayed when collecting a tip
+ sig { returns(T.nilable(T::Array[Integer])) }
+ attr_accessor :percentages
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :smart_tip_threshold
+ sig {
+ params(fixed_amounts: T.nilable(T::Array[Integer]), percentages: T.nilable(T::Array[Integer]), smart_tip_threshold: T.nilable(Integer)).void
+ }
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end
+ end
+ # Tipping configuration for AUD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Aud))
+ }
+ attr_accessor :aud
+ # Tipping configuration for CAD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Cad))
+ }
+ attr_accessor :cad
+ # Tipping configuration for CHF
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Chf))
+ }
+ attr_accessor :chf
+ # Tipping configuration for CZK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Czk))
+ }
+ attr_accessor :czk
+ # Tipping configuration for DKK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Dkk))
+ }
+ attr_accessor :dkk
+ # Tipping configuration for EUR
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Eur))
+ }
+ attr_accessor :eur
+ # Tipping configuration for GBP
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Gbp))
+ }
+ attr_accessor :gbp
+ # Tipping configuration for HKD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Hkd))
+ }
+ attr_accessor :hkd
+ # Tipping configuration for JPY
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Jpy))
+ }
+ attr_accessor :jpy
+ # Tipping configuration for MYR
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Myr))
+ }
+ attr_accessor :myr
+ # Tipping configuration for NOK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nok))
+ }
+ attr_accessor :nok
+ # Tipping configuration for NZD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nzd))
+ }
+ attr_accessor :nzd
+ # Tipping configuration for PLN
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Pln))
+ }
+ attr_accessor :pln
+ # Tipping configuration for SEK
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sek))
+ }
+ attr_accessor :sek
+ # Tipping configuration for SGD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sgd))
+ }
+ attr_accessor :sgd
+ # Tipping configuration for USD
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Usd))
+ }
+ attr_accessor :usd
+ sig {
+ params(aud: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Aud), cad: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Cad), chf: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Chf), czk: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Czk), dkk: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Dkk), eur: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Eur), gbp: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Gbp), hkd: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Hkd), jpy: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Jpy), myr: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Myr), nok: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nok), nzd: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nzd), pln: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Pln), sek: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sek), sgd: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sgd), usd: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Usd)).void
+ }
+ def initialize(
+ aud: nil,
+ cad: nil,
+ chf: nil,
+ czk: nil,
+ dkk: nil,
+ eur: nil,
+ gbp: nil,
+ hkd: nil,
+ jpy: nil,
+ myr: nil,
+ nok: nil,
+ nzd: nil,
+ pln: nil,
+ sek: nil,
+ sgd: nil,
+ usd: nil
+ ); end
+ end
+ class VerifoneP400 < Stripe::RequestParams
+ # A File ID representing an image you would like displayed on the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :splashscreen
+ sig { params(splashscreen: T.nilable(T.nilable(String))).void }
+ def initialize(splashscreen: nil); end
+ end
+ class Wifi < Stripe::RequestParams
+ class EnterpriseEapPeap < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ # Username for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :username
+ sig {
+ params(ca_certificate_file: T.nilable(String), password: String, ssid: String, username: String).void
+ }
+ def initialize(ca_certificate_file: nil, password: nil, ssid: nil, username: nil); end
+ end
+ class EnterpriseEapTls < Stripe::RequestParams
+ # A File ID representing a PEM file containing the server certificate
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ca_certificate_file
+ # A File ID representing a PEM file containing the client certificate
+ sig { returns(String) }
+ attr_accessor :client_certificate_file
+ # A File ID representing a PEM file containing the client RSA private key
+ sig { returns(String) }
+ attr_accessor :private_key_file
+ # Password for the private key file
+ sig { returns(T.nilable(String)) }
+ attr_accessor :private_key_file_password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig {
+ params(ca_certificate_file: T.nilable(String), client_certificate_file: String, private_key_file: String, private_key_file_password: T.nilable(String), ssid: String).void
+ }
+ def initialize(
+ ca_certificate_file: nil,
+ client_certificate_file: nil,
+ private_key_file: nil,
+ private_key_file_password: nil,
+ ssid: nil
+ ); end
+ end
+ class PersonalPsk < Stripe::RequestParams
+ # Password for connecting to the WiFi network
+ sig { returns(String) }
+ attr_accessor :password
+ # Name of the WiFi network
+ sig { returns(String) }
+ attr_accessor :ssid
+ sig { params(password: String, ssid: String).void }
+ def initialize(password: nil, ssid: nil); end
+ end
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Wifi::EnterpriseEapPeap))
+ }
+ attr_accessor :enterprise_eap_peap
+ # Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Wifi::EnterpriseEapTls))
+ }
+ attr_accessor :enterprise_eap_tls
+ # Credentials for a WPA-Personal WiFi network.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Wifi::PersonalPsk))
+ }
+ attr_accessor :personal_psk
+ # Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(enterprise_eap_peap: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Wifi::EnterpriseEapPeap), enterprise_eap_tls: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Wifi::EnterpriseEapTls), personal_psk: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Wifi::PersonalPsk), type: String).void
+ }
+ def initialize(
+ enterprise_eap_peap: nil,
+ enterprise_eap_tls: nil,
+ personal_psk: nil,
+ type: nil
+ ); end
+ end
+ # An object containing device type specific settings for BBPOS WisePOS E readers
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::BbposWiseposE))
+ }
+ attr_accessor :bbpos_wisepos_e
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Name of the configuration
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Configurations for collecting transactions offline.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::CreateParams::Offline))))
+ }
+ attr_accessor :offline
+ # Reboot time settings for readers that support customized reboot time configuration.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::RebootWindow))
+ }
+ attr_accessor :reboot_window
+ # An object containing device type specific settings for Stripe S700 readers
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::StripeS700))
+ }
+ attr_accessor :stripe_s700
+ # Tipping configurations for readers supporting on-reader tips
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping))))
+ }
+ attr_accessor :tipping
+ # An object containing device type specific settings for Verifone P400 readers
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::VerifoneP400))
+ }
+ attr_accessor :verifone_p400
+ # Configurations for connecting to a WiFi network.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::CreateParams::Wifi))))
+ }
+ attr_accessor :wifi
+ sig {
+ params(bbpos_wisepos_e: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::BbposWiseposE), expand: T.nilable(T::Array[String]), name: T.nilable(String), offline: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::CreateParams::Offline))), reboot_window: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::RebootWindow), stripe_s700: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::StripeS700), tipping: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping))), verifone_p400: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::VerifoneP400), wifi: T.nilable(T.nilable(T.any(String, ::Stripe::Terminal::ConfigurationService::CreateParams::Wifi)))).void
+ }
+ def initialize(
+ bbpos_wisepos_e: nil,
+ expand: nil,
+ name: nil,
+ offline: nil,
+ reboot_window: nil,
+ stripe_s700: nil,
+ tipping: nil,
+ verifone_p400: nil,
+ wifi: nil
+ ); end
+ end
+ # Creates a new Configuration object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::ConfigurationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a Configuration object.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::Terminal::ConfigurationService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def delete(configuration, params = {}, opts = {}); end
+
+ # Returns a list of Configuration objects.
+ sig {
+ params(params: T.any(::Stripe::Terminal::ConfigurationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a Configuration object.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::Terminal::ConfigurationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def retrieve(configuration, params = {}, opts = {}); end
+
+ # Updates a new Configuration object.
+ sig {
+ params(configuration: String, params: T.any(::Stripe::Terminal::ConfigurationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration)
+ }
+ def update(configuration, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/terminal/connection_token_service.rbi b/rbi/stripe/services/terminal/connection_token_service.rbi
new file mode 100644
index 00000000..c0c41ee9
--- /dev/null
+++ b/rbi/stripe/services/terminal/connection_token_service.rbi
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ class ConnectionTokenService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :location
+ sig { params(expand: T.nilable(T::Array[String]), location: T.nilable(String)).void }
+ def initialize(expand: nil, location: nil); end
+ end
+ # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
+ sig {
+ params(params: T.any(::Stripe::Terminal::ConnectionTokenService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::ConnectionToken)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/terminal/location_service.rbi b/rbi/stripe/services/terminal/location_service.rbi
new file mode 100644
index 00000000..3b29176a
--- /dev/null
+++ b/rbi/stripe/services/terminal/location_service.rbi
@@ -0,0 +1,184 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ class LocationService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location.
+ sig { returns(T.nilable(::Stripe::Terminal::LocationService::UpdateParams::Address)) }
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :configuration_overrides
+ # A name for the location.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(address: T.nilable(::Stripe::Terminal::LocationService::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(String) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: String, line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # The full address of the location.
+ sig { returns(::Stripe::Terminal::LocationService::CreateParams::Address) }
+ attr_accessor :address
+ # The ID of a configuration that will be used to customize all readers in this location.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :configuration_overrides
+ # A name for the location. Maximum length is 1000 characters.
+ sig { returns(String) }
+ attr_accessor :display_name
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(address: ::Stripe::Terminal::LocationService::CreateParams::Address, configuration_overrides: T.nilable(String), display_name: String, expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(
+ address: nil,
+ configuration_overrides: nil,
+ display_name: nil,
+ expand: nil,
+ metadata: nil
+ ); end
+ end
+ # Creates a new Location object.
+ # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
+ sig {
+ params(params: T.any(::Stripe::Terminal::LocationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a Location object.
+ sig {
+ params(location: String, params: T.any(::Stripe::Terminal::LocationService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def delete(location, params = {}, opts = {}); end
+
+ # Returns a list of Location objects.
+ sig {
+ params(params: T.any(::Stripe::Terminal::LocationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a Location object.
+ sig {
+ params(location: String, params: T.any(::Stripe::Terminal::LocationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def retrieve(location, params = {}, opts = {}); end
+
+ # Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(location: String, params: T.any(::Stripe::Terminal::LocationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
+ }
+ def update(location, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/terminal/reader_service.rbi b/rbi/stripe/services/terminal/reader_service.rbi
new file mode 100644
index 00000000..1ac4d6c3
--- /dev/null
+++ b/rbi/stripe/services/terminal/reader_service.rbi
@@ -0,0 +1,344 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Terminal
+ class ReaderService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The new label of the reader.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :label
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), label: T.nilable(T.nilable(String)), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, label: nil, metadata: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # Filters readers by device type
+ sig { returns(T.nilable(String)) }
+ attr_accessor :device_type
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # A location ID to filter the response list to only readers at the specific location
+ sig { returns(T.nilable(String)) }
+ attr_accessor :location
+ # Filters readers by serial number
+ sig { returns(T.nilable(String)) }
+ attr_accessor :serial_number
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # A status filter to filter readers to only offline or online readers
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(device_type: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), location: T.nilable(String), serial_number: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ device_type: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ location: nil,
+ serial_number: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :label
+ # The location to assign the reader to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :location
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # A code generated by the reader used for registering to an account.
+ sig { returns(String) }
+ attr_accessor :registration_code
+ sig {
+ params(expand: T.nilable(T::Array[String]), label: T.nilable(String), location: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), registration_code: String).void
+ }
+ def initialize(
+ expand: nil,
+ label: nil,
+ location: nil,
+ metadata: nil,
+ registration_code: nil
+ ); end
+ end
+ class CancelActionParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ProcessPaymentIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ class Tipping < Stripe::RequestParams
+ # 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).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_eligible
+ sig { params(amount_eligible: T.nilable(Integer)).void }
+ def initialize(amount_eligible: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # Enables cancel button on transaction screens.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enable_customer_cancellation
+ # Override showing a tipping selection screen on this transaction.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :skip_tipping
+ # Tipping configuration for this transaction.
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig::Tipping))
+ }
+ attr_accessor :tipping
+ sig {
+ params(allow_redisplay: T.nilable(String), enable_customer_cancellation: T.nilable(T::Boolean), skip_tipping: T.nilable(T::Boolean), tipping: T.nilable(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig::Tipping)).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ enable_customer_cancellation: nil,
+ skip_tipping: nil,
+ tipping: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # PaymentIntent ID
+ sig { returns(String) }
+ attr_accessor :payment_intent
+ # Configuration overrides
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig))
+ }
+ attr_accessor :process_config
+ sig {
+ params(expand: T.nilable(T::Array[String]), payment_intent: String, process_config: T.nilable(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig)).void
+ }
+ def initialize(expand: nil, payment_intent: nil, process_config: nil); end
+ end
+ class ProcessSetupIntentParams < Stripe::RequestParams
+ class ProcessConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enable_customer_cancellation
+ sig { params(enable_customer_cancellation: T.nilable(T::Boolean)).void }
+ def initialize(enable_customer_cancellation: nil); end
+ end
+ # 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.
+ sig { returns(String) }
+ attr_accessor :allow_redisplay
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Configuration overrides
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ReaderService::ProcessSetupIntentParams::ProcessConfig))
+ }
+ attr_accessor :process_config
+ # SetupIntent ID
+ sig { returns(String) }
+ attr_accessor :setup_intent
+ sig {
+ params(allow_redisplay: String, expand: T.nilable(T::Array[String]), process_config: T.nilable(::Stripe::Terminal::ReaderService::ProcessSetupIntentParams::ProcessConfig), setup_intent: String).void
+ }
+ def initialize(
+ allow_redisplay: nil,
+ expand: nil,
+ process_config: nil,
+ setup_intent: nil
+ ); end
+ end
+ class RefundPaymentParams < Stripe::RequestParams
+ class RefundPaymentConfig < Stripe::RequestParams
+ # Enables cancel button on transaction screens.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :enable_customer_cancellation
+ sig { params(enable_customer_cancellation: T.nilable(T::Boolean)).void }
+ def initialize(enable_customer_cancellation: nil); end
+ end
+ # A positive integer in __cents__ representing how much of this charge to refund.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # ID of the Charge to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :charge
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # ID of the PaymentIntent to refund.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_intent
+ # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_application_fee
+ # Configuration overrides
+ sig {
+ returns(T.nilable(::Stripe::Terminal::ReaderService::RefundPaymentParams::RefundPaymentConfig))
+ }
+ attr_accessor :refund_payment_config
+ # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :reverse_transfer
+ sig {
+ params(amount: T.nilable(Integer), charge: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), payment_intent: T.nilable(String), refund_application_fee: T.nilable(T::Boolean), refund_payment_config: T.nilable(::Stripe::Terminal::ReaderService::RefundPaymentParams::RefundPaymentConfig), reverse_transfer: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ charge: nil,
+ expand: nil,
+ metadata: nil,
+ payment_intent: nil,
+ refund_application_fee: nil,
+ refund_payment_config: nil,
+ reverse_transfer: nil
+ ); end
+ end
+ class SetReaderDisplayParams < Stripe::RequestParams
+ class Cart < Stripe::RequestParams
+ class LineItem < Stripe::RequestParams
+ # The price of the item in cents.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # The description or name of the item.
+ sig { returns(String) }
+ attr_accessor :description
+ # The quantity of the line item being purchased.
+ sig { returns(Integer) }
+ attr_accessor :quantity
+ sig { params(amount: Integer, description: String, quantity: Integer).void }
+ def initialize(amount: nil, description: nil, quantity: nil); end
+ end
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Array of line items that were purchased.
+ sig {
+ returns(T::Array[::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart::LineItem])
+ }
+ attr_accessor :line_items
+ # The amount of tax in cents.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :tax
+ # Total balance of cart due in cents.
+ sig { returns(Integer) }
+ attr_accessor :total
+ sig {
+ params(currency: String, line_items: T::Array[::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart::LineItem], tax: T.nilable(Integer), total: Integer).void
+ }
+ def initialize(currency: nil, line_items: nil, tax: nil, total: nil); end
+ end
+ # Cart
+ sig { returns(T.nilable(::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart)) }
+ attr_accessor :cart
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Type
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cart: T.nilable(::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart), expand: T.nilable(T::Array[String]), type: String).void
+ }
+ def initialize(cart: nil, expand: nil, type: nil); end
+ end
+ # Cancels the current reader action.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def cancel_action(reader, params = {}, opts = {}); end
+
+ # Creates a new Reader object.
+ sig {
+ params(params: T.any(::Stripe::Terminal::ReaderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a Reader object.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def delete(reader, params = {}, opts = {}); end
+
+ # Returns a list of Reader objects.
+ sig {
+ params(params: T.any(::Stripe::Terminal::ReaderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Initiates a payment flow on a Reader.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def process_payment_intent(reader, params = {}, opts = {}); end
+
+ # Initiates a setup intent flow on a Reader.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::ProcessSetupIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def process_setup_intent(reader, params = {}, opts = {}); end
+
+ # Initiates a refund on a Reader
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::RefundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def refund_payment(reader, params = {}, opts = {}); end
+
+ # Retrieves a Reader object.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def retrieve(reader, params = {}, opts = {}); end
+
+ # Sets reader display to show cart details.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::SetReaderDisplayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def set_reader_display(reader, params = {}, opts = {}); end
+
+ # Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ sig {
+ params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def update(reader, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/terminal_service.rbi b/rbi/stripe/services/terminal_service.rbi
new file mode 100644
index 00000000..6d73ba73
--- /dev/null
+++ b/rbi/stripe/services/terminal_service.rbi
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TerminalService < StripeService
+ attr_reader :configurations
+ attr_reader :connection_tokens
+ attr_reader :locations
+ attr_reader :readers
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/confirmation_token_service.rbi b/rbi/stripe/services/test_helpers/confirmation_token_service.rbi
new file mode 100644
index 00000000..68bb6887
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/confirmation_token_service.rbi
@@ -0,0 +1,746 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class ConfirmationTokenService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class PaymentMethodData < Stripe::RequestParams
+ class AcssDebit < Stripe::RequestParams
+ # Customer's bank account number.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Institution number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :institution_number
+ # Transit number of the customer's bank.
+ sig { returns(String) }
+ attr_accessor :transit_number
+ sig {
+ params(account_number: String, institution_number: String, transit_number: String).void
+ }
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil); end
+ end
+ class Affirm < Stripe::RequestParams
+
+ end
+ class AfterpayClearpay < Stripe::RequestParams
+
+ end
+ class Alipay < Stripe::RequestParams
+
+ end
+ class Alma < Stripe::RequestParams
+
+ end
+ class AmazonPay < Stripe::RequestParams
+
+ end
+ class AuBecsDebit < Stripe::RequestParams
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # Bank-State-Branch number of the bank account.
+ sig { returns(String) }
+ attr_accessor :bsb_number
+ sig { params(account_number: String, bsb_number: String).void }
+ def initialize(account_number: nil, bsb_number: nil); end
+ end
+ class BacsDebit < Stripe::RequestParams
+ # Account number of the bank account that the funds will be debited from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Sort code of the bank account. (e.g., `10-20-30`)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :sort_code
+ sig { params(account_number: T.nilable(String), sort_code: T.nilable(String)).void }
+ def initialize(account_number: nil, sort_code: nil); end
+ end
+ class Bancontact < Stripe::RequestParams
+
+ end
+ class Billie < Stripe::RequestParams
+
+ end
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class Blik < Stripe::RequestParams
+
+ end
+ class Boleto < Stripe::RequestParams
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ sig { returns(String) }
+ attr_accessor :tax_id
+ sig { params(tax_id: String).void }
+ def initialize(tax_id: nil); end
+ end
+ class Cashapp < Stripe::RequestParams
+
+ end
+ class CustomerBalance < Stripe::RequestParams
+
+ end
+ class Eps < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class Fpx < Stripe::RequestParams
+ # Account holder type for FPX transaction
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The customer's bank.
+ sig { returns(String) }
+ attr_accessor :bank
+ sig { params(account_holder_type: T.nilable(String), bank: String).void }
+ def initialize(account_holder_type: nil, bank: nil); end
+ end
+ class Giropay < Stripe::RequestParams
+
+ end
+ class Grabpay < Stripe::RequestParams
+
+ end
+ class Ideal < Stripe::RequestParams
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+
+ end
+ class KakaoPay < Stripe::RequestParams
+
+ end
+ class Klarna < Stripe::RequestParams
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ # Customer's date of birth
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna::Dob))
+ }
+ attr_accessor :dob
+ sig {
+ params(dob: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna::Dob)).void
+ }
+ def initialize(dob: nil); end
+ end
+ class Konbini < Stripe::RequestParams
+
+ end
+ class KrCard < Stripe::RequestParams
+
+ end
+ class Link < Stripe::RequestParams
+
+ end
+ class Mobilepay < Stripe::RequestParams
+
+ end
+ class Multibanco < Stripe::RequestParams
+
+ end
+ class NaverPay < Stripe::RequestParams
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :funding
+ sig { params(funding: T.nilable(String)).void }
+ def initialize(funding: nil); end
+ end
+ class NzBankAccount < Stripe::RequestParams
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The account number for the bank account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The numeric code for the bank account's bank.
+ sig { returns(String) }
+ attr_accessor :bank_code
+ # The numeric code for the bank account's bank branch.
+ sig { returns(String) }
+ attr_accessor :branch_code
+ # Attribute for param field reference
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ # The suffix of the bank account number.
+ sig { returns(String) }
+ attr_accessor :suffix
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: String, bank_code: String, branch_code: String, reference: T.nilable(String), suffix: String).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ bank_code: nil,
+ branch_code: nil,
+ reference: nil,
+ suffix: nil
+ ); end
+ end
+ class Oxxo < Stripe::RequestParams
+
+ end
+ class P24 < Stripe::RequestParams
+ # The customer's bank.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :bank
+ sig { params(bank: T.nilable(String)).void }
+ def initialize(bank: nil); end
+ end
+ class PayByBank < Stripe::RequestParams
+
+ end
+ class Payco < Stripe::RequestParams
+
+ end
+ class Paynow < Stripe::RequestParams
+
+ end
+ class Paypal < Stripe::RequestParams
+
+ end
+ class Pix < Stripe::RequestParams
+
+ end
+ class Promptpay < Stripe::RequestParams
+
+ end
+ class RadarOptions < Stripe::RequestParams
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :session
+ sig { params(session: T.nilable(String)).void }
+ def initialize(session: nil); end
+ end
+ class RevolutPay < Stripe::RequestParams
+
+ end
+ class SamsungPay < Stripe::RequestParams
+
+ end
+ class Satispay < Stripe::RequestParams
+
+ end
+ class SepaDebit < Stripe::RequestParams
+ # IBAN of the bank account.
+ sig { returns(String) }
+ attr_accessor :iban
+ sig { params(iban: String).void }
+ def initialize(iban: nil); end
+ end
+ class Sofort < Stripe::RequestParams
+ # Two-letter ISO code representing the country the bank account is located in.
+ sig { returns(String) }
+ attr_accessor :country
+ sig { params(country: String).void }
+ def initialize(country: nil); end
+ end
+ class Swish < Stripe::RequestParams
+
+ end
+ class Twint < Stripe::RequestParams
+
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ class WechatPay < Stripe::RequestParams
+
+ end
+ class Zip < Stripe::RequestParams
+
+ end
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AcssDebit))
+ }
+ attr_accessor :acss_debit
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Affirm))
+ }
+ attr_accessor :affirm
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AfterpayClearpay))
+ }
+ attr_accessor :afterpay_clearpay
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alipay))
+ }
+ attr_accessor :alipay
+ # 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. The field defaults to `unspecified`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :allow_redisplay
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alma))
+ }
+ attr_accessor :alma
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AmazonPay))
+ }
+ attr_accessor :amazon_pay
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AuBecsDebit))
+ }
+ attr_accessor :au_becs_debit
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BacsDebit))
+ }
+ attr_accessor :bacs_debit
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Bancontact))
+ }
+ attr_accessor :bancontact
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Billie))
+ }
+ attr_accessor :billie
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Blik))
+ }
+ attr_accessor :blik
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Boleto))
+ }
+ attr_accessor :boleto
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp))
+ }
+ attr_accessor :cashapp
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance))
+ }
+ attr_accessor :customer_balance
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Eps))
+ }
+ attr_accessor :eps
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Fpx))
+ }
+ attr_accessor :fpx
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Giropay))
+ }
+ attr_accessor :giropay
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Grabpay))
+ }
+ attr_accessor :grabpay
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Ideal))
+ }
+ attr_accessor :ideal
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KakaoPay))
+ }
+ attr_accessor :kakao_pay
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna))
+ }
+ attr_accessor :klarna
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Konbini))
+ }
+ attr_accessor :konbini
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KrCard))
+ }
+ attr_accessor :kr_card
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Link))
+ }
+ attr_accessor :link
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Mobilepay))
+ }
+ attr_accessor :mobilepay
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Multibanco))
+ }
+ attr_accessor :multibanco
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NaverPay))
+ }
+ attr_accessor :naver_pay
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NzBankAccount))
+ }
+ attr_accessor :nz_bank_account
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Oxxo))
+ }
+ attr_accessor :oxxo
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::P24))
+ }
+ attr_accessor :p24
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::PayByBank))
+ }
+ attr_accessor :pay_by_bank
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payco))
+ }
+ attr_accessor :payco
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paynow))
+ }
+ attr_accessor :paynow
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paypal))
+ }
+ attr_accessor :paypal
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Pix))
+ }
+ attr_accessor :pix
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Promptpay))
+ }
+ attr_accessor :promptpay
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RadarOptions))
+ }
+ attr_accessor :radar_options
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RevolutPay))
+ }
+ attr_accessor :revolut_pay
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SamsungPay))
+ }
+ attr_accessor :samsung_pay
+ # If this is a Satispay PaymentMethod, this hash contains details about the Satispay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Satispay))
+ }
+ attr_accessor :satispay
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SepaDebit))
+ }
+ attr_accessor :sepa_debit
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Sofort))
+ }
+ attr_accessor :sofort
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Swish))
+ }
+ attr_accessor :swish
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Twint))
+ }
+ attr_accessor :twint
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::WechatPay))
+ }
+ attr_accessor :wechat_pay
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Zip))
+ }
+ attr_accessor :zip
+ sig {
+ params(acss_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AcssDebit), affirm: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Affirm), afterpay_clearpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AfterpayClearpay), alipay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alipay), allow_redisplay: T.nilable(String), alma: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alma), amazon_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AmazonPay), au_becs_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AuBecsDebit), bacs_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BacsDebit), bancontact: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Bancontact), billie: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Billie), billing_details: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails), blik: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Blik), boleto: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Boleto), cashapp: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp), customer_balance: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance), eps: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Eps), fpx: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Fpx), giropay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Giropay), grabpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Grabpay), ideal: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Ideal), interac_present: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::InteracPresent), kakao_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KakaoPay), klarna: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna), konbini: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Konbini), kr_card: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KrCard), link: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Link), metadata: T.nilable(T::Hash[String, String]), mobilepay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Mobilepay), multibanco: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Multibanco), naver_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NaverPay), nz_bank_account: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NzBankAccount), oxxo: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Oxxo), p24: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::P24), pay_by_bank: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::PayByBank), payco: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payco), paynow: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paynow), paypal: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paypal), pix: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Pix), promptpay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Promptpay), radar_options: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RadarOptions), revolut_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RevolutPay), samsung_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SamsungPay), satispay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Satispay), sepa_debit: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SepaDebit), sofort: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Sofort), swish: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Swish), twint: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Twint), type: String, us_bank_account: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::UsBankAccount), wechat_pay: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::WechatPay), zip: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Zip)).void
+ }
+ def initialize(
+ acss_debit: nil,
+ affirm: nil,
+ afterpay_clearpay: nil,
+ alipay: nil,
+ allow_redisplay: nil,
+ alma: nil,
+ amazon_pay: nil,
+ au_becs_debit: nil,
+ bacs_debit: nil,
+ bancontact: nil,
+ billie: nil,
+ billing_details: nil,
+ blik: nil,
+ boleto: nil,
+ cashapp: nil,
+ customer_balance: nil,
+ eps: nil,
+ fpx: nil,
+ giropay: nil,
+ grabpay: nil,
+ ideal: nil,
+ interac_present: nil,
+ kakao_pay: nil,
+ klarna: nil,
+ konbini: nil,
+ kr_card: nil,
+ link: nil,
+ metadata: nil,
+ mobilepay: nil,
+ multibanco: nil,
+ naver_pay: nil,
+ nz_bank_account: nil,
+ oxxo: nil,
+ p24: nil,
+ pay_by_bank: nil,
+ payco: nil,
+ paynow: nil,
+ paypal: nil,
+ pix: nil,
+ promptpay: nil,
+ radar_options: nil,
+ revolut_pay: nil,
+ samsung_pay: nil,
+ satispay: nil,
+ sepa_debit: nil,
+ sofort: nil,
+ swish: nil,
+ twint: nil,
+ type: nil,
+ us_bank_account: nil,
+ wechat_pay: nil,
+ zip: nil
+ ); end
+ end
+ class Shipping < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Shipping address
+ sig {
+ returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping::Address)
+ }
+ attr_accessor :address
+ # Recipient name.
+ sig { returns(String) }
+ attr_accessor :name
+ # Recipient phone (including extension)
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping::Address, name: String, phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, name: nil, phone: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # ID of an existing PaymentMethod.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # If provided, this hash will be used to create a PaymentMethod.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData))
+ }
+ attr_accessor :payment_method_data
+ # Return URL used to confirm the Intent.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :return_url
+ # Indicates that you intend to make future payments with this ConfirmationToken's payment method.
+ #
+ # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :setup_future_usage
+ # Shipping information for this ConfirmationToken.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping))
+ }
+ attr_accessor :shipping
+ sig {
+ params(expand: T.nilable(T::Array[String]), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData), return_url: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping)).void
+ }
+ def initialize(
+ expand: nil,
+ payment_method: nil,
+ payment_method_data: nil,
+ return_url: nil,
+ setup_future_usage: nil,
+ shipping: nil
+ ); end
+ end
+ # Creates a test mode Confirmation Token server side for your integration tests.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ConfirmationToken)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/customer_service.rbi b/rbi/stripe/services/test_helpers/customer_service.rbi
new file mode 100644
index 00000000..153af931
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/customer_service.rbi
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class CustomerService < StripeService
+ class FundCashBalanceParams < Stripe::RequestParams
+ # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(amount: Integer, currency: String, expand: T.nilable(T::Array[String]), reference: T.nilable(String)).void
+ }
+ def initialize(amount: nil, currency: nil, expand: nil, reference: nil); end
+ end
+ # Create an incoming testmode bank transfer
+ sig {
+ params(customer: String, params: T.any(::Stripe::TestHelpers::CustomerService::FundCashBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerCashBalanceTransaction)
+ }
+ def fund_cash_balance(customer, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi b/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi
new file mode 100644
index 00000000..650779c2
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi
@@ -0,0 +1,848 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Issuing
+ class AuthorizationService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class AmountDetails < Stripe::RequestParams
+ # The ATM withdrawal fee.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :atm_fee
+ # The amount of cash requested by the cardholder.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :cashback_amount
+ sig { params(atm_fee: T.nilable(Integer), cashback_amount: T.nilable(Integer)).void }
+ def initialize(atm_fee: nil, cashback_amount: nil); end
+ end
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :category
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(category: T.nilable(String), city: T.nilable(String), country: T.nilable(String), name: T.nilable(String), network_id: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), terminal_id: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ ); end
+ end
+ class NetworkData < Stripe::RequestParams
+ # Identifier assigned to the acquirer by the card network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :acquiring_institution_id
+ sig { params(acquiring_institution_id: T.nilable(String)).void }
+ def initialize(acquiring_institution_id: nil); end
+ end
+ class VerificationData < Stripe::RequestParams
+ class AuthenticationExemption < Stripe::RequestParams
+ # The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ sig { returns(String) }
+ attr_accessor :claimed_by
+ # The specific exemption claimed for this authorization.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(claimed_by: String, type: String).void }
+ def initialize(claimed_by: nil, type: nil); end
+ end
+ class ThreeDSecure < Stripe::RequestParams
+ # The outcome of the 3D Secure authentication request.
+ sig { returns(String) }
+ attr_accessor :result
+ sig { params(result: String).void }
+ def initialize(result: nil); end
+ end
+ # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1_check
+ # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_postal_code_check
+ # The exemption applied to this authorization.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::AuthenticationExemption))
+ }
+ attr_accessor :authentication_exemption
+ # Whether the cardholder provided a CVC and if it matched Stripe’s record.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc_check
+ # Whether the cardholder provided an expiry date and if it matched Stripe’s record.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :expiry_check
+ # 3D Secure details.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::ThreeDSecure))
+ }
+ attr_accessor :three_d_secure
+ sig {
+ params(address_line1_check: T.nilable(String), address_postal_code_check: T.nilable(String), authentication_exemption: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::AuthenticationExemption), cvc_check: T.nilable(String), expiry_check: T.nilable(String), three_d_secure: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::ThreeDSecure)).void
+ }
+ def initialize(
+ address_line1_check: nil,
+ address_postal_code_check: nil,
+ authentication_exemption: nil,
+ cvc_check: nil,
+ expiry_check: nil,
+ three_d_secure: nil
+ ); end
+ end
+ # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::AmountDetails))
+ }
+ attr_accessor :amount_details
+ # How the card details were provided. Defaults to online.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :authorization_method
+ # Card associated with this authorization.
+ sig { returns(String) }
+ attr_accessor :card
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Fleet-specific information for authorizations using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fuel))
+ }
+ attr_accessor :fuel
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_amount_controllable
+ # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :merchant_amount
+ # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :merchant_currency
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::MerchantData))
+ }
+ attr_accessor :merchant_data
+ # Details about the authorization, such as identifiers, set by the card network.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::NetworkData))
+ }
+ attr_accessor :network_data
+ # Verifications that Stripe performed on information that the cardholder provided to the merchant.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData))
+ }
+ attr_accessor :verification_data
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :wallet
+ sig {
+ params(amount: T.nilable(Integer), amount_details: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::AmountDetails), authorization_method: T.nilable(String), card: String, currency: T.nilable(String), expand: T.nilable(T::Array[String]), fleet: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet), fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fuel), is_amount_controllable: T.nilable(T::Boolean), merchant_amount: T.nilable(Integer), merchant_currency: T.nilable(String), merchant_data: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::MerchantData), network_data: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::NetworkData), verification_data: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData), wallet: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ amount_details: nil,
+ authorization_method: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ fleet: nil,
+ fuel: nil,
+ is_amount_controllable: nil,
+ merchant_amount: nil,
+ merchant_currency: nil,
+ merchant_data: nil,
+ network_data: nil,
+ verification_data: nil,
+ wallet: nil
+ ); end
+ end
+ class CaptureParams < Stripe::RequestParams
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :stopover_allowed
+ sig {
+ params(arrival_airport_code: T.nilable(String), carrier: T.nilable(String), departure_airport_code: T.nilable(String), flight_number: T.nilable(String), service_class: T.nilable(String), stopover_allowed: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ ); end
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refundable
+ # The legs of the trip.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight::Segment]))
+ }
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :travel_agency
+ sig {
+ params(departure_at: T.nilable(Integer), passenger_name: T.nilable(String), refundable: T.nilable(T::Boolean), segments: T.nilable(T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight::Segment]), travel_agency: T.nilable(String)).void
+ }
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :nights
+ sig { params(check_in_at: T.nilable(Integer), nights: T.nilable(Integer)).void }
+ def initialize(check_in_at: nil, nights: nil); end
+ end
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field quantity
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity
+ # Attribute for param field total
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_cost
+ sig {
+ params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void
+ }
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight))
+ }
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fuel))
+ }
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Lodging))
+ }
+ attr_accessor :lodging
+ # The line items in the purchase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Receipt]))
+ }
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(fleet: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet), flight: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight), fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fuel), lodging: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Lodging), receipt: T.nilable(T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Receipt]), reference: T.nilable(String)).void
+ }
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ ); end
+ end
+ # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :capture_amount
+ # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :close_authorization
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Additional purchase information that is optionally provided by the merchant.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails))
+ }
+ attr_accessor :purchase_details
+ sig {
+ params(capture_amount: T.nilable(Integer), close_authorization: T.nilable(T::Boolean), expand: T.nilable(T::Array[String]), purchase_details: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails)).void
+ }
+ def initialize(
+ capture_amount: nil,
+ close_authorization: nil,
+ expand: nil,
+ purchase_details: nil
+ ); end
+ end
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FinalizeAmountParams < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :final_amount
+ # Fleet-specific information for authorizations using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fuel))
+ }
+ attr_accessor :fuel
+ sig {
+ params(expand: T.nilable(T::Array[String]), final_amount: Integer, fleet: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet), fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fuel)).void
+ }
+ def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end
+ end
+ class RespondParams < Stripe::RequestParams
+ # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).
+ sig { returns(T::Boolean) }
+ attr_accessor :confirmed
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(confirmed: T::Boolean, expand: T.nilable(T::Array[String])).void }
+ def initialize(confirmed: nil, expand: nil); end
+ end
+ class IncrementParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :increment_amount
+ # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :is_amount_controllable
+ sig {
+ params(expand: T.nilable(T::Array[String]), increment_amount: Integer, is_amount_controllable: T.nilable(T::Boolean)).void
+ }
+ def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil); end
+ end
+ class ReverseParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :reverse_amount
+ sig {
+ params(expand: T.nilable(T::Array[String]), reverse_amount: T.nilable(Integer)).void
+ }
+ def initialize(expand: nil, reverse_amount: nil); end
+ end
+ # Capture a test-mode authorization.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def capture(authorization, params = {}, opts = {}); end
+
+ # Create a test-mode authorization.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Expire a test-mode Authorization.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def expire(authorization, params = {}, opts = {}); end
+
+ # Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def finalize_amount(authorization, params = {}, opts = {}); end
+
+ # Increment a test-mode Authorization.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::IncrementParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def increment(authorization, params = {}, opts = {}); end
+
+ # Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::RespondParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def respond(authorization, params = {}, opts = {}); end
+
+ # Reverse a test-mode Authorization.
+ sig {
+ params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
+ }
+ def reverse(authorization, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/issuing/card_service.rbi b/rbi/stripe/services/test_helpers/issuing/card_service.rbi
new file mode 100644
index 00000000..874b7bd3
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/issuing/card_service.rbi
@@ -0,0 +1,76 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Issuing
+ class CardService < StripeService
+ class DeliverCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class FailCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReturnCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ShipCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class SubmitCardParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Updates the shipping status of the specified Issuing Card object to delivered.
+ sig {
+ params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::DeliverCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def deliver_card(card, params = {}, opts = {}); end
+
+ # Updates the shipping status of the specified Issuing Card object to failure.
+ sig {
+ params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::FailCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def fail_card(card, params = {}, opts = {}); end
+
+ # Updates the shipping status of the specified Issuing Card object to returned.
+ sig {
+ params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::ReturnCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def return_card(card, params = {}, opts = {}); end
+
+ # Updates the shipping status of the specified Issuing Card object to shipped.
+ sig {
+ params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::ShipCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def ship_card(card, params = {}, opts = {}); end
+
+ # Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
+ sig {
+ params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::SubmitCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card)
+ }
+ def submit_card(card, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi b/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi
new file mode 100644
index 00000000..4264e774
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi
@@ -0,0 +1,69 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Issuing
+ class PersonalizationDesignService < StripeService
+ class ActivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class DeactivateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class RejectParams < Stripe::RequestParams
+ class RejectionReasons < Stripe::RequestParams
+ # The reason(s) the card logo was rejected.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :card_logo
+ # The reason(s) the carrier text was rejected.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :carrier_text
+ sig {
+ params(card_logo: T.nilable(T::Array[String]), carrier_text: T.nilable(T::Array[String])).void
+ }
+ def initialize(card_logo: nil, carrier_text: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The reason(s) the personalization design was rejected.
+ sig {
+ returns(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::RejectParams::RejectionReasons)
+ }
+ attr_accessor :rejection_reasons
+ sig {
+ params(expand: T.nilable(T::Array[String]), rejection_reasons: ::Stripe::TestHelpers::Issuing::PersonalizationDesignService::RejectParams::RejectionReasons).void
+ }
+ def initialize(expand: nil, rejection_reasons: nil); end
+ end
+ # Updates the status of the specified testmode personalization design object to active.
+ sig {
+ params(personalization_design: String, params: T.any(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def activate(personalization_design, params = {}, opts = {}); end
+
+ # Updates the status of the specified testmode personalization design object to inactive.
+ sig {
+ params(personalization_design: String, params: T.any(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def deactivate(personalization_design, params = {}, opts = {}); end
+
+ # Updates the status of the specified testmode personalization design object to rejected.
+ sig {
+ params(personalization_design: String, params: T.any(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign)
+ }
+ def reject(personalization_design, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi b/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi
new file mode 100644
index 00000000..a53ccfc9
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi
@@ -0,0 +1,711 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Issuing
+ class TransactionService < StripeService
+ class RefundParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :refund_amount
+ sig {
+ params(expand: T.nilable(T::Array[String]), refund_amount: T.nilable(Integer)).void
+ }
+ def initialize(expand: nil, refund_amount: nil); end
+ end
+ class CreateForceCaptureParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :category
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(category: T.nilable(String), city: T.nilable(String), country: T.nilable(String), name: T.nilable(String), network_id: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), terminal_id: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ ); end
+ end
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :stopover_allowed
+ sig {
+ params(arrival_airport_code: T.nilable(String), carrier: T.nilable(String), departure_airport_code: T.nilable(String), flight_number: T.nilable(String), service_class: T.nilable(String), stopover_allowed: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ ); end
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refundable
+ # The legs of the trip.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight::Segment]))
+ }
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :travel_agency
+ sig {
+ params(departure_at: T.nilable(Integer), passenger_name: T.nilable(String), refundable: T.nilable(T::Boolean), segments: T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight::Segment]), travel_agency: T.nilable(String)).void
+ }
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :nights
+ sig { params(check_in_at: T.nilable(Integer), nights: T.nilable(Integer)).void }
+ def initialize(check_in_at: nil, nights: nil); end
+ end
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field quantity
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity
+ # Attribute for param field total
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_cost
+ sig {
+ params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void
+ }
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight))
+ }
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fuel))
+ }
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Lodging))
+ }
+ attr_accessor :lodging
+ # The line items in the purchase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Receipt]))
+ }
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(fleet: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet), flight: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight), fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fuel), lodging: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Lodging), receipt: T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Receipt]), reference: T.nilable(String)).void
+ }
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ ); end
+ end
+ # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Card associated with this transaction.
+ sig { returns(String) }
+ attr_accessor :card
+ # The currency of the capture. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::MerchantData))
+ }
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails))
+ }
+ attr_accessor :purchase_details
+ sig {
+ params(amount: Integer, card: String, currency: T.nilable(String), expand: T.nilable(T::Array[String]), merchant_data: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::MerchantData), purchase_details: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails)).void
+ }
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ ); end
+ end
+ class CreateUnlinkedRefundParams < Stripe::RequestParams
+ class MerchantData < Stripe::RequestParams
+ # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :category
+ # City where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Country where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Name of the seller
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network_id
+ # Postal code where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State where the seller is located
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # An ID assigned by the seller to the location of the sale.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :terminal_id
+ # URL provided by the merchant on a 3DS request
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(category: T.nilable(String), city: T.nilable(String), country: T.nilable(String), name: T.nilable(String), network_id: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), terminal_id: T.nilable(String), url: T.nilable(String)).void
+ }
+ def initialize(
+ category: nil,
+ city: nil,
+ country: nil,
+ name: nil,
+ network_id: nil,
+ postal_code: nil,
+ state: nil,
+ terminal_id: nil,
+ url: nil
+ ); end
+ end
+ class PurchaseDetails < Stripe::RequestParams
+ class Fleet < Stripe::RequestParams
+ class CardholderPromptData < Stripe::RequestParams
+ # Driver ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :driver_id
+ # Odometer reading.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :odometer
+ # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unspecified_id
+ # User ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_id
+ # Vehicle number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vehicle_number
+ sig {
+ params(driver_id: T.nilable(String), odometer: T.nilable(Integer), unspecified_id: T.nilable(String), user_id: T.nilable(String), vehicle_number: T.nilable(String)).void
+ }
+ def initialize(
+ driver_id: nil,
+ odometer: nil,
+ unspecified_id: nil,
+ user_id: nil,
+ vehicle_number: nil
+ ); end
+ end
+ class ReportedBreakdown < Stripe::RequestParams
+ class Fuel < Stripe::RequestParams
+ # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class NonFuel < Stripe::RequestParams
+ # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gross_amount_decimal
+ sig { params(gross_amount_decimal: T.nilable(String)).void }
+ def initialize(gross_amount_decimal: nil); end
+ end
+ class Tax < Stripe::RequestParams
+ # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :local_amount_decimal
+ # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :national_amount_decimal
+ sig {
+ params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void
+ }
+ def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end
+ end
+ # Breakdown of fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel))
+ }
+ attr_accessor :fuel
+ # Breakdown of non-fuel portion of the purchase.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel))
+ }
+ attr_accessor :non_fuel
+ # Information about tax included in this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax))
+ }
+ attr_accessor :tax
+ sig {
+ params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void
+ }
+ def initialize(fuel: nil, non_fuel: nil, tax: nil); end
+ end
+ # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData))
+ }
+ attr_accessor :cardholder_prompt_data
+ # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :purchase_type
+ # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown))
+ }
+ attr_accessor :reported_breakdown
+ # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_type
+ sig {
+ params(cardholder_prompt_data: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData), purchase_type: T.nilable(String), reported_breakdown: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown), service_type: T.nilable(String)).void
+ }
+ def initialize(
+ cardholder_prompt_data: nil,
+ purchase_type: nil,
+ reported_breakdown: nil,
+ service_type: nil
+ ); end
+ end
+ class Flight < Stripe::RequestParams
+ class Segment < Stripe::RequestParams
+ # The three-letter IATA airport code of the flight's destination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :arrival_airport_code
+ # The airline carrier code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :carrier
+ # The three-letter IATA airport code that the flight departed from.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :departure_airport_code
+ # The flight number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :flight_number
+ # The flight's service class.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :service_class
+ # Whether a stopover is allowed on this flight.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :stopover_allowed
+ sig {
+ params(arrival_airport_code: T.nilable(String), carrier: T.nilable(String), departure_airport_code: T.nilable(String), flight_number: T.nilable(String), service_class: T.nilable(String), stopover_allowed: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ arrival_airport_code: nil,
+ carrier: nil,
+ departure_airport_code: nil,
+ flight_number: nil,
+ service_class: nil,
+ stopover_allowed: nil
+ ); end
+ end
+ # The time that the flight departed.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :departure_at
+ # The name of the passenger.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :passenger_name
+ # Whether the ticket is refundable.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refundable
+ # The legs of the trip.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment]))
+ }
+ attr_accessor :segments
+ # The travel agency that issued the ticket.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :travel_agency
+ sig {
+ params(departure_at: T.nilable(Integer), passenger_name: T.nilable(String), refundable: T.nilable(T::Boolean), segments: T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment]), travel_agency: T.nilable(String)).void
+ }
+ def initialize(
+ departure_at: nil,
+ passenger_name: nil,
+ refundable: nil,
+ segments: nil,
+ travel_agency: nil
+ ); end
+ end
+ class Fuel < Stripe::RequestParams
+ # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :industry_product_code
+ # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity_decimal
+ # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit
+ # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :unit_cost_decimal
+ sig {
+ params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void
+ }
+ def initialize(
+ industry_product_code: nil,
+ quantity_decimal: nil,
+ type: nil,
+ unit: nil,
+ unit_cost_decimal: nil
+ ); end
+ end
+ class Lodging < Stripe::RequestParams
+ # The time of checking into the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :check_in_at
+ # The number of nights stayed at the lodging.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :nights
+ sig { params(check_in_at: T.nilable(Integer), nights: T.nilable(Integer)).void }
+ def initialize(check_in_at: nil, nights: nil); end
+ end
+ class Receipt < Stripe::RequestParams
+ # Attribute for param field description
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Attribute for param field quantity
+ sig { returns(T.nilable(String)) }
+ attr_accessor :quantity
+ # Attribute for param field total
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :total
+ # Attribute for param field unit_cost
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :unit_cost
+ sig {
+ params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void
+ }
+ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end
+ end
+ # Fleet-specific information for transactions using Fleet cards.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet))
+ }
+ attr_accessor :fleet
+ # Information about the flight that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight))
+ }
+ attr_accessor :flight
+ # Information about fuel that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fuel))
+ }
+ attr_accessor :fuel
+ # Information about lodging that was purchased with this transaction.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Lodging))
+ }
+ attr_accessor :lodging
+ # The line items in the purchase.
+ sig {
+ returns(T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Receipt]))
+ }
+ attr_accessor :receipt
+ # A merchant-specific order number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :reference
+ sig {
+ params(fleet: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet), flight: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight), fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fuel), lodging: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Lodging), receipt: T.nilable(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Receipt]), reference: T.nilable(String)).void
+ }
+ def initialize(
+ fleet: nil,
+ flight: nil,
+ fuel: nil,
+ lodging: nil,
+ receipt: nil,
+ reference: nil
+ ); end
+ end
+ # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # Card associated with this unlinked refund transaction.
+ sig { returns(String) }
+ attr_accessor :card
+ # The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::MerchantData))
+ }
+ attr_accessor :merchant_data
+ # Additional purchase information that is optionally provided by the merchant.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails))
+ }
+ attr_accessor :purchase_details
+ sig {
+ params(amount: Integer, card: String, currency: T.nilable(String), expand: T.nilable(T::Array[String]), merchant_data: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::MerchantData), purchase_details: T.nilable(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails)).void
+ }
+ def initialize(
+ amount: nil,
+ card: nil,
+ currency: nil,
+ expand: nil,
+ merchant_data: nil,
+ purchase_details: nil
+ ); end
+ end
+ # Allows the user to capture an arbitrary amount, also known as a forced capture.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction)
+ }
+ def create_force_capture(params = {}, opts = {}); end
+
+ # Allows the user to refund an arbitrary amount, also known as a unlinked refund.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction)
+ }
+ def create_unlinked_refund(params = {}, opts = {}); end
+
+ # Refund a test-mode Transaction.
+ sig {
+ params(transaction: String, params: T.any(::Stripe::TestHelpers::Issuing::TransactionService::RefundParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction)
+ }
+ def refund(transaction, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/issuing_service.rbi b/rbi/stripe/services/test_helpers/issuing_service.rbi
new file mode 100644
index 00000000..0353bbcc
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/issuing_service.rbi
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class IssuingService < StripeService
+ attr_reader :authorizations
+ attr_reader :cards
+ attr_reader :personalization_designs
+ attr_reader :transactions
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/refund_service.rbi b/rbi/stripe/services/test_helpers/refund_service.rbi
new file mode 100644
index 00000000..fcecbf84
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/refund_service.rbi
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class RefundService < StripeService
+ class ExpireParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Expire a refund with a status of requires_action.
+ sig {
+ params(refund: String, params: T.any(::Stripe::TestHelpers::RefundService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund)
+ }
+ def expire(refund, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/terminal/reader_service.rbi b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi
new file mode 100644
index 00000000..b13288bb
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi
@@ -0,0 +1,62 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Terminal
+ class ReaderService < StripeService
+ class PresentPaymentMethodParams < Stripe::RequestParams
+ class CardPresent < Stripe::RequestParams
+ # The card number, as a string without any separators.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ sig { params(number: T.nilable(String)).void }
+ def initialize(number: nil); end
+ end
+ class InteracPresent < Stripe::RequestParams
+ # Card Number
+ sig { returns(T.nilable(String)) }
+ attr_accessor :number
+ sig { params(number: T.nilable(String)).void }
+ def initialize(number: nil); end
+ end
+ # Simulated on-reader tip amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount_tip
+ # Simulated data for the card_present payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::CardPresent))
+ }
+ attr_accessor :card_present
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Simulated data for the interac_present payment method.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::InteracPresent))
+ }
+ attr_accessor :interac_present
+ # Simulated payment type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :type
+ sig {
+ params(amount_tip: T.nilable(Integer), card_present: T.nilable(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::CardPresent), expand: T.nilable(T::Array[String]), interac_present: T.nilable(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::InteracPresent), type: T.nilable(String)).void
+ }
+ def initialize(
+ amount_tip: nil,
+ card_present: nil,
+ expand: nil,
+ interac_present: nil,
+ type: nil
+ ); end
+ end
+ # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
+ sig {
+ params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
+ }
+ def present_payment_method(reader, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/terminal_service.rbi b/rbi/stripe/services/test_helpers/terminal_service.rbi
new file mode 100644
index 00000000..5315483c
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/terminal_service.rbi
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class TerminalService < StripeService
+ attr_reader :readers
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/test_clock_service.rbi b/rbi/stripe/services/test_helpers/test_clock_service.rbi
new file mode 100644
index 00000000..5933a920
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/test_clock_service.rbi
@@ -0,0 +1,92 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class TestClockService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The initial frozen time for this test clock.
+ sig { returns(Integer) }
+ attr_accessor :frozen_time
+ # The name for this test clock.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ sig {
+ params(expand: T.nilable(T::Array[String]), frozen_time: Integer, name: T.nilable(String)).void
+ }
+ def initialize(expand: nil, frozen_time: nil, name: nil); end
+ end
+ class AdvanceParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.
+ sig { returns(Integer) }
+ attr_accessor :frozen_time
+ sig { params(expand: T.nilable(T::Array[String]), frozen_time: Integer).void }
+ def initialize(expand: nil, frozen_time: nil); end
+ end
+ # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
+ sig {
+ params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClockService::AdvanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def advance(test_clock, params = {}, opts = {}); end
+
+ # Creates a new test clock that can be attached to new customers and quotes.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::TestClockService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Deletes a test clock.
+ sig {
+ params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClockService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def delete(test_clock, params = {}, opts = {}); end
+
+ # Returns a list of your test clocks.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::TestClockService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a test clock.
+ sig {
+ params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClockService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock)
+ }
+ def retrieve(test_clock, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi b/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi
new file mode 100644
index 00000000..bc516162
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi
@@ -0,0 +1,64 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Treasury
+ class InboundTransferService < StripeService
+ class FailParams < Stripe::RequestParams
+ class FailureDetails < Stripe::RequestParams
+ # Reason for the failure.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ sig { params(code: T.nilable(String)).void }
+ def initialize(code: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about a failed InboundTransfer.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::InboundTransferService::FailParams::FailureDetails))
+ }
+ attr_accessor :failure_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), failure_details: T.nilable(::Stripe::TestHelpers::Treasury::InboundTransferService::FailParams::FailureDetails)).void
+ }
+ def initialize(expand: nil, failure_details: nil); end
+ end
+ class ReturnInboundTransferParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class SucceedParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::InboundTransferService::FailParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def fail(id, params = {}, opts = {}); end
+
+ # Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::InboundTransferService::ReturnInboundTransferParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def return_inbound_transfer(id, params = {}, opts = {}); end
+
+ # Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::InboundTransferService::SucceedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def succeed(id, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi b/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi
new file mode 100644
index 00000000..07bb6620
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi
@@ -0,0 +1,125 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Treasury
+ class OutboundPaymentService < StripeService
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ sig { returns(String) }
+ attr_accessor :trace_id
+ sig { params(trace_id: String).void }
+ def initialize(trace_id: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :omad
+ sig {
+ params(chips: T.nilable(String), imad: T.nilable(String), omad: T.nilable(String)).void
+ }
+ def initialize(chips: nil, imad: nil, omad: nil); end
+ end
+ # ACH network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::Ach))
+ }
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ sig { returns(String) }
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::Ach), type: String, us_domestic_wire: T.nilable(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ sig {
+ returns(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails)
+ }
+ attr_accessor :tracking_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), tracking_details: ::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails).void
+ }
+ def initialize(expand: nil, tracking_details: nil); end
+ end
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReturnOutboundPaymentParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # The return code to be set on the OutboundPayment object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ sig { params(code: T.nilable(String)).void }
+ def initialize(code: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Optional hash to set the return code.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::OutboundPaymentService::ReturnOutboundPaymentParams::ReturnedDetails))
+ }
+ attr_accessor :returned_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), returned_details: T.nilable(::Stripe::TestHelpers::Treasury::OutboundPaymentService::ReturnOutboundPaymentParams::ReturnedDetails)).void
+ }
+ def initialize(expand: nil, returned_details: nil); end
+ end
+ # Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::FailParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def fail(id, params = {}, opts = {}); end
+
+ # Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::PostParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def post(id, params = {}, opts = {}); end
+
+ # Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::ReturnOutboundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def return_outbound_payment(id, params = {}, opts = {}); end
+
+ # Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ sig {
+ params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def update(id, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi b/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi
new file mode 100644
index 00000000..02ad1277
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi
@@ -0,0 +1,125 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Treasury
+ class OutboundTransferService < StripeService
+ class UpdateParams < Stripe::RequestParams
+ class TrackingDetails < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # ACH trace ID for funds sent over the `ach` network.
+ sig { returns(String) }
+ attr_accessor :trace_id
+ sig { params(trace_id: String).void }
+ def initialize(trace_id: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :chips
+ # IMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :imad
+ # OMAD for funds sent over the `us_domestic_wire` network.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :omad
+ sig {
+ params(chips: T.nilable(String), imad: T.nilable(String), omad: T.nilable(String)).void
+ }
+ def initialize(chips: nil, imad: nil, omad: nil); end
+ end
+ # ACH network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::Ach))
+ }
+ attr_accessor :ach
+ # The US bank account network used to send funds.
+ sig { returns(String) }
+ attr_accessor :type
+ # US domestic wire network tracking details.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::Ach), type: String, us_domestic_wire: T.nilable(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, type: nil, us_domestic_wire: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about network-specific tracking information.
+ sig {
+ returns(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails)
+ }
+ attr_accessor :tracking_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), tracking_details: ::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails).void
+ }
+ def initialize(expand: nil, tracking_details: nil); end
+ end
+ class FailParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class PostParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class ReturnOutboundTransferParams < Stripe::RequestParams
+ class ReturnedDetails < Stripe::RequestParams
+ # Reason for the return.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :code
+ sig { params(code: T.nilable(String)).void }
+ def initialize(code: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Details about a returned OutboundTransfer.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::OutboundTransferService::ReturnOutboundTransferParams::ReturnedDetails))
+ }
+ attr_accessor :returned_details
+ sig {
+ params(expand: T.nilable(T::Array[String]), returned_details: T.nilable(::Stripe::TestHelpers::Treasury::OutboundTransferService::ReturnOutboundTransferParams::ReturnedDetails)).void
+ }
+ def initialize(expand: nil, returned_details: nil); end
+ end
+ # Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::FailParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def fail(outbound_transfer, params = {}, opts = {}); end
+
+ # Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::PostParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def post(outbound_transfer, params = {}, opts = {}); end
+
+ # Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::ReturnOutboundTransferParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def return_outbound_transfer(outbound_transfer, params = {}, opts = {}); end
+
+ # Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def update(outbound_transfer, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi b/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi
new file mode 100644
index 00000000..8a1b325b
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi
@@ -0,0 +1,87 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Treasury
+ class ReceivedCreditService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # The bank account's routing number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ routing_number: nil
+ ); end
+ end
+ # The source type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(type: String, us_bank_account: T.nilable(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount)).void
+ }
+ def initialize(type: nil, us_bank_account: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails))
+ }
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_accessor :network
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, initiating_payment_method_details: T.nilable(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails), network: String).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ ); end
+ end
+ # Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedCredit)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi b/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi
new file mode 100644
index 00000000..e304e107
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi
@@ -0,0 +1,87 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ module Treasury
+ class ReceivedDebitService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class InitiatingPaymentMethodDetails < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # The bank account holder's name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The bank account number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # The bank account's routing number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_name: T.nilable(String), account_number: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_number: nil,
+ routing_number: nil
+ ); end
+ end
+ # The source type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(type: String, us_bank_account: T.nilable(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount)).void
+ }
+ def initialize(type: nil, us_bank_account: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # Initiating payment method details for the object.
+ sig {
+ returns(T.nilable(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails))
+ }
+ attr_accessor :initiating_payment_method_details
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(String) }
+ attr_accessor :network
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, initiating_payment_method_details: T.nilable(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails), network: String).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ initiating_payment_method_details: nil,
+ network: nil
+ ); end
+ end
+ # Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
+ sig {
+ params(params: T.any(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedDebit)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers/treasury_service.rbi b/rbi/stripe/services/test_helpers/treasury_service.rbi
new file mode 100644
index 00000000..7e303663
--- /dev/null
+++ b/rbi/stripe/services/test_helpers/treasury_service.rbi
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module TestHelpers
+ class TreasuryService < StripeService
+ attr_reader :inbound_transfers
+ attr_reader :outbound_payments
+ attr_reader :outbound_transfers
+ attr_reader :received_credits
+ attr_reader :received_debits
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/test_helpers_service.rbi b/rbi/stripe/services/test_helpers_service.rbi
new file mode 100644
index 00000000..5c11f782
--- /dev/null
+++ b/rbi/stripe/services/test_helpers_service.rbi
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TestHelpersService < StripeService
+ attr_reader :confirmation_tokens
+ attr_reader :customers
+ attr_reader :issuing
+ attr_reader :refunds
+ attr_reader :terminal
+ attr_reader :test_clocks
+ attr_reader :treasury
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/token_service.rbi b/rbi/stripe/services/token_service.rbi
new file mode 100644
index 00000000..d6fbd90b
--- /dev/null
+++ b/rbi/stripe/services/token_service.rbi
@@ -0,0 +1,1189 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TokenService < StripeService
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ class Company < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class DirectorshipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the directorship declaration attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the directorship declaration attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class OwnershipDeclaration < Stripe::RequestParams
+ # The Unix timestamp marking when the beneficial owner attestation was made.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the beneficial owner attestation was made.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(String)).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ class Verification < Stripe::RequestParams
+ class Document < Stripe::RequestParams
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document verifying the business.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(document: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::Verification::Document)).void
+ }
+ def initialize(document: nil); end
+ end
+ # The company's primary address.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::Address))
+ }
+ attr_accessor :address
+ # The Kana variation of the company's primary address (Japan only).
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::AddressKana))
+ }
+ attr_accessor :address_kana
+ # The Kanji variation of the company's primary address (Japan only).
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::AddressKanji))
+ }
+ attr_accessor :address_kanji
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :directors_provided
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::DirectorshipDeclaration))
+ }
+ attr_accessor :directorship_declaration
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executives_provided
+ # The export license ID number of the company, also referred as Import Export Code (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_license_id
+ # The purpose code to use for export transactions (India only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :export_purpose_code
+ # The company's legal name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # The Kana variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kana
+ # The Kanji variation of the company's legal name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name_kanji
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owners_provided
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::OwnershipDeclaration))
+ }
+ attr_accessor :ownership_declaration
+ # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :ownership_declaration_shown_and_signed
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :ownership_exemption_reason
+ # The company's phone number (used for verification).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :registration_number
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
+ sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
+ attr_accessor :structure
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :tax_id_registrar
+ # The VAT number of the company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :vat_id
+ # Information on the verification state of the company.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::Address), address_kana: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::AddressKana), address_kanji: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::OwnershipDeclaration), ownership_declaration_shown_and_signed: T.nilable(T::Boolean), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::TokenService::CreateParams::Account::Company::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ directors_provided: nil,
+ directorship_declaration: nil,
+ executives_provided: nil,
+ export_license_id: nil,
+ export_purpose_code: nil,
+ name: nil,
+ name_kana: nil,
+ name_kanji: nil,
+ owners_provided: nil,
+ ownership_declaration: nil,
+ ownership_declaration_shown_and_signed: nil,
+ ownership_exemption_reason: nil,
+ phone: nil,
+ registration_number: nil,
+ structure: nil,
+ tax_id: nil,
+ tax_id_registrar: nil,
+ vat_id: nil,
+ verification: nil
+ ); end
+ end
+ class Individual < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), title: T.nilable(String)).void
+ }
+ def initialize(
+ director: nil,
+ executive: nil,
+ owner: nil,
+ percent_ownership: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Verification::AdditionalDocument), document: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # The individual's primary address.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Address))
+ }
+ attr_accessor :address
+ # The Kana variation of the individual's primary address (Japan only).
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::AddressKana))
+ }
+ attr_accessor :address_kana
+ # The Kanji variation of the individual's primary address (Japan only).
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::AddressKanji))
+ }
+ attr_accessor :address_kanji
+ # The individual's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::TokenService::CreateParams::Account::Individual::Dob))))
+ }
+ attr_accessor :dob
+ # The individual's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The individual's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the individual's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the individual is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The individual's gender
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The individual's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the individual's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The individual's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The individual's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The individual's registered address.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::RegisteredAddress))
+ }
+ attr_accessor :registered_address
+ # Describes the person’s relationship to the account.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Relationship))
+ }
+ attr_accessor :relationship
+ # The last four digits of the individual's Social Security Number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The individual's verification document information.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Verification))
+ }
+ attr_accessor :verification
+ sig {
+ params(address: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Address), address_kana: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::AddressKana), address_kanji: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::TokenService::CreateParams::Account::Individual::Dob))), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::RegisteredAddress), relationship: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Verification)).void
+ }
+ def initialize(
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ # The business type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :business_type
+ # Information about the company or business.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Company)) }
+ attr_accessor :company
+ # Information about the person represented by the account.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual)) }
+ attr_accessor :individual
+ # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :tos_shown_and_accepted
+ sig {
+ params(business_type: T.nilable(String), company: T.nilable(::Stripe::TokenService::CreateParams::Account::Company), individual: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual), tos_shown_and_accepted: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ business_type: nil,
+ company: nil,
+ individual: nil,
+ tos_shown_and_accepted: nil
+ ); end
+ end
+ class BankAccount < Stripe::RequestParams
+ # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_name
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # The account number for the bank account, in string form. Must be a checking account.
+ sig { returns(String) }
+ attr_accessor :account_number
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The country in which the bank account is located.
+ sig { returns(String) }
+ attr_accessor :country
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts)
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_name: T.nilable(String), account_holder_type: T.nilable(String), account_number: String, account_type: T.nilable(String), country: String, currency: T.nilable(String), payment_method: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_name: nil,
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ country: nil,
+ currency: nil,
+ payment_method: nil,
+ routing_number: nil
+ ); end
+ end
+ class Card < Stripe::RequestParams
+ class Networks < Stripe::RequestParams
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :preferred
+ sig { params(preferred: T.nilable(String)).void }
+ def initialize(preferred: nil); end
+ end
+ # City / District / Suburb / Town / Village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_city
+ # Billing address country, if provided.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_country
+ # Address line 1 (Street address / PO Box / Company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line1
+ # Address line 2 (Apartment / Suite / Unit / Building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_line2
+ # State / County / Province / Region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_state
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :address_zip
+ # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :currency
+ # Card security code. Highly recommended to always include this value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :cvc
+ # Two-digit number representing the card's expiration month.
+ sig { returns(String) }
+ attr_accessor :exp_month
+ # Two- or four-digit number representing the card's expiration year.
+ sig { returns(String) }
+ attr_accessor :exp_year
+ # Cardholder's full name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Contains information about card networks used to process the payment.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Card::Networks)) }
+ attr_accessor :networks
+ # The card number, as a string without any separators.
+ sig { returns(String) }
+ attr_accessor :number
+ sig {
+ params(address_city: T.nilable(String), address_country: T.nilable(String), address_line1: T.nilable(String), address_line2: T.nilable(String), address_state: T.nilable(String), address_zip: T.nilable(String), currency: T.nilable(String), cvc: T.nilable(String), exp_month: String, exp_year: String, name: T.nilable(String), networks: T.nilable(::Stripe::TokenService::CreateParams::Card::Networks), number: String).void
+ }
+ def initialize(
+ address_city: nil,
+ address_country: nil,
+ address_line1: nil,
+ address_line2: nil,
+ address_state: nil,
+ address_zip: nil,
+ currency: nil,
+ cvc: nil,
+ exp_month: nil,
+ exp_year: nil,
+ name: nil,
+ networks: nil,
+ number: nil
+ ); end
+ end
+ class CvcUpdate < Stripe::RequestParams
+ # The CVC value, in string form.
+ sig { returns(String) }
+ attr_accessor :cvc
+ sig { params(cvc: String).void }
+ def initialize(cvc: nil); end
+ end
+ class Person < Stripe::RequestParams
+ class AdditionalTosAcceptances < Stripe::RequestParams
+ class Account < Stripe::RequestParams
+ # The Unix timestamp marking when the account representative accepted the service agreement.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :date
+ # The IP address from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip
+ # The user agent of the browser from which the account representative accepted the service agreement.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :user_agent
+ sig {
+ params(date: T.nilable(Integer), ip: T.nilable(String), user_agent: T.nilable(T.nilable(String))).void
+ }
+ def initialize(date: nil, ip: nil, user_agent: nil); end
+ end
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances::Account))
+ }
+ attr_accessor :account
+ sig {
+ params(account: T.nilable(::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances::Account)).void
+ }
+ def initialize(account: nil); end
+ end
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class AddressKana < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class AddressKanji < Stripe::RequestParams
+ # City or ward.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Block or building number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Building details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # Postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # Prefecture.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ # Town or cho-me.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :town
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String), town: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil,
+ town: nil
+ ); end
+ end
+ class Dob < Stripe::RequestParams
+ # The day of birth, between 1 and 31.
+ sig { returns(Integer) }
+ attr_accessor :day
+ # The month of birth, between 1 and 12.
+ sig { returns(Integer) }
+ attr_accessor :month
+ # The four-digit year of birth.
+ sig { returns(Integer) }
+ attr_accessor :year
+ sig { params(day: Integer, month: Integer, year: Integer).void }
+ def initialize(day: nil, month: nil, year: nil); end
+ end
+ class Documents < Stripe::RequestParams
+ class CompanyAuthorization < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Passport < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ class Visa < Stripe::RequestParams
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :files
+ sig { params(files: T.nilable(T::Array[String])).void }
+ def initialize(files: nil); end
+ end
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Documents::CompanyAuthorization))
+ }
+ attr_accessor :company_authorization
+ # One or more documents showing the person's passport page with photo and personal data.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Documents::Passport))
+ }
+ attr_accessor :passport
+ # One or more documents showing the person's visa required for living in the country where they are residing.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Documents::Visa)) }
+ attr_accessor :visa
+ sig {
+ params(company_authorization: T.nilable(::Stripe::TokenService::CreateParams::Person::Documents::CompanyAuthorization), passport: T.nilable(::Stripe::TokenService::CreateParams::Person::Documents::Passport), visa: T.nilable(::Stripe::TokenService::CreateParams::Person::Documents::Visa)).void
+ }
+ def initialize(company_authorization: nil, passport: nil, visa: nil); end
+ end
+ class RegisteredAddress < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ class Relationship < Stripe::RequestParams
+ # Whether the person is the authorizer of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :authorizer
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :director
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :executive
+ # Whether the person is the legal guardian of the account's representative.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :legal_guardian
+ # Whether the person is an owner of the account’s legal entity.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :owner
+ # The percent owned by the person of the account's legal entity.
+ sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
+ attr_accessor :percent_ownership
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :representative
+ # The person's title (e.g., CEO, Support Engineer).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :title
+ sig {
+ params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(T.nilable(T.any(String, Float))), representative: T.nilable(T::Boolean), title: T.nilable(String)).void
+ }
+ def initialize(
+ authorizer: nil,
+ director: nil,
+ executive: nil,
+ legal_guardian: nil,
+ owner: nil,
+ percent_ownership: nil,
+ representative: nil,
+ title: nil
+ ); end
+ end
+ class Verification < Stripe::RequestParams
+ class AdditionalDocument < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ class Document < Stripe::RequestParams
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :back
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :front
+ sig { params(back: T.nilable(String), front: T.nilable(String)).void }
+ def initialize(back: nil, front: nil); end
+ end
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Verification::AdditionalDocument))
+ }
+ attr_accessor :additional_document
+ # An identifying document, either a passport or local ID card.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Verification::Document))
+ }
+ attr_accessor :document
+ sig {
+ params(additional_document: T.nilable(::Stripe::TokenService::CreateParams::Person::Verification::AdditionalDocument), document: T.nilable(::Stripe::TokenService::CreateParams::Person::Verification::Document)).void
+ }
+ def initialize(additional_document: nil, document: nil); end
+ end
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ sig {
+ returns(T.nilable(::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances))
+ }
+ attr_accessor :additional_tos_acceptances
+ # The person's address.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Address)) }
+ attr_accessor :address
+ # The Kana variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::AddressKana)) }
+ attr_accessor :address_kana
+ # The Kanji variation of the person's address (Japan only).
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::AddressKanji)) }
+ attr_accessor :address_kanji
+ # The person's date of birth.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::TokenService::CreateParams::Person::Dob))))
+ }
+ attr_accessor :dob
+ # Documents that may be submitted to satisfy various informational requests.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Documents)) }
+ attr_accessor :documents
+ # The person's email address.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :email
+ # The person's first name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name
+ # The Kana variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kana
+ # The Kanji variation of the person's first name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :first_name_kanji
+ # A list of alternate names or aliases that the person is known by.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
+ attr_accessor :full_name_aliases
+ # The person's gender (International regulations require either "male" or "female").
+ sig { returns(T.nilable(String)) }
+ attr_accessor :gender
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number_secondary
+ # The person's last name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name
+ # The Kana variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kana
+ # The Kanji variation of the person's last name (Japan only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :last_name_kanji
+ # The person's maiden name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :maiden_name
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :nationality
+ # The person's phone number.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :phone
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :political_exposure
+ # The person's registered address.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::RegisteredAddress)) }
+ attr_accessor :registered_address
+ # The relationship that this person has with the account's legal entity.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Relationship)) }
+ attr_accessor :relationship
+ # The last four digits of the person's Social Security number (U.S. only).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ssn_last_4
+ # The person's verification status.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Verification)) }
+ attr_accessor :verification
+ sig {
+ params(additional_tos_acceptances: T.nilable(::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances), address: T.nilable(::Stripe::TokenService::CreateParams::Person::Address), address_kana: T.nilable(::Stripe::TokenService::CreateParams::Person::AddressKana), address_kanji: T.nilable(::Stripe::TokenService::CreateParams::Person::AddressKanji), dob: T.nilable(T.nilable(T.any(String, ::Stripe::TokenService::CreateParams::Person::Dob))), documents: T.nilable(::Stripe::TokenService::CreateParams::Person::Documents), email: T.nilable(String), first_name: T.nilable(String), first_name_kana: T.nilable(String), first_name_kanji: T.nilable(String), full_name_aliases: T.nilable(T.nilable(T.any(String, T::Array[String]))), gender: T.nilable(String), id_number: T.nilable(String), id_number_secondary: T.nilable(String), last_name: T.nilable(String), last_name_kana: T.nilable(String), last_name_kanji: T.nilable(String), maiden_name: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), nationality: T.nilable(String), phone: T.nilable(String), political_exposure: T.nilable(String), registered_address: T.nilable(::Stripe::TokenService::CreateParams::Person::RegisteredAddress), relationship: T.nilable(::Stripe::TokenService::CreateParams::Person::Relationship), ssn_last_4: T.nilable(String), verification: T.nilable(::Stripe::TokenService::CreateParams::Person::Verification)).void
+ }
+ def initialize(
+ additional_tos_acceptances: nil,
+ address: nil,
+ address_kana: nil,
+ address_kanji: nil,
+ dob: nil,
+ documents: nil,
+ email: nil,
+ first_name: nil,
+ first_name_kana: nil,
+ first_name_kanji: nil,
+ full_name_aliases: nil,
+ gender: nil,
+ id_number: nil,
+ id_number_secondary: nil,
+ last_name: nil,
+ last_name_kana: nil,
+ last_name_kanji: nil,
+ maiden_name: nil,
+ metadata: nil,
+ nationality: nil,
+ phone: nil,
+ political_exposure: nil,
+ registered_address: nil,
+ relationship: nil,
+ ssn_last_4: nil,
+ verification: nil
+ ); end
+ end
+ class Pii < Stripe::RequestParams
+ # The `id_number` for the PII, in string form.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :id_number
+ sig { params(id_number: T.nilable(String)).void }
+ def initialize(id_number: nil); end
+ end
+ # Information for the account this token represents.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Account)) }
+ attr_accessor :account
+ # The bank account this token will represent.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::BankAccount)) }
+ attr_accessor :bank_account
+ # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
+ sig { returns(T.nilable(T.any(::Stripe::TokenService::CreateParams::Card, String))) }
+ attr_accessor :card
+ # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # The updated CVC value this token represents.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::CvcUpdate)) }
+ attr_accessor :cvc_update
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Information for the person this token represents.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person)) }
+ attr_accessor :person
+ # The PII this token represents.
+ sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Pii)) }
+ attr_accessor :pii
+ sig {
+ params(account: T.nilable(::Stripe::TokenService::CreateParams::Account), bank_account: T.nilable(::Stripe::TokenService::CreateParams::BankAccount), card: T.nilable(T.any(::Stripe::TokenService::CreateParams::Card, String)), customer: T.nilable(String), cvc_update: T.nilable(::Stripe::TokenService::CreateParams::CvcUpdate), expand: T.nilable(T::Array[String]), person: T.nilable(::Stripe::TokenService::CreateParams::Person), pii: T.nilable(::Stripe::TokenService::CreateParams::Pii)).void
+ }
+ def initialize(
+ account: nil,
+ bank_account: nil,
+ card: nil,
+ customer: nil,
+ cvc_update: nil,
+ expand: nil,
+ person: nil,
+ pii: nil
+ ); end
+ end
+ # Creates a single-use token that represents a bank account's details.
+ # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
+ sig {
+ params(params: T.any(::Stripe::TokenService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Token)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Retrieves the token with the given ID.
+ sig {
+ params(token: String, params: T.any(::Stripe::TokenService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Token)
+ }
+ def retrieve(token, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/topup_service.rbi b/rbi/stripe/services/topup_service.rbi
new file mode 100644
index 00000000..abc54834
--- /dev/null
+++ b/rbi/stripe/services/topup_service.rbi
@@ -0,0 +1,176 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TopupService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Amount < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # A positive integer representing how much to transfer.
+ sig { returns(T.nilable(T.any(::Stripe::TopupService::ListParams::Amount, Integer))) }
+ attr_accessor :amount
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
+ sig { returns(T.nilable(T.any(::Stripe::TopupService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(amount: T.nilable(T.any(::Stripe::TopupService::ListParams::Amount, Integer)), created: T.nilable(T.any(::Stripe::TopupService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer representing how much to transfer.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source
+ # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ # A string that identifies this top-up as part of a group.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), source: T.nilable(String), statement_descriptor: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ source: nil,
+ statement_descriptor: nil,
+ transfer_group: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(description: nil, expand: nil, metadata: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels a top-up. Only pending top-ups can be canceled.
+ sig {
+ params(topup: String, params: T.any(::Stripe::TopupService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def cancel(topup, params = {}, opts = {}); end
+
+ # Top up the balance of an account
+ sig {
+ params(params: T.any(::Stripe::TopupService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of top-ups.
+ sig {
+ params(params: T.any(::Stripe::TopupService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.
+ sig {
+ params(topup: String, params: T.any(::Stripe::TopupService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def retrieve(topup, params = {}, opts = {}); end
+
+ # Updates the metadata of a top-up. Other top-up details are not editable by design.
+ sig {
+ params(topup: String, params: T.any(::Stripe::TopupService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup)
+ }
+ def update(topup, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/transfer_reversal_service.rbi b/rbi/stripe/services/transfer_reversal_service.rbi
new file mode 100644
index 00000000..aedb3826
--- /dev/null
+++ b/rbi/stripe/services/transfer_reversal_service.rbi
@@ -0,0 +1,101 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TransferReversalService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :refund_application_fee
+ sig {
+ params(amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), refund_application_fee: T.nilable(T::Boolean)).void
+ }
+ def initialize(
+ amount: nil,
+ description: nil,
+ expand: nil,
+ metadata: nil,
+ refund_application_fee: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(expand: nil, metadata: nil); end
+ end
+ # When you create a new reversal, you must specify a transfer to create it on.
+ #
+ # When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.
+ #
+ # Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.
+ sig {
+ params(id: String, params: T.any(::Stripe::TransferReversalService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reversal)
+ }
+ def create(id, params = {}, opts = {}); end
+
+ # You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.
+ sig {
+ params(id: String, params: T.any(::Stripe::TransferReversalService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(id, params = {}, opts = {}); end
+
+ # By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.
+ sig {
+ params(transfer: String, id: String, params: T.any(::Stripe::TransferReversalService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reversal)
+ }
+ def retrieve(transfer, id, params = {}, opts = {}); end
+
+ # Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ #
+ # This request only accepts metadata and description as arguments.
+ sig {
+ params(transfer: String, id: String, params: T.any(::Stripe::TransferReversalService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reversal)
+ }
+ def update(transfer, id, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/transfer_service.rbi b/rbi/stripe/services/transfer_service.rbi
new file mode 100644
index 00000000..635feb56
--- /dev/null
+++ b/rbi/stripe/services/transfer_service.rbi
@@ -0,0 +1,152 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TransferService < StripeService
+ attr_reader :reversals
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return transfers that were created during the given date interval.
+ sig { returns(T.nilable(T.any(::Stripe::TransferService::ListParams::Created, Integer))) }
+ attr_accessor :created
+ # Only return transfers for the destination specified by this account ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return transfers with the specified transfer group.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(created: T.nilable(T.any(::Stripe::TransferService::ListParams::Created, Integer)), destination: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ destination: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil,
+ transfer_group: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # A positive integer in cents (or local equivalent) representing how much to transfer.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :amount
+ # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The ID of a connected Stripe account. See the Connect documentation for details.
+ sig { returns(String) }
+ attr_accessor :destination
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source_transaction
+ # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :source_type
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transfer_group
+ sig {
+ params(amount: T.nilable(Integer), currency: String, description: T.nilable(String), destination: String, expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), source_transaction: T.nilable(String), source_type: T.nilable(String), transfer_group: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination: nil,
+ expand: nil,
+ metadata: nil,
+ source_transaction: nil,
+ source_type: nil,
+ transfer_group: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ sig {
+ params(description: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
+ }
+ def initialize(description: nil, expand: nil, metadata: nil); end
+ end
+ # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
+ sig {
+ params(params: T.any(::Stripe::TransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
+ sig {
+ params(params: T.any(::Stripe::TransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.
+ sig {
+ params(transfer: String, params: T.any(::Stripe::TransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer)
+ }
+ def retrieve(transfer, params = {}, opts = {}); end
+
+ # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+ #
+ # This request accepts only metadata as an argument.
+ sig {
+ params(transfer: String, params: T.any(::Stripe::TransferService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer)
+ }
+ def update(transfer, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/credit_reversal_service.rbi b/rbi/stripe/services/treasury/credit_reversal_service.rbi
new file mode 100644
index 00000000..bd866101
--- /dev/null
+++ b/rbi/stripe/services/treasury/credit_reversal_service.rbi
@@ -0,0 +1,84 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class CreditReversalService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return CreditReversals for the ReceivedCredit ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :received_credit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return CreditReversals for a given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), received_credit: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_credit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The ReceivedCredit to reverse.
+ sig { returns(String) }
+ attr_accessor :received_credit
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), received_credit: String).void
+ }
+ def initialize(expand: nil, metadata: nil, received_credit: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Reverses a ReceivedCredit and creates a CreditReversal object.
+ sig {
+ params(params: T.any(::Stripe::Treasury::CreditReversalService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::CreditReversal)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of CreditReversals.
+ sig {
+ params(params: T.any(::Stripe::Treasury::CreditReversalService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list
+ sig {
+ params(credit_reversal: String, params: T.any(::Stripe::Treasury::CreditReversalService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::CreditReversal)
+ }
+ def retrieve(credit_reversal, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/debit_reversal_service.rbi b/rbi/stripe/services/treasury/debit_reversal_service.rbi
new file mode 100644
index 00000000..66e6d67d
--- /dev/null
+++ b/rbi/stripe/services/treasury/debit_reversal_service.rbi
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class DebitReversalService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return DebitReversals for the ReceivedDebit ID.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :received_debit
+ # Only return DebitReversals for a given resolution.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :resolution
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return DebitReversals for a given status.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), received_debit: T.nilable(String), resolution: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ received_debit: nil,
+ resolution: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The ReceivedDebit to reverse.
+ sig { returns(String) }
+ attr_accessor :received_debit
+ sig {
+ params(expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), received_debit: String).void
+ }
+ def initialize(expand: nil, metadata: nil, received_debit: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Reverses a ReceivedDebit and creates a DebitReversal object.
+ sig {
+ params(params: T.any(::Stripe::Treasury::DebitReversalService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::DebitReversal)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of DebitReversals.
+ sig {
+ params(params: T.any(::Stripe::Treasury::DebitReversalService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a DebitReversal object.
+ sig {
+ params(debit_reversal: String, params: T.any(::Stripe::Treasury::DebitReversalService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::DebitReversal)
+ }
+ def retrieve(debit_reversal, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/financial_account_features_service.rbi b/rbi/stripe/services/treasury/financial_account_features_service.rbi
new file mode 100644
index 00000000..bb691106
--- /dev/null
+++ b/rbi/stripe/services/treasury/financial_account_features_service.rbi
@@ -0,0 +1,198 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class FinancialAccountFeaturesService < StripeService
+ class UpdateParams < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses::Aba))
+ }
+ attr_accessor :aba
+ sig {
+ params(aba: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses::Aba)).void
+ }
+ def initialize(aba: nil); end
+ end
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers::Ach)).void
+ }
+ def initialize(ach: nil); end
+ end
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::DepositInsurance))
+ }
+ attr_accessor :deposit_insurance
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses))
+ }
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers))
+ }
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::IntraStripeFlows))
+ }
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments))
+ }
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers))
+ }
+ attr_accessor :outbound_transfers
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::CardIssuing), deposit_insurance: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::DepositInsurance), expand: T.nilable(T::Array[String]), financial_addresses: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses), inbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers), intra_stripe_flows: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::IntraStripeFlows), outbound_payments: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments), outbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ expand: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieves Features information associated with the FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountFeaturesService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures)
+ }
+ def retrieve(financial_account, params = {}, opts = {}); end
+
+ # Updates the Features associated with a FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures)
+ }
+ def update(financial_account, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/financial_account_service.rbi b/rbi/stripe/services/treasury/financial_account_service.rbi
new file mode 100644
index 00000000..5152b7e0
--- /dev/null
+++ b/rbi/stripe/services/treasury/financial_account_service.rbi
@@ -0,0 +1,562 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class FinancialAccountService < StripeService
+ attr_reader :features
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return FinancialAccounts that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::FinancialAccountService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # An object ID cursor for use in pagination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit ranging from 1 to 100 (defaults to 10).
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # An object ID cursor for use in pagination.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccountService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ limit: nil,
+ starting_after: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses::Aba))
+ }
+ attr_accessor :aba
+ sig {
+ params(aba: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses::Aba)).void
+ }
+ def initialize(aba: nil); end
+ end
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers::Ach)).void
+ }
+ def initialize(ach: nil); end
+ end
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::DepositInsurance))
+ }
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses))
+ }
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers))
+ }
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::IntraStripeFlows))
+ }
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments))
+ }
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers))
+ }
+ attr_accessor :outbound_transfers
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::CardIssuing), deposit_insurance: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::DepositInsurance), financial_addresses: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses), inbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers), intra_stripe_flows: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::IntraStripeFlows), outbound_payments: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments), outbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ ); end
+ end
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :outbound_flows
+ sig { params(inbound_flows: T.nilable(String), outbound_flows: T.nilable(String)).void }
+ def initialize(inbound_flows: nil, outbound_flows: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features))
+ }
+ attr_accessor :features
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::PlatformRestrictions))
+ }
+ attr_accessor :platform_restrictions
+ # The currencies the FinancialAccount can hold a balance in.
+ sig { returns(T::Array[String]) }
+ attr_accessor :supported_currencies
+ sig {
+ params(expand: T.nilable(T::Array[String]), features: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::Features), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(T.nilable(String)), platform_restrictions: T.nilable(::Stripe::Treasury::FinancialAccountService::CreateParams::PlatformRestrictions), supported_currencies: T::Array[String]).void
+ }
+ def initialize(
+ expand: nil,
+ features: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil,
+ supported_currencies: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class Features < Stripe::RequestParams
+ class CardIssuing < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class DepositInsurance < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class FinancialAddresses < Stripe::RequestParams
+ class Aba < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Adds an ABA FinancialAddress to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses::Aba))
+ }
+ attr_accessor :aba
+ sig {
+ params(aba: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses::Aba)).void
+ }
+ def initialize(aba: nil); end
+ end
+ class InboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH Debits via the InboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers::Ach)).void
+ }
+ def initialize(ach: nil); end
+ end
+ class IntraStripeFlows < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class OutboundPayments < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundPayments API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ class OutboundTransfers < Stripe::RequestParams
+ class Ach < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ class UsDomesticWire < Stripe::RequestParams
+ # Whether the FinancialAccount should have the Feature.
+ sig { returns(T::Boolean) }
+ attr_accessor :requested
+ sig { params(requested: T::Boolean).void }
+ def initialize(requested: nil); end
+ end
+ # Enables ACH transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::Ach))
+ }
+ attr_accessor :ach
+ # Enables US domestic wire transfers via the OutboundTransfers API.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::UsDomesticWire))
+ }
+ attr_accessor :us_domestic_wire
+ sig {
+ params(ach: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::Ach), us_domestic_wire: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::UsDomesticWire)).void
+ }
+ def initialize(ach: nil, us_domestic_wire: nil); end
+ end
+ # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::CardIssuing))
+ }
+ attr_accessor :card_issuing
+ # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::DepositInsurance))
+ }
+ attr_accessor :deposit_insurance
+ # Contains Features that add FinancialAddresses to the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses))
+ }
+ attr_accessor :financial_addresses
+ # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers))
+ }
+ attr_accessor :inbound_transfers
+ # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::IntraStripeFlows))
+ }
+ attr_accessor :intra_stripe_flows
+ # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments))
+ }
+ attr_accessor :outbound_payments
+ # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers))
+ }
+ attr_accessor :outbound_transfers
+ sig {
+ params(card_issuing: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::CardIssuing), deposit_insurance: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::DepositInsurance), financial_addresses: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses), inbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers), intra_stripe_flows: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::IntraStripeFlows), outbound_payments: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments), outbound_transfers: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers)).void
+ }
+ def initialize(
+ card_issuing: nil,
+ deposit_insurance: nil,
+ financial_addresses: nil,
+ inbound_transfers: nil,
+ intra_stripe_flows: nil,
+ outbound_payments: nil,
+ outbound_transfers: nil
+ ); end
+ end
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(financial_account: T.nilable(String), payment_method: T.nilable(String), type: String).void
+ }
+ def initialize(financial_account: nil, payment_method: nil, type: nil); end
+ end
+ class PlatformRestrictions < Stripe::RequestParams
+ # Restricts all inbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :inbound_flows
+ # Restricts all outbound money movement.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :outbound_flows
+ sig { params(inbound_flows: T.nilable(String), outbound_flows: T.nilable(String)).void }
+ def initialize(inbound_flows: nil, outbound_flows: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features))
+ }
+ attr_accessor :features
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::ForwardingSettings))
+ }
+ attr_accessor :forwarding_settings
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The nickname for the FinancialAccount.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :nickname
+ # The set of functionalities that the platform can restrict on the FinancialAccount.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::PlatformRestrictions))
+ }
+ attr_accessor :platform_restrictions
+ sig {
+ params(expand: T.nilable(T::Array[String]), features: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features), forwarding_settings: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::ForwardingSettings), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(T.nilable(String)), platform_restrictions: T.nilable(::Stripe::Treasury::FinancialAccountService::UpdateParams::PlatformRestrictions)).void
+ }
+ def initialize(
+ expand: nil,
+ features: nil,
+ forwarding_settings: nil,
+ metadata: nil,
+ nickname: nil,
+ platform_restrictions: nil
+ ); end
+ end
+ class CloseParams < Stripe::RequestParams
+ class ForwardingSettings < Stripe::RequestParams
+ # The financial_account id
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # The payment_method or bank account id. This needs to be a verified bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :payment_method
+ # The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(financial_account: T.nilable(String), payment_method: T.nilable(String), type: String).void
+ }
+ def initialize(financial_account: nil, payment_method: nil, type: nil); end
+ end
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ sig {
+ returns(T.nilable(::Stripe::Treasury::FinancialAccountService::CloseParams::ForwardingSettings))
+ }
+ attr_accessor :forwarding_settings
+ sig {
+ params(expand: T.nilable(T::Array[String]), forwarding_settings: T.nilable(::Stripe::Treasury::FinancialAccountService::CloseParams::ForwardingSettings)).void
+ }
+ def initialize(expand: nil, forwarding_settings: nil); end
+ end
+ # Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountService::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def close(financial_account, params = {}, opts = {}); end
+
+ # Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccountService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of FinancialAccounts.
+ sig {
+ params(params: T.any(::Stripe::Treasury::FinancialAccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of a FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def retrieve(financial_account, params = {}, opts = {}); end
+
+ # Updates the details of a FinancialAccount.
+ sig {
+ params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount)
+ }
+ def update(financial_account, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/inbound_transfer_service.rbi b/rbi/stripe/services/treasury/inbound_transfer_service.rbi
new file mode 100644
index 00000000..8ec25f93
--- /dev/null
+++ b/rbi/stripe/services/treasury/inbound_transfer_service.rbi
@@ -0,0 +1,117 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class InboundTransferService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to send funds to.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The origin payment method to be debited for the InboundTransfer.
+ sig { returns(String) }
+ attr_accessor :origin_payment_method
+ # The complete description that appears on your customers' statements. Maximum 10 characters.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, metadata: T.nilable(T::Hash[String, String]), origin_payment_method: String, statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ origin_payment_method: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancels an InboundTransfer.
+ sig {
+ params(inbound_transfer: String, params: T.any(::Stripe::Treasury::InboundTransferService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def cancel(inbound_transfer, params = {}, opts = {}); end
+
+ # Creates an InboundTransfer.
+ sig {
+ params(params: T.any(::Stripe::Treasury::InboundTransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of InboundTransfers sent from the specified FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::InboundTransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing InboundTransfer.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::InboundTransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/outbound_payment_service.rbi b/rbi/stripe/services/treasury/outbound_payment_service.rbi
new file mode 100644
index 00000000..08c4d629
--- /dev/null
+++ b/rbi/stripe/services/treasury/outbound_payment_service.rbi
@@ -0,0 +1,304 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class OutboundPaymentService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return OutboundPayments that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::OutboundPaymentService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Only return OutboundPayments sent to this customer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::OutboundPaymentService::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ customer: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ class BillingDetails < Stripe::RequestParams
+ class Address < Stripe::RequestParams
+ # City, district, suburb, town, or village.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :city
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :country
+ # Address line 1 (e.g., street, PO Box, or company name).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line1
+ # Address line 2 (e.g., apartment, suite, unit, or building).
+ sig { returns(T.nilable(String)) }
+ attr_accessor :line2
+ # ZIP or postal code.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :postal_code
+ # State, county, province, or region.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :state
+ sig {
+ params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
+ }
+ def initialize(
+ city: nil,
+ country: nil,
+ line1: nil,
+ line2: nil,
+ postal_code: nil,
+ state: nil
+ ); end
+ end
+ # Billing address.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails::Address))))
+ }
+ attr_accessor :address
+ # Email address.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :email
+ # Full name.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :name
+ # Billing phone number (including extension).
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :phone
+ sig {
+ params(address: T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails::Address))), email: T.nilable(T.nilable(String)), name: T.nilable(T.nilable(String)), phone: T.nilable(T.nilable(String))).void
+ }
+ def initialize(address: nil, email: nil, name: nil, phone: nil); end
+ end
+ class UsBankAccount < Stripe::RequestParams
+ # Account holder type: individual or company.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_holder_type
+ # Account number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_number
+ # Account type: checkings or savings. Defaults to checking if omitted.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :account_type
+ # The ID of a Financial Connections Account to use as a payment method.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_connections_account
+ # Routing number of the bank account.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :routing_number
+ sig {
+ params(account_holder_type: T.nilable(String), account_number: T.nilable(String), account_type: T.nilable(String), financial_connections_account: T.nilable(String), routing_number: T.nilable(String)).void
+ }
+ def initialize(
+ account_holder_type: nil,
+ account_number: nil,
+ account_type: nil,
+ financial_connections_account: nil,
+ routing_number: nil
+ ); end
+ end
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails))
+ }
+ attr_accessor :billing_details
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Required hash if type is set to `us_bank_account`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::UsBankAccount))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(billing_details: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails), financial_account: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), type: String, us_bank_account: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::UsBankAccount)).void
+ }
+ def initialize(
+ billing_details: nil,
+ financial_account: nil,
+ metadata: nil,
+ type: nil,
+ us_bank_account: nil
+ ); end
+ end
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ sig { params(network: T.nilable(String)).void }
+ def initialize(network: nil); end
+ end
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(us_bank_account: nil); end
+ end
+ class EndUserDetails < Stripe::RequestParams
+ # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ip_address
+ # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ sig { returns(T::Boolean) }
+ attr_accessor :present
+ sig { params(ip_address: T.nilable(String), present: T::Boolean).void }
+ def initialize(ip_address: nil, present: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :customer
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData))
+ }
+ attr_accessor :destination_payment_method_data
+ # Payment method-specific configuration for this OutboundPayment.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions))
+ }
+ attr_accessor :destination_payment_method_options
+ # End user details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::EndUserDetails))
+ }
+ attr_accessor :end_user_details
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment".
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, customer: T.nilable(String), description: T.nilable(String), destination_payment_method: T.nilable(String), destination_payment_method_data: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData), destination_payment_method_options: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions), end_user_details: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::EndUserDetails), expand: T.nilable(T::Array[String]), financial_account: String, metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ customer: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ end_user_details: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Cancel an OutboundPayment.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::OutboundPaymentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def cancel(id, params = {}, opts = {}); end
+
+ # Creates an OutboundPayment.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundPaymentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of OutboundPayments sent from the specified FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundPaymentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::OutboundPaymentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/outbound_transfer_service.rbi b/rbi/stripe/services/treasury/outbound_transfer_service.rbi
new file mode 100644
index 00000000..85cce2ef
--- /dev/null
+++ b/rbi/stripe/services/treasury/outbound_transfer_service.rbi
@@ -0,0 +1,157 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class OutboundTransferService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class CreateParams < Stripe::RequestParams
+ class DestinationPaymentMethodData < Stripe::RequestParams
+ # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :financial_account
+ # The type of the destination.
+ sig { returns(String) }
+ attr_accessor :type
+ sig { params(financial_account: T.nilable(String), type: String).void }
+ def initialize(financial_account: nil, type: nil); end
+ end
+ class DestinationPaymentMethodOptions < Stripe::RequestParams
+ class UsBankAccount < Stripe::RequestParams
+ # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :network
+ sig { params(network: T.nilable(String)).void }
+ def initialize(network: nil); end
+ end
+ # Optional fields for `us_bank_account`.
+ sig {
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount))))
+ }
+ attr_accessor :us_bank_account
+ sig {
+ params(us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)))).void
+ }
+ def initialize(us_bank_account: nil); end
+ end
+ # Amount (in cents) to be transferred.
+ sig { returns(Integer) }
+ attr_accessor :amount
+ # 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).
+ sig { returns(String) }
+ attr_accessor :currency
+ # An arbitrary string attached to the object. Often useful for displaying to users.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The PaymentMethod to use as the payment instrument for the OutboundTransfer.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :destination_payment_method
+ # Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodData))
+ }
+ attr_accessor :destination_payment_method_data
+ # Hash describing payment method configuration details.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions))
+ }
+ attr_accessor :destination_payment_method_options
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount to pull funds from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # 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`.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer".
+ sig { returns(T.nilable(String)) }
+ attr_accessor :statement_descriptor
+ sig {
+ params(amount: Integer, currency: String, description: T.nilable(String), destination_payment_method: T.nilable(String), destination_payment_method_data: T.nilable(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodData), destination_payment_method_options: T.nilable(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions), expand: T.nilable(T::Array[String]), financial_account: String, metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String)).void
+ }
+ def initialize(
+ amount: nil,
+ currency: nil,
+ description: nil,
+ destination_payment_method: nil,
+ destination_payment_method_data: nil,
+ destination_payment_method_options: nil,
+ expand: nil,
+ financial_account: nil,
+ metadata: nil,
+ statement_descriptor: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class CancelParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # An OutboundTransfer can be canceled if the funds have not yet been paid out.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::Treasury::OutboundTransferService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def cancel(outbound_transfer, params = {}, opts = {}); end
+
+ # Creates an OutboundTransfer.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundTransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Returns a list of OutboundTransfers sent from the specified FinancialAccount.
+ sig {
+ params(params: T.any(::Stripe::Treasury::OutboundTransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
+ sig {
+ params(outbound_transfer: String, params: T.any(::Stripe::Treasury::OutboundTransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer)
+ }
+ def retrieve(outbound_transfer, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/received_credit_service.rbi b/rbi/stripe/services/treasury/received_credit_service.rbi
new file mode 100644
index 00000000..880d6793
--- /dev/null
+++ b/rbi/stripe/services/treasury/received_credit_service.rbi
@@ -0,0 +1,72 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class ReceivedCreditService < StripeService
+ class ListParams < Stripe::RequestParams
+ class LinkedFlows < Stripe::RequestParams
+ # The source flow type.
+ sig { returns(String) }
+ attr_accessor :source_flow_type
+ sig { params(source_flow_type: String).void }
+ def initialize(source_flow_type: nil); end
+ end
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount that received the funds.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Only return ReceivedCredits described by the flow.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::ReceivedCreditService::ListParams::LinkedFlows))
+ }
+ attr_accessor :linked_flows
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return ReceivedCredits that have the given status: `succeeded` or `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), linked_flows: T.nilable(::Stripe::Treasury::ReceivedCreditService::ListParams::LinkedFlows), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ linked_flows: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of ReceivedCredits.
+ sig {
+ params(params: T.any(::Stripe::Treasury::ReceivedCreditService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::ReceivedCreditService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedCredit)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/received_debit_service.rbi b/rbi/stripe/services/treasury/received_debit_service.rbi
new file mode 100644
index 00000000..068493b4
--- /dev/null
+++ b/rbi/stripe/services/treasury/received_debit_service.rbi
@@ -0,0 +1,59 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class ReceivedDebitService < StripeService
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # The FinancialAccount that funds were pulled from.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return ReceivedDebits that have the given status: `succeeded` or `failed`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
+ }
+ def initialize(
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ starting_after: nil,
+ status: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Returns a list of ReceivedDebits.
+ sig {
+ params(params: T.any(::Stripe::Treasury::ReceivedDebitService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::ReceivedDebitService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedDebit)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/transaction_entry_service.rbi b/rbi/stripe/services/treasury/transaction_entry_service.rbi
new file mode 100644
index 00000000..a3be0aa5
--- /dev/null
+++ b/rbi/stripe/services/treasury/transaction_entry_service.rbi
@@ -0,0 +1,111 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class TransactionEntryService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class EffectiveAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Only return TransactionEntries that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::TransactionEntryService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # Attribute for param field effective_at
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::TransactionEntryService::ListParams::EffectiveAt, Integer)))
+ }
+ attr_accessor :effective_at
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :order_by
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return TransactionEntries associated with this Transaction.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :transaction
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::TransactionEntryService::ListParams::Created, Integer)), effective_at: T.nilable(T.any(::Stripe::Treasury::TransactionEntryService::ListParams::EffectiveAt, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), order_by: T.nilable(String), starting_after: T.nilable(String), transaction: T.nilable(String)).void
+ }
+ def initialize(
+ created: nil,
+ effective_at: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ transaction: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieves a list of TransactionEntry objects.
+ sig {
+ params(params: T.any(::Stripe::Treasury::TransactionEntryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves a TransactionEntry object.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::TransactionEntryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::TransactionEntry)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury/transaction_service.rbi b/rbi/stripe/services/treasury/transaction_service.rbi
new file mode 100644
index 00000000..ab43d09d
--- /dev/null
+++ b/rbi/stripe/services/treasury/transaction_service.rbi
@@ -0,0 +1,122 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module Treasury
+ class TransactionService < StripeService
+ class ListParams < Stripe::RequestParams
+ class Created < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ class StatusTransitions < Stripe::RequestParams
+ class PostedAt < Stripe::RequestParams
+ # Minimum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gt
+ # Minimum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :gte
+ # Maximum value to filter by (exclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lt
+ # Maximum value to filter by (inclusive)
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :lte
+ sig {
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
+ }
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
+ end
+ # Returns Transactions with `posted_at` within the specified range.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions::PostedAt, Integer)))
+ }
+ attr_accessor :posted_at
+ sig {
+ params(posted_at: T.nilable(T.any(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions::PostedAt, Integer))).void
+ }
+ def initialize(posted_at: nil); end
+ end
+ # Only return Transactions that were created during the given date interval.
+ sig {
+ returns(T.nilable(T.any(::Stripe::Treasury::TransactionService::ListParams::Created, Integer)))
+ }
+ attr_accessor :created
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # Returns objects associated with this FinancialAccount.
+ sig { returns(String) }
+ attr_accessor :financial_account
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :order_by
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ # Only return Transactions that have the given status: `open`, `posted`, or `void`.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :status
+ # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
+ sig {
+ returns(T.nilable(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions))
+ }
+ attr_accessor :status_transitions
+ sig {
+ params(created: T.nilable(T.any(::Stripe::Treasury::TransactionService::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), financial_account: String, limit: T.nilable(Integer), order_by: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), status_transitions: T.nilable(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions)).void
+ }
+ def initialize(
+ created: nil,
+ ending_before: nil,
+ expand: nil,
+ financial_account: nil,
+ limit: nil,
+ order_by: nil,
+ starting_after: nil,
+ status: nil,
+ status_transitions: nil
+ ); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ # Retrieves a list of Transaction objects.
+ sig {
+ params(params: T.any(::Stripe::Treasury::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an existing Transaction.
+ sig {
+ params(id: String, params: T.any(::Stripe::Treasury::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::Transaction)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/treasury_service.rbi b/rbi/stripe/services/treasury_service.rbi
new file mode 100644
index 00000000..a2b1b048
--- /dev/null
+++ b/rbi/stripe/services/treasury_service.rbi
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class TreasuryService < StripeService
+ attr_reader :credit_reversals
+ attr_reader :debit_reversals
+ attr_reader :financial_accounts
+ attr_reader :inbound_transfers
+ attr_reader :outbound_payments
+ attr_reader :outbound_transfers
+ attr_reader :received_credits
+ attr_reader :received_debits
+ attr_reader :transactions
+ attr_reader :transaction_entries
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v1_services.rbi b/rbi/stripe/services/v1_services.rbi
new file mode 100644
index 00000000..0eb31909
--- /dev/null
+++ b/rbi/stripe/services/v1_services.rbi
@@ -0,0 +1,77 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class V1Services < StripeService
+ attr_reader :accounts
+ attr_reader :account_links
+ attr_reader :account_sessions
+ attr_reader :apple_pay_domains
+ attr_reader :application_fees
+ attr_reader :apps
+ attr_reader :balance
+ attr_reader :balance_transactions
+ attr_reader :billing
+ attr_reader :billing_portal
+ attr_reader :charges
+ attr_reader :checkout
+ attr_reader :climate
+ attr_reader :confirmation_tokens
+ attr_reader :test_helpers
+ attr_reader :country_specs
+ attr_reader :coupons
+ attr_reader :credit_notes
+ attr_reader :customers
+ attr_reader :customer_sessions
+ attr_reader :disputes
+ attr_reader :entitlements
+ attr_reader :ephemeral_keys
+ attr_reader :events
+ attr_reader :exchange_rates
+ attr_reader :files
+ attr_reader :file_links
+ attr_reader :financial_connections
+ attr_reader :forwarding
+ attr_reader :identity
+ attr_reader :invoices
+ attr_reader :invoice_payments
+ attr_reader :invoice_rendering_templates
+ attr_reader :invoice_items
+ attr_reader :issuing
+ attr_reader :mandates
+ attr_reader :payment_intents
+ attr_reader :payment_links
+ attr_reader :payment_methods
+ attr_reader :payment_method_configurations
+ attr_reader :payment_method_domains
+ attr_reader :payouts
+ attr_reader :plans
+ attr_reader :prices
+ attr_reader :products
+ attr_reader :promotion_codes
+ attr_reader :quotes
+ attr_reader :radar
+ attr_reader :refunds
+ attr_reader :reporting
+ attr_reader :reviews
+ attr_reader :sigma
+ attr_reader :setup_attempts
+ attr_reader :setup_intents
+ attr_reader :shipping_rates
+ attr_reader :sources
+ attr_reader :subscriptions
+ attr_reader :subscription_items
+ attr_reader :subscription_schedules
+ attr_reader :tax
+ attr_reader :tax_codes
+ attr_reader :tax_ids
+ attr_reader :tax_rates
+ attr_reader :terminal
+ attr_reader :tokens
+ attr_reader :topups
+ attr_reader :transfers
+ attr_reader :treasury
+ attr_reader :webhook_endpoints
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi b/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi
new file mode 100644
index 00000000..610cfbbb
--- /dev/null
+++ b/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ class MeterEventAdjustmentService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Cancel < Stripe::RequestParams
+ # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ sig { returns(String) }
+ attr_accessor :identifier
+ sig { params(identifier: String).void }
+ def initialize(identifier: nil); end
+ end
+ # Specifies which event to cancel.
+ sig { returns(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel) }
+ attr_accessor :cancel
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
+ sig { returns(String) }
+ attr_accessor :type
+ sig {
+ params(cancel: ::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel, event_name: String, type: String).void
+ }
+ def initialize(cancel: nil, event_name: nil, type: nil); end
+ end
+ # Creates a meter event adjustment to cancel a previously sent meter event.
+ sig {
+ params(params: T.any(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventAdjustment)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/billing/meter_event_service.rbi b/rbi/stripe/services/v2/billing/meter_event_service.rbi
new file mode 100644
index 00000000..4b000920
--- /dev/null
+++ b/rbi/stripe/services/v2/billing/meter_event_service.rbi
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ class MeterEventService < StripeService
+ class CreateParams < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # A unique identifier for the event. If not provided, one will be generated.
+ # We recommend using a globally unique identifier for this. We’ll enforce
+ # uniqueness within a rolling 24 hour period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter’s
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
+ # `value_settings.event_payload_key` (default is `value`). Read more about
+ # the
+ # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ sig { returns(T::Hash[String, String]) }
+ attr_accessor :payload
+ # The time of the event. Must be within the past 35 calendar days or up to
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :timestamp
+ sig {
+ params(event_name: String, identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(String)).void
+ }
+ def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end
+ end
+ # Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead.
+ sig {
+ params(params: T.any(::Stripe::V2::Billing::MeterEventService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEvent)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/billing/meter_event_session_service.rbi b/rbi/stripe/services/v2/billing/meter_event_session_service.rbi
new file mode 100644
index 00000000..a0fdf581
--- /dev/null
+++ b/rbi/stripe/services/v2/billing/meter_event_session_service.rbi
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ class MeterEventSessionService < StripeService
+ class CreateParams < Stripe::RequestParams
+
+ end
+ # Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires.
+ sig {
+ params(params: T.any(::Stripe::V2::Billing::MeterEventSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventSession)
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi b/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi
new file mode 100644
index 00000000..51829fd6
--- /dev/null
+++ b/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi
@@ -0,0 +1,55 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Billing
+ class MeterEventStreamService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class Event < Stripe::RequestParams
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
+ sig { returns(String) }
+ attr_accessor :event_name
+ # A unique identifier for the event. If not provided, one will be generated.
+ # We recommend using a globally unique identifier for this. We’ll enforce
+ # uniqueness within a rolling 24 hour period.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :identifier
+ # The payload of the event. This must contain the fields corresponding to a meter’s
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
+ # `value_settings.event_payload_key` (default is `value`). Read more about
+ # the
+ # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
+ sig { returns(T::Hash[String, String]) }
+ attr_accessor :payload
+ # The time of the event. Must be within the past 35 calendar days or up to
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :timestamp
+ sig {
+ params(event_name: String, identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(String)).void
+ }
+ def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end
+ end
+ # List of meter events to include in the request.
+ sig {
+ returns(T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event])
+ }
+ attr_accessor :events
+ sig {
+ params(events: T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]).void
+ }
+ def initialize(events: nil); end
+ end
+ # Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales.
+ #
+ # ** raises TemporarySessionExpiredError
+ sig {
+ params(params: T.any(::Stripe::V2::Billing::MeterEventStreamService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).void
+ }
+ def create(params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/billing_service.rbi b/rbi/stripe/services/v2/billing_service.rbi
new file mode 100644
index 00000000..a9240381
--- /dev/null
+++ b/rbi/stripe/services/v2/billing_service.rbi
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ class BillingService < StripeService
+ attr_reader :meter_event_session
+ attr_reader :meter_event_adjustments
+ attr_reader :meter_event_stream
+ attr_reader :meter_events
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/core/event_destination_service.rbi b/rbi/stripe/services/v2/core/event_destination_service.rbi
new file mode 100644
index 00000000..835e341f
--- /dev/null
+++ b/rbi/stripe/services/v2/core/event_destination_service.rbi
@@ -0,0 +1,200 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Core
+ class EventDestinationService < StripeService
+ class CreateParams < Stripe::RequestParams
+ class AmazonEventbridge < Stripe::RequestParams
+ # The AWS account ID.
+ sig { returns(String) }
+ attr_accessor :aws_account_id
+ # The region of the AWS event source.
+ sig { returns(String) }
+ attr_accessor :aws_region
+ sig { params(aws_account_id: String, aws_region: String).void }
+ def initialize(aws_account_id: nil, aws_region: nil); end
+ end
+ class WebhookEndpoint < Stripe::RequestParams
+ # The URL of the webhook endpoint.
+ sig { returns(String) }
+ attr_accessor :url
+ sig { params(url: String).void }
+ def initialize(url: nil); end
+ end
+ # An optional description of what the event destination is used for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The list of events to enable for this endpoint.
+ sig { returns(T::Array[String]) }
+ attr_accessor :enabled_events
+ # Payload type of events being subscribed to.
+ sig { returns(String) }
+ attr_accessor :event_payload
+ # Where events should be routed from.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :events_from
+ # Additional fields to include in the response.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :include
+ # Metadata.
+ sig { returns(T.nilable(T::Hash[String, String])) }
+ attr_accessor :metadata
+ # Event destination name.
+ sig { returns(String) }
+ attr_accessor :name
+ # If using the snapshot event payload, the API version events are rendered as.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :snapshot_api_version
+ # Event destination type.
+ sig { returns(String) }
+ attr_accessor :type
+ # Amazon EventBridge configuration.
+ sig {
+ returns(T.nilable(::Stripe::V2::Core::EventDestinationService::CreateParams::AmazonEventbridge))
+ }
+ attr_accessor :amazon_eventbridge
+ # Webhook endpoint configuration.
+ sig {
+ returns(T.nilable(::Stripe::V2::Core::EventDestinationService::CreateParams::WebhookEndpoint))
+ }
+ attr_accessor :webhook_endpoint
+ sig {
+ params(description: T.nilable(String), enabled_events: T::Array[String], event_payload: String, events_from: T.nilable(T::Array[String]), include: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, snapshot_api_version: T.nilable(String), type: String, amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationService::CreateParams::AmazonEventbridge), webhook_endpoint: T.nilable(::Stripe::V2::Core::EventDestinationService::CreateParams::WebhookEndpoint)).void
+ }
+ def initialize(
+ description: nil,
+ enabled_events: nil,
+ event_payload: nil,
+ events_from: nil,
+ include: nil,
+ metadata: nil,
+ name: nil,
+ snapshot_api_version: nil,
+ type: nil,
+ amazon_eventbridge: nil,
+ webhook_endpoint: nil
+ ); end
+ end
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class DisableParams < Stripe::RequestParams
+
+ end
+ class EnableParams < Stripe::RequestParams
+
+ end
+ class ListParams < Stripe::RequestParams
+ # Additional fields to include in the response. Currently supports `webhook_endpoint.url`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :include
+ # The page size.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void }
+ def initialize(include: nil, limit: nil); end
+ end
+ class PingParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Additional fields to include in the response.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :include
+ sig { params(include: T.nilable(T::Array[String])).void }
+ def initialize(include: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ class WebhookEndpoint < Stripe::RequestParams
+ # The URL of the webhook endpoint.
+ sig { returns(String) }
+ attr_accessor :url
+ sig { params(url: String).void }
+ def initialize(url: nil); end
+ end
+ # An optional description of what the event destination is used for.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :description
+ # The list of events to enable for this endpoint.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :enabled_events
+ # Additional fields to include in the response. Currently supports `webhook_endpoint.url`.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :include
+ # Metadata.
+ sig { returns(T.nilable(T::Hash[String, T.nilable(String)])) }
+ attr_accessor :metadata
+ # Event destination name.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :name
+ # Webhook endpoint configuration.
+ sig {
+ returns(T.nilable(::Stripe::V2::Core::EventDestinationService::UpdateParams::WebhookEndpoint))
+ }
+ attr_accessor :webhook_endpoint
+ sig {
+ params(description: T.nilable(String), enabled_events: T.nilable(T::Array[String]), include: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, T.nilable(String)]), name: T.nilable(String), webhook_endpoint: T.nilable(::Stripe::V2::Core::EventDestinationService::UpdateParams::WebhookEndpoint)).void
+ }
+ def initialize(
+ description: nil,
+ enabled_events: nil,
+ include: nil,
+ metadata: nil,
+ name: nil,
+ webhook_endpoint: nil
+ ); end
+ end
+ # Create a new event destination.
+ sig {
+ params(params: T.any(::Stripe::V2::Core::EventDestinationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination)
+ }
+ def create(params = {}, opts = {}); end
+
+ # Delete an event destination.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination)
+ }
+ def delete(id, params = {}, opts = {}); end
+
+ # Disable an event destination.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::DisableParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination)
+ }
+ def disable(id, params = {}, opts = {}); end
+
+ # Enable an event destination.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::EnableParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination)
+ }
+ def enable(id, params = {}, opts = {}); end
+
+ # Lists all event destinations.
+ sig {
+ params(params: T.any(::Stripe::V2::Core::EventDestinationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Send a `ping` event to an event destination.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::PingParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Event)
+ }
+ def ping(id, params = {}, opts = {}); end
+
+ # Retrieves the details of an event destination.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+
+ # Update the details of an event destination.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination)
+ }
+ def update(id, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/core/event_service.rbi b/rbi/stripe/services/v2/core/event_service.rbi
new file mode 100644
index 00000000..6b21aa96
--- /dev/null
+++ b/rbi/stripe/services/v2/core/event_service.rbi
@@ -0,0 +1,36 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ module Core
+ class EventService < StripeService
+ class ListParams < Stripe::RequestParams
+ # The page size.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # Primary object ID used to retrieve related events.
+ sig { returns(String) }
+ attr_accessor :object_id
+ sig { params(limit: T.nilable(Integer), object_id: String).void }
+ def initialize(limit: nil, object_id: nil); end
+ end
+ class RetrieveParams < Stripe::RequestParams
+
+ end
+ # List events, going back up to 30 days.
+ sig {
+ params(params: T.any(::Stripe::V2::Core::EventService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the details of an event.
+ sig {
+ params(id: String, params: T.any(::Stripe::V2::Core::EventService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Event)
+ }
+ def retrieve(id, params = {}, opts = {}); end
+ end
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2/core_service.rbi b/rbi/stripe/services/v2/core_service.rbi
new file mode 100644
index 00000000..48396874
--- /dev/null
+++ b/rbi/stripe/services/v2/core_service.rbi
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ module V2
+ class CoreService < StripeService
+ attr_reader :event_destinations
+ attr_reader :events
+ end
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/v2_services.rbi b/rbi/stripe/services/v2_services.rbi
new file mode 100644
index 00000000..4f9448fc
--- /dev/null
+++ b/rbi/stripe/services/v2_services.rbi
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class V2Services < StripeService
+ attr_reader :billing
+ attr_reader :core
+ end
+end
\ No newline at end of file
diff --git a/rbi/stripe/services/webhook_endpoint_service.rbi b/rbi/stripe/services/webhook_endpoint_service.rbi
new file mode 100644
index 00000000..994f6abe
--- /dev/null
+++ b/rbi/stripe/services/webhook_endpoint_service.rbi
@@ -0,0 +1,131 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+# typed: true
+module Stripe
+ class WebhookEndpointService < StripeService
+ class DeleteParams < Stripe::RequestParams
+
+ end
+ class RetrieveParams < Stripe::RequestParams
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ sig { params(expand: T.nilable(T::Array[String])).void }
+ def initialize(expand: nil); end
+ end
+ class UpdateParams < Stripe::RequestParams
+ # An optional description of what the webhook is used for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # Disable the webhook endpoint if set to true.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :disabled
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :url
+ sig {
+ params(description: T.nilable(T.nilable(String)), disabled: T.nilable(T::Boolean), enabled_events: T.nilable(T::Array[String]), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), url: T.nilable(String)).void
+ }
+ def initialize(
+ description: nil,
+ disabled: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ ); end
+ end
+ class ListParams < Stripe::RequestParams
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :ending_before
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ sig { returns(T.nilable(Integer)) }
+ attr_accessor :limit
+ # 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.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :starting_after
+ sig {
+ params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
+ }
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
+ end
+ class CreateParams < Stripe::RequestParams
+ # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
+ sig { returns(T.nilable(String)) }
+ attr_accessor :api_version
+ # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
+ sig { returns(T.nilable(T::Boolean)) }
+ attr_accessor :connect
+ # An optional description of what the webhook is used for.
+ sig { returns(T.nilable(T.nilable(String))) }
+ attr_accessor :description
+ # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ sig { returns(T::Array[String]) }
+ attr_accessor :enabled_events
+ # Specifies which fields in the response should be expanded.
+ sig { returns(T.nilable(T::Array[String])) }
+ attr_accessor :expand
+ # 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`.
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
+ attr_accessor :metadata
+ # The URL of the webhook endpoint.
+ sig { returns(String) }
+ attr_accessor :url
+ sig {
+ params(api_version: T.nilable(String), connect: T.nilable(T::Boolean), description: T.nilable(T.nilable(String)), enabled_events: T::Array[String], expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), url: String).void
+ }
+ def initialize(
+ api_version: nil,
+ connect: nil,
+ description: nil,
+ enabled_events: nil,
+ expand: nil,
+ metadata: nil,
+ url: nil
+ ); end
+ end
+ # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
+ sig {
+ params(params: T.any(::Stripe::WebhookEndpointService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def create(params = {}, opts = {}); end
+
+ # You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
+ sig {
+ params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpointService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def delete(webhook_endpoint, params = {}, opts = {}); end
+
+ # Returns a list of your webhook endpoints.
+ sig {
+ params(params: T.any(::Stripe::WebhookEndpointService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
+ }
+ def list(params = {}, opts = {}); end
+
+ # Retrieves the webhook endpoint with the given ID.
+ sig {
+ params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpointService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def retrieve(webhook_endpoint, params = {}, opts = {}); end
+
+ # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
+ sig {
+ params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpointService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint)
+ }
+ def update(webhook_endpoint, params = {}, opts = {}); end
+ end
+end
\ No newline at end of file
diff --git a/test/stripe/request_params_test.rb b/test/stripe/request_params_test.rb
new file mode 100644
index 00000000..a36540d2
--- /dev/null
+++ b/test/stripe/request_params_test.rb
@@ -0,0 +1,137 @@
+# frozen_string_literal: true
+
+require File.expand_path("../test_helper", __dir__)
+
+module Stripe
+ class RequestParamsTest < Test::Unit::TestCase
+ class FooCreateParams < Stripe::RequestParams
+ attr_accessor :fun, :team
+
+ def initialize(fun: nil, team: nil)
+ @fun = fun
+ @team = team
+ end
+
+ class Fun < Stripe::RequestParams
+ attr_accessor :games
+
+ def initialize(games: nil)
+ @games = games
+ end
+ end
+ end
+
+ context "#to_h" do
+ should "convert to hash" do
+ params = FooCreateParams.new(
+ fun: FooCreateParams::Fun.new(games: %w[chess go]),
+ team: "blue"
+ )
+ expected = { fun: { games: %w[chess go] }, team: "blue" }
+ assert_equal expected, params.to_h
+ end
+
+ should "convert nested lists" do
+ params = FooCreateParams.new(
+ fun: [FooCreateParams::Fun.new(games: "chess"), FooCreateParams::Fun.new(games: "go"), FooCreateParams::Fun.new(games: "sorry")],
+ team: 42
+ )
+ expected = { fun: [{ games: "chess" }, { games: "go" }, { games: "sorry" }], team: 42 }
+ assert_equal expected, params.to_h
+ end
+
+ should "make request with params class" do
+ stub_request(:post, "#{Stripe.api_base}/v1/customers")
+ .with do |req|
+ assert req.body == "name=foo"
+ end
+ .to_return(body: JSON.generate(object: "customer"))
+ params = Stripe::Customer::CreateParams.new(name: "foo")
+ cus = Stripe::Customer.create(params)
+ assert cus.is_a?(Stripe::Customer)
+ end
+ end
+
+ context "different request types" do
+ should "create a customer with params class" do
+ stub_request(:post, "#{Stripe.api_base}/v1/customers")
+ .with(body: "name=foo")
+ .to_return(body: JSON.generate(object: "customer", id: "cus_123", name: "foo"))
+
+ params = Stripe::Customer::CreateParams.new(name: "foo")
+ customer = Stripe::Customer.create(params)
+
+ assert customer.is_a?(Stripe::Customer)
+ assert_equal "cus_123", customer.id
+ assert_equal "foo", customer.name
+ end
+
+ should "update a customer with params class" do
+ stub_request(:post, "#{Stripe.api_base}/v1/customers/cus_123")
+ .with(body: "name=bar")
+ .to_return(body: JSON.generate(object: "customer", id: "cus_123", name: "bar"))
+
+ params = Stripe::Customer::UpdateParams.new(name: "bar")
+ customer = Stripe::Customer.update("cus_123", params)
+
+ assert customer.is_a?(Stripe::Customer)
+ assert_equal "cus_123", customer.id
+ assert_equal "bar", customer.name
+ end
+
+ # NOTE: Resource-based retrieve expand is a special case...
+ should "retrieve a customer with params class" do
+ stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v1/customers/cus_123?expand[]=foo")
+ .to_return(body: JSON.generate(object: "customer", id: "cus_123", name: "foo"))
+
+ @client = Stripe::StripeClient.new("sk_test_123")
+ customer = @client.v1.customers.retrieve("cus_123", CustomerService::RetrieveParams.new(expand: [:foo]))
+
+ assert customer.is_a?(Stripe::Customer)
+ end
+
+ should "list customers with params class" do
+ stub_request(:get, "#{Stripe.api_base}/v1/customers")
+ .to_return(body: JSON.generate(object: "list", data: [{ id: "cus_123", name: "foo" }, { id: "cus_456", name: "bar" }]))
+
+ customers = Stripe::Customer.list
+
+ assert customers.is_a?(Stripe::ListObject)
+ assert_equal 2, customers.data.size
+ assert_equal "cus_123", customers.data[0].id
+ assert_equal "foo", customers.data[0].name
+ assert_equal "cus_456", customers.data[1].id
+ assert_equal "bar", customers.data[1].name
+ end
+
+ should "search customers with params class" do
+ stub_request(:get, "#{Stripe.api_base}/v1/customers/search")
+ .with(query: { query: "name:'foo'" })
+ .to_return(body: JSON.generate(object: "search_result", data: [{ id: "cus_123", name: "foo" }]))
+
+ params = Stripe::Customer::SearchParams.new(query: "name:'foo'")
+ customers = Stripe::Customer.search(params)
+
+ assert customers.is_a?(Stripe::SearchResultObject)
+ assert_equal 1, customers.data.size
+ assert_equal "cus_123", customers.data[0].id
+ assert_equal "foo", customers.data[0].name
+ end
+
+ should "request params work in raw request" do
+ expected_body = JSON.generate(id: "cus_123", name: "foo")
+ req = nil
+
+ stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v1/customers")
+ .with(body: "name=foo")
+ .with { |request| req = request }
+ .to_return(body: expected_body)
+
+ @client = Stripe::StripeClient.new("sk_test_123")
+ resp = @client.raw_request(:post, "/v1/customers", params: Customer::CreateParams.new(name: "foo"))
+
+ assert_equal expected_body, resp.http_body
+ end
+ end
+ end
+end